LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ISO boot loader for CD/DVD? (https://www.linuxquestions.org/questions/linux-software-2/iso-boot-loader-for-cd-dvd-656785/)

Sarke 07-19-2008 02:01 AM

ISO boot loader for CD/DVD?
 
Hi all, I'm trying to find some software that would do what I want and I can't seem to find it. It's quite simple really, and I think it would be so useful that someone would have already made it.

Basically, I want to be able to throw a few bootable ISOs onto a disc and then when I put that disc in and start the computer it would give me a menu allowing me to choose which image to boot.

I know there are ways of extracting the ISO images and then combining them into one ISO using a common boot loader (replacing the images' regular ones), but that doesn't work on some images (such as non-Linux). I simply want to keep them in ISO format on the disc and hand it over to their natural boot process.

Any ideas?

pinniped 07-19-2008 03:11 AM

There is certainly no easy way to do it, and I don't even know of a currently existing way.

There are quite a few problems: once a program (say Linux) loads the bootloader from the *.iso image, that bootloader has to have some mechanism to read the kernel from the iso image - so let's say that's HACK#1 that you need to make to the Linux kernel - either some mechanism to chain to the next bootloader or else a complete replacement for that bootloader.

Now let's say the kernel is loaded - now it needs to read that *.iso file as if it were just reading a normal CDROM; otherwise the boot will fail. OK, how do you do that? It may be possible if you modify Linux to act like a 'hypervisor' - so that's HACK#2.

There is another problem that comes up with x86-based machines: the bootloaders usually start up in "real mode" on the x86; when a kernel like Linux boots, the initialization phase starts out by switching to "virtual mode" and the BIOS calls are not available to the bootloader when the processor is in this mode. So you need HACK#3 - trap the BIOS calls - hmm, you need to do that as part of HACK#2 anyway, but in addition, provide all other BIOS calls like keyboard and mouse data.

I'd say the best bet is to write your own minimal operating system to do just this job; it won't be trivial because it's got to be able to decipher that *.iso file and restrict the other kernel's memory use so that it doesn't whack the memory that you're using. Other challenges include:
- how do you destroy your magic kernel and recover memory after the next kernel has loaded?
- how do you continue operating when the next kernel switches to "virtual" mode? I suspect you can discover that by understanding existing hypervisors.

resetreset 07-19-2008 04:01 AM

ok first of all, cant you try the first one? see whether grub can be put on a CD, i really dont see why not. secondly you cant keep er, two ISOs on one disc :) as in 2 .iso files - when you write a ISO file to disc it's actually FILES that get written, like eg. /etc/passwd or /home/misterb.

knudfl 07-19-2008 08:17 AM

The "boot loader" for Linux cd / DVD's is usually "isolinux"

If you can create a "initrd" usable for the 'non - linux' stuff
it could be feasible. Multi boot DVD .... :
http://www.linuxquestions.org/questi...ne-dvd-656600/

Regards

pinniped 07-19-2008 09:10 AM

Quote:

Originally Posted by knudfl (Post 3219833)
The "boot loader" for Linux cd / DVD's is usually "isolinux"

If you can create a "initrd" usable for the 'non - linux' stuff
it could be feasible. Multi boot DVD .... :
http://www.linuxquestions.org/questi...ne-dvd-656600/

Regards

Well, if all the systems were Linux, then it is actually quite trivial, but the original question as I read it was 'how do I boot from ANY *.iso FILE, including non-Linux (WinDuhs? BSD? Solaris?). So I imagine the top directory would look something like this:
linux-distro-A.iso
linux-distro-B.iso
WinDuhs-VisDuh.iso
OpenSolaris10.iso

Rather than:
initrd-linux-A
vmlinuz-A
initrd-linux-B
vmlinuz-B
initrd-linux-C
vmlinuz-C

Sarke 07-19-2008 01:36 PM

Quote:

Originally Posted by resetreset (Post 3219671)
ok first of all, cant you try the first one? see whether grub can be put on a CD, i really dont see why not. secondly you cant keep er, two ISOs on one disc :) as in 2 .iso files - when you write a ISO file to disc it's actually FILES that get written, like eg. /etc/passwd or /home/misterb.

Sorry, you've misunderstood. I want to keep the ISOs as ISOs on the disc. Basically burning them as image files instead of burning the files from the images. (A bit confusing I know).

pinniped's second post (post #5) is exactly what I'm talking about.


Quote:

Originally Posted by knudfl (Post 3219833)
The "boot loader" for Linux cd / DVD's is usually "isolinux"

If you can create a "initrd" usable for the 'non - linux' stuff
it could be feasible. Multi boot DVD .... :
http://www.linuxquestions.org/questi...ne-dvd-656600/

Regards

Hmmm... that looks like what I need, thank knudfl. This page at least promises to do it:
http://www.magiciso.com/tutorials/mi...ultibootcd.htm

I'll give that a try and then report back.

For future reference, I also found these links that are related:

http://oth3rsid3.blogspot.com/2007/1...-part-iii.html
(Linux only) http://justlinux.com/forum/showthrea...hreadid=150078
(Linux only) http://code.google.com/p/boot-dvd/

kaafree 02-09-2009 04:59 PM

Sarke, got any luck with that ? I am now trying to realize the same approach on USB stick. I have 3 Acer Aspire One netbooks at home, each with different distro (Fedora for me, Ubuntu netbook remix for son and original Linpus for wife), which is hell in case of recovery. Plus, reflashing BIOS requires FreeDOS. So, my idea was to have universal USB stick with different ISOs and some kind of bootloader that would do the job.

However, after googleing here and there I came to the conclusion it is easier to unpack squashfs files to separate folders (/DistroX) while keeping initrds&vmlinuzes in /boot/DistroX folders. Will try to test it this week, but any advise is welcomed.


All times are GMT -5. The time now is 10:57 AM.