Click to See Complete Forum and Search --> : Creating a Multi Boot Cdrom


homey
03-25-2004, 10:12 PM
This is an attempt to show how I made a multi boot cdrom.

I got most of my inspiration from http://www.ultimatebootcd.com/
Even tho this cdrom has a lot of cool stuff on it, I was also interested in a multi boot cdrom with all or mostly just various flavors of linux rescue cds.

The following site gave me some real ideas. If you poke around in the links, you should find the cd_root download. Amoung other things, that has a cool example of a text menu file. http://ftp.sun.ac.za/ftp/linux/extra/rescue_cd/288.html

Note: Do yourself a favor a practice with a cd/rw media. :)

I copied the distributions into a directory /home/linux systems. Not all linux live cds will co-operate for this and some are just plain too big unless you have a dvd.
I copied my base system from http://www.sysresccd.org into the working directory /home/cdbase. The multi boot cdrom needs to access the various kernels from the root ( not in a directory ) so, I moved everything from the /isolinux directory into the cdrom root, then deleted the /isolinux as it wasn't needed. I removed various message files as they are extra.
I created a directory called /images and moved the .img files from the /bootdisk as that is more meaningful IMHO . Then delete the /bootdisk directory as it isn't needed.

You can only have one Knoppix based system as they all use the /KNOPPIX/KNOPPIX structure as far as I know. Copy /KNOPPIX/KNOPPIX into the cdrom root. Put the knoppix boot.img into the /images directory and rename it knoppix.img

Copy the kernel and initrd files from each linux system into the root of the cdrom working directory. If you have two kernels of the same name, you need to rename one set. Example: vmlinuz1 and initrd1. Then properly reference those files in the isolinux.cfg.
Copy the kernel information from each distributions own isolinux.cfg into the host system isolinux.cfg file.

Example: This is the information for the system labeled "1" which also happens to be the default system. That means you can type: 1 and <enter> or just press <enter> or just wait until the timeout expires for that system to boot.
LABEL 1
KERNEL vmlinuz1
APPEND initrd=initrd1 video=i810fb:xres=800 acpi=off root=/dev/ram0 init=/linuxrc nokeymap
TIMEOUT 300



Below is the isolinux.cfg file


DEFAULT 1
DISPLAY /txt/message.txt
PROMPT 1

LABEL 1
KERNEL vmlinuz1
APPEND initrd=initrd1 video=i810fb:xres=800 acpi=off root=/dev/ram0 init=/linuxrc nokeymap
TIMEOUT 300

LABEL 2
KERNEL memdisk
APPEND initrd=images/knoppix.img
TIMEOUT 300

LABEL 3
KERNEL vmlinuz
APPEND initrd=image.gz root=/dev/ram0 ramdisk_size=55296 initrd_archive=ext2 PFILE=pup080-none-262144
TIMEOUT 300

LABEL 4
KERNEL mulinuz
APPEND initrd=root.gz root=/dev/ram0 ramdisk_size=4600 vga=normal max_scsi_luns=1

LABEL 5
KERNEL memdisk
APPEND initrd=images/ranish.img
TIMEOUT 300

LABEL 6
KERNEL memdisk
APPEND initrd=images/freedos.img
TIMEOUT 300

LABEL 7
KERNEL memdisk
APPEND initrd=images/tomsrtbt.img
TIMEOUT 300

LABEL 8
KERNEL memdisk
APPEND initrd=images/trinux.img
TIMEOUT 300




Below is the message.txt file ( menu )



0fChoose System to Boot 07


0fLinux Rescue CD 07
---------------------------------------------------------------------
[ 091 07] RescueSystem V0.2.10 [ 095 07] Ranish V2.44
[ 092 07] Feather Linux V0.3.7 [ 096 07] Freedos V9
[ 093 07] Puppy Linux V0.8.4 [ 097 07] Tomsrtbt Linux
[ 094 07] Mulinux 14r0 [ 098 07] Trinux Linux





Below is what my directory structure looks like.


-r--r--r-- 1 root root 2048 Jan 23 15:54 boot.cat
-r-xr-xr-x 1 root root 46026910 Mar 20 21:31 image.gz
drwxr-xr-x 2 root root 4096 Mar 25 15:20 images
-rw-r--r-- 1 root root 1313295 Jan 23 15:54 initrd1
-rw-r--r-- 1 root root 9428 Mar 25 18:41 isolinux.bin
-rw-r--r-- 1 1000 1000 862 Mar 25 18:33 isolinux.cfg
-rw-r--r-- 1 root root 256 Jan 23 15:54 keyb.ktl
drwxr-xr-x 2 root root 4096 Mar 25 11:06 KNOPPIX
drwxr-xr-x 2 root root 4096 Mar 25 10:12 loadlin
drwxr-xr-x 2 root root 4096 Mar 25 11:49 maps
-rw-r--r-- 1 root root 23548 Jan 23 15:54 memdisk
-r-xr-xr-x 1 root root 80324 Dec 1 2002 memtest.bin
-r--r--r-- 1 root root 1474560 Feb 21 2003 seatool.fd
drwxr-xr-x 2 root root 4096 Mar 25 10:12 syslinux
-rw-r--r-- 1 root root 91908515 Jan 23 15:54 sysrcd.dat
drwxr-xr-x 2 root root 4096 Mar 25 10:15 txt
-r-xr-xr-x 1 root root 892588 Feb 28 2003 vmlinuz
-rw-r--r-- 1 root root 1758934 Jan 23 15:54 vmlinuz1



After everything is setup, you can make the iso file and burn it to cd/rw as follows.....
CD into the working directory and enter these commands:

cdrecord dev=0,0,0 blank=fast

mkisofs -R -J -b isolinux.bin -c boot.cat \
-o /home/bootcd.iso -no-emul-boot -boot-load-size 4 -boot-info-table .

cdrecord -v speed=4 dev=0,0,0 -eject -data /home/bootcd.iso

DSwain
03-25-2004, 10:25 PM
wow! awesome. that definitly sounds like a good, great almost idea. the problem is it seems like many live-cd's are too big to do, as you said you'd need a dvd which would be a pain. very cool though....and even then you don't need live cd's really, you just need the image files so you can boot into different ones (say debian and gentoo for an example) and then use the net based installers. that'd work well, and probably for any distro at that rate. nice job i'd say.

homey
03-27-2004, 12:18 AM
Thanks DSwain!

That was an interesting project, so I thought maybe I'd expand it to include a GRUB based multi boot cdrom.

I saw a nice little diddy at this site about a patch to enable grub compatibility with cdroms.
http://zh.yazzy.org/blog/archives/2004/02/09/grub-bootable-cdrom/
I just happened to have the RIP V7.8 which has a nice grub setup, so here goes...

I used the same directory structure as the previous example with the exception that grub does want the kernel and initrd files to be in a directory. Therefore, I put them into the /boot directory which came with RIP.

The version of grub which comes with RIP was a bit fussy and didn't allow any extras like "default=" or "timeout=" . I may try it with another version of grub sometime.

Below is my /boot/grub/menu.lst


color light-gray/blue black/light-gray
title *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* R.I.P. *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
root (hd0)
title RIP V7.8
kernel /boot/kernel3
initrd=/boot/initrd3.gz vga=normal devfs=nomount load_ramdisk=1 init=/linuxrc prompt_ramdisk=0 root=/dev/ram0 rw
title Rescue CD V0.2.10
kernel /boot/vmlinuz1 video=i810fb:xres=800 acpi=off root=/dev/ram0 init=/linuxrc nokeymap
initrd=/boot/initrd1
title Feather Linux V0.3.7
kernel /boot/memdisk
initrd=/images/knoppix.img
title Puppy Linux V0.8.4
kernel /boot/vmlinuz root=/dev/ram0 ramdisk_size=55296 initrd_archive=ext2 PFILE=pup080-none-262144
initrd=/boot/image.gz
title Slax Linux V4.0.1
kernel /boot/vmlinuz2 max_loop=255 init=linuxrc livecd_subdir=/ load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=7777 root=/dev/ram0 rw
initrd=/boot/initrd2.gz
title Mulinux V14r0
kernel /boot/mulinuz root=/dev/ram0 ramdisk_size=4600 vga=normal max_scsi_luns=1
initrd=/boot/root.gz
title Freedos V9
kernel /boot/memdisk
initrd=/images/freedos.img
title Tomsrtbt Linux
kernel /boot/memdisk
initrd=/images/tomsrtbt.img
title Ranish Tool V2.44
kernel /boot/memdisk
initrd=/images/ranish.img
title Memtest
kernel /boot/memdisk
initrd=/boot/memtest.bin


Once you have the systems loaded into the working directory ( cdroot ) and have the menu.lst setup, you can proceed as follows....

CD into the cdroot and type:
cdrecord dev=0,0,0 blank=fast

mkisofs -J -R -b boot/grub/iso9660_stage1_5 -c boot/boot.cat \
-o /home/bootcd.iso -no-emul-boot -boot-load-size 32 -boot-info-table .

cdrecord -v speed=4 dev=0,0,0 -data /home/bootcd.iso

Sometimes these boot cdroms will not boot on all computers. :( That is mostly hit or miss from what I've seen. If you have that problem and you know that you did everything correctly, your bios may be fussy.

stephan_c
07-27-2004, 09:08 AM
Hi

How do they get the pretty graphics when the cd boots? The file (sysrcd.dat) that's on the sysrescd obviousely contains all the packages, how can I add packages etc. onto this - with what was this file compiled?

Thanks