Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
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.
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
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
The "boot loader" for Linux cd / DVD's is usually "isolinux"
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.