Amazing script. I've updated a pentoo plugin posted before for 5.1 to version 6.4, and changed (in the "copy" action) a {} expansion to a for .. in loop, as the expansion was breaking with a stat error, what's strange is this happened only from the script, when i tried manually after the script stopped it worked fine.
Code:
#!/bin/sh
set -e
. ./functions.sh
#Pentoo plugin for multicd.sh
#version 6.4?
#Copyright (c) 2009 maybeway36
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.
# BUGS
# modules directory is not read correctly, as it is searched for in /
if [ $1 = scan ];then
if [ -f pentoo.iso ];then
echo "Pentoo Linux"
fi
elif [ $1 = copy ];then
if [ -f pentoo.iso ];then
echo "Copying Pentoo Linux..."
mcdmount pentoo
mkdir -p $WORK/boot/pentoo
for item in modules tools win32 image.squashfs livecd; do
cp -r $MNT/pentoo/$item $WORK/boot/pentoo
done
for item in pentoo isolinux.cfg pentoo.igz; do
cp -r $MNT/pentoo/isolinux/$item $WORK/boot/pentoo
done
# Fix the isolinux.cfg
sed -i 's@loop=/image.squashfs@loop=/boot/pentoo/image.squashfs subdir=/boot/pentoo@' $WORK/boot/pentoo/isolinux.cfg
sed -i 's@kernel @kernel /boot/pentoo/@' $WORK/boot/pentoo/isolinux.cfg
sed -i 's@initrd=@initrd=/boot/pentoo/@' $WORK/boot/pentoo/isolinux.cfg
umcdmount pentoo
fi
elif [ $1 = writecfg ];then
if [ -f pentoo.iso ];then
cat >> $WORK/boot/isolinux/isolinux.cfg << EOF
label pentoo
menu label ---> ^Pentoo Menu
com32 menu.c32
append /boot/pentoo/isolinux.cfg
EOF
cat >> $WORK/boot/pentoo/isolinux.cfg << EOF
label back
menu label Back to main menu
com32 menu.c32
append /boot/isolinux/isolinux.cfg
EOF
fi
else
echo "Usage: $0 {scan|copy|writecfg}"
echo "Use only from within multicd.sh or a compatible script!"
echo "Don't use this plugin script on its own!"
fi
I have another multiboot i've made at hand with grub4dos and boots some 20 distros or so, but all are loopback chained to a grub4dos emulated drive. Its structure is as this
/boot
/boot/grub
/boot/grub4dos
/boot/grub4dos/menu/*.lst (submenus)
/iso/*.iso (isos only)
/menu.lst
grldr
I want to integrate these in the multicd iso, is this possible? Can isolinux and grub4dos coexist? If there arent any name clashes for folders or files, they can be chained right?
Anyway i might aswell try to write plugins for the one or two isos that multicd doesn't list as of now and get done. IIUC i can get the same effect with MEMDISK as with grub4dos "map".
After two days of learning all this stuff i'm seeing i'll have to drop the idea of an universal way to boot iso files, and multicd seems great for the "remaster distros" approach, nevertheless I'd like to keep the distros that are capable of booting directly from an iso in a single directory, and remaster the rest with multicd.
Having the isos right there has its advantages, the setup is way easier and they can be easily transferred, burned, etc. I hope some day all isos can be chained directly
Bookmarks