------Edited 22/8/07 I used the same idea to boot the 7 iso off a USB pen drive and reported it in Post #5-------------------
I wrote this thread because someone asked if it is possible to do such thing in another forum. I think it can be done, tried it out and documented result in JustLinux.
Steps at a glance
(1) Open a directory, say /iso.
(2) Mount each iso file on a loop back device and copy its content to /iso directory
(3) Copy Grub's stage2_eltorito into /iso directory
(4) Write a Grub menu using the isolinux.cfg from each iso file
(5) Use bash command mkisofs to create a large iso file from /iso directory
(6) Burn the large iso file into a DVD using K3B
Not every iso is suitable to co-exist with others in a DVD. This is because they may use the same directory names.
A little bit of theory
Among about 95% of Linux iso meant to be booted from a CD or DVD will have the de facto boot loader called isolinux, written by Peter Anvin. It has a configuration file called isolinux.cfg. The isolinux syntax is very similar to Grub and so one can substitute isolinux with Grub.
Isolinux can also multi-boots. I am just more comfortable with grub and know it can deliver what I want. Grub is preferred because we can communicate with Grub during boot time and correct any mistake as we go along. That is very useful with a read-only DVD. Isolinux does not offer this flexibility.
Grub has only one file for booting a CD or DVD. This file is called stage2_eltorito available in every Linux that has Grub. It is stored in /boot/grub or /grub directory. The Grub Manual has steps showing how to create a CD or DVD booted by stage2_eltorito.
This is just a big folder for storing several iso files. The iso files have to be expanded first into the normal format first. I use an existing directory in /abit ,rounded up 7 iso files and created the following subdirectories
This allows me to mount any iso file by bash command, say for iso slax-6.0.0-rc5.iso
/bin/bash mountiso slax-6.0.0-rc5.iso
The Slax iso when expanded shows two directories of /boot and /slax inside
root@saikee-desktop:/abit/saikee/Desktop# ls /mnt/cdrom
I can then copy the expanded iso file in /mnt/cdrom into the folder I created in Step-1
cp -R /mnt/cdrom/* /abit/iso/slax-boot/
I have to repeat Step-2 for each iso file.
The folder /abit/iso will be eventually a DVD iso and so to make it bootable by Grub we must have
(a) a directory called /boot/grub
(b) statge2_eltorito inside /boot/grub
I was using an installed Ubuntu 7.04 to do the above work and so Ubuntu's /boot/grub has all the information I need. Therefore all I need to do is to copy the content of Ubuntu's /boot/grub directory into /abit/iso after creating the directories there first
This is by far the most difficult thing to explain. I shall only do it by example. Slax in the above is the perfect system for this type of illustration. The above information shows it has two directories of “/slax” and “/boot” so the first thing I have to do is to move the /slax directory from /abit/iso/slax-boot to /abit/iso, leaving only the /boot there for reference only. This is because when the DVD is booted the installer has been written to search only the root directory whereas the /boot directory is the one I can control by telling Grub where to find it. I can't put /boot in the root directory because many distros have /boot too.
I now show how to get the isolinux.cfg by repeating just the "ls" command going into deeper level each time.
root@saikee-desktop:/home/saikee# ls /abit/iso/slax-boot/
root@saikee-desktop:/home/saikee# ls /abit/iso/slax-boot/boot
bootinst.bat bootlilo.sh dos isolinux syslinux vmlinuz
bootinst.sh chain.c32 initrd.gz mt86p vesamenu.c32
root@saikee-desktop:/home/saikee# ls /abit/iso/slax-boot/boot/isolinux
isolinux.bin isolinux.boot isolinux.cfg
root@saikee-desktop:/home/saikee# cat /abit/iso/slax-boot/boot/isolinux/isolinux.cfg
MENU LABEL Slax Graphics mode (KDE)
APPEND vga=769 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;kdm
MENU LABEL Slax Graphics mode with Persistent Changes
APPEND vga=769 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw changes=/slax/slaxsave.dat autoexec=xconf;kdm
MENU LABEL Slax Graphics mode, Copy To RAM
APPEND vga=769 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw copy2ram autoexec=xconf;kdm
MENU LABEL Slax Graphics VESA mode (1024x768)
APPEND vga=769 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=kdm
MENU LABEL Slax Text mode
APPEND vga=normal initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw
MENU LABEL Run Memtest utility
The part of the isolinux.cfg that is of interest to me has only two lines I have highlighted in red
I now show the end result of the Grub menu, which must be stored as /abit/iso/boot/grub/menu.lst, and the red is the conversion.
You will see I have only changed “KERNEL” with “kernel” and correctly located the where about of the kernel “vmlinuz” to be found in directory /slax-boot/boot. Remember after you have brun the DVD iso the /abit/iso front end will disappear.
The isolinux specifies the ram disk file as a parameter of the KERNEL statement with “initrd=/boot/initrd.gz” forming part of the command structure. In Grub I have separated it into a proper “initrd” statement. That is all I needed to change an iso booting with isolinux to booting with Grub. I do not touch other parameters at all.
To summarize the step of converting an iso booting from isolinux to Grub the steps are
(i) copy the isolinux's KERNEL statement into Grub's menu.lst
(ii) changed “KERNEL” to “kernel”.
(iii) Adjust the directory name so that Grub can find the kernel
(iv) remove the “initrd=xxxxx” parameter in the KERNEL statement of ioslinux.cfg and use the same as a separate “initrd” statement in Grub's menu.lst. Do not forget to remove the “=” sign and amend the partition reference.
I could have just done two iso to make the thread shorter but decided to put 7 iso files in because there are 6 examples showing how isolinux can be converted to Grub. One of the 7 has Grub already and I have shown how we could modify it too to multi-boot. The isolinux information is left at the rear of the thread in case any reader may find more information useful.
This has to be the easiest thing in life for creating your own bootable DVD. Just follow the steps outlined in the Chapter 3.4 of Grub Manual.
I wrote a script call makeiso just to do just that
Parted Magic isolinux.cfg is in /isolinux directory. Its “pmagic” file should be available in the / directory.
MENU LABEL ^1. Boot Parted Magic using the default settings
* version: 1.8, (C) 2007, Patrick Verner
* Disclaimer: Author not responsible for any mishap caused by this software.
APPEND noapic initrd=initrd.gz root=/dev/ram0 init=/linuxrc ramdisk_size=100000 skip
Ubuntu is a difficult one as it has so many directories needed to be available in the / directory. I just copied everything. The isolinux.cfg is in /isolinux directory and I used only this portion
menu label ^Start or install Ubuntu
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
Lastly the complete content of my /abit/iso (before turning into the iso), looks like this
Well, the idea may have been born out of necessity, but for me this thread is another example for "innovation in the community, but not by Microsoft, because they'd have to check the legal implications first".
"What can be said at all can be said clearly, and what we cannot talk about we must pass over in silence."
The SLax, DSL and Mepis boot successfully off the flash drive but the others fail, apparently their installer kept going to the CD/DVD drive to fetch the needed files. The Puppy and Systemrescue CD were booted to a limited version in text mode.
The menu.lst is identical to the DVD version in Post #1 with the exception of the addition of "root" statement which is not needed in a CD/DVD as it has no partition inside.
The red lines in the menu.lst are the only changes between the 7 iso booted between a DVD and a flash drive! Otherwise the same set of files has been used in the two different media.
The flash drive is a 8Gb USB memory stick partitioned as follow
Disk /dev/sdd: 8254 MB, 8254389760 bytes
255 heads, 63 sectors/track, 1003 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 1003 8056566 5 Extended
/dev/sdd5 1 61 489919+ 82 Linux swap
/dev/sdd6 62 426 2931831 83 Linux
/dev/sdd7 427 791 2931831 83 Linux
/dev/sdd8 792 913 979933+ 83 Linux
/dev/sdd9 914 1003 722893+ c W95 FAT32 (LBA)
I copy the content of the DVD, after mounting it on a loop back device, onto partition sdd6 formatted to ext2. The Grub is already in the /boot/grub of partition sdd6 and so I could make the flash drive bootable with a Grub prompt/Grub shell using commands
root (hd3, 5)
When the flash drive actually boots it has to be arranged in the BIos as the first bootable disk to become (hd0). I setup Grub in (hd3) only because in another Bios setting the flash drive was the 4th disk. The above "root (hd3, 5)"+"setup (hd3)" just uses the Grub in the 6th partition of the 4th disk and hard-code it into the MBR of (hd3) or the 4th disk.
I imagine you could. You would need the 3 copies of Windows in iso format, then mount them on the loopback and copy each into a separate directory. Then burn that directory. Then you get the arduous task of figuring out a way to have Grub boot them all.
Grub can boot several iso after they have been expanded and re-condensed into one big iso. Grub can do this to Linux because Grub is one of the Linux's designated boot loaders and able to find the kernel/initrd and load each one into the memory.
As a rule Grub cannot boot a MS system directly because it doesn't have a defined kernel structure as a Unix-like system. Thus Grub must boot a MS system indirectly by chainloading.
In chainloading Grub simply passes the control to a MS system boot loader. It is actually the MS system boot loader, like NTLDR, that boots the MS system. This is the case with booting from a hard disk. I am not sure if the same boot loader is used when it come to CD/DVD.
I suppose if M$ publishes the inner working of its boot loaders then the PC users can reconfigure several OS to boot them from one DVD.
VFS: Cannot open root device "<NULL>" or unknown-block(8,16)
Please append a correct "root=" boot option; here are the available parttions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,16)
## Puppy error
Kernel panic - not syncing: VFS: Unable to mount root fs on unkown-block(22,1)
Error 15: File no found
Press any key to continue...
live-initramfs will now start a shell. The error message was:
Unable to find a medium containing a live file system
live-initramfs will now start a shell. The error message was:
Unable to find a medium containing a live file system
/bin/sh: cant't access tty; job control turned off
Can't find INSERT filesystem, sorry.
Dropping you to a (very limited) shell.
Press reset button to quit.
RIP Linux works just fine, the other ones are giving me problems.
I tried to follow this guide to setup DSL, Puppy (the original) and plop linux (all needing to have the the root setting) and had success only with DSL (except for a seemingly harmless error message with vga setting). For puppy, the screen becomes blank right after the kernel is loaded, and though there is activity on the flash drive, that also dies after a few seconds. For plop, it goes all the way to text login prompt but fails to startup graphical system and the system hangs with a message such as "ubuntu is running in low-graphics mode ..... (EE) GARTInit: Unable to open /dev/agpgart (No such file or directory) (EE) pdrm[ drmOpen failed. (EE) intel(0): [dri] DRIScreenInit failed. Disabling DRI. (EE) intel(0): Failed to allocate framebuffer. Is you rVideoRAM set too low? (EE) intel(0): Couldn't allocate video memory" with an OK prompt, but by that the time the system is hung.
Your problem is specific to the distro and would happen if you burn it in its own CD.
When a distro is assembled together it will choose the video driver for your machine according to certain detections. A mismatch is common because you don't tell the distro what video card you have and leave the distro to detect it.
With Ubuntu you should be able to boot it in safe mode which cause the installer to select "vesa" driver for the video card.
Most distros do allow the user to try the safe video mode but some still don't provide this facility.