How about on a USB stick?
I am interested in using your technique to load multiple Live CDs onto individual partitions on a USB memory stick and use the simple GRUB chainloader to decide which to start. This would mostly be for demonstrating various Linux distros, and for troubleshooting and recovering borked computers. The keychain Swiss Army Knife for computers.
The challenge for me is in how to get the Live CDs installed into a partition so that it includes its own bootloader. The CDs normally uses isolinux. I need to change to extlinux when I copy the files to the USB stick partitions, then change the various file and directory names from isolinux to extlinux. It should work, but I am still having trouble getting the extlinux installation correct.
I am trying to install the Ubuntu Live CD into the fifth partition of my USB stick. I copied all the files, changed the names to extlinux, installed extlinux, set the boot flag on the partition in order to test it, but it doesn't boot. I just get "boot error".
Once I get it to boot correctly from its partition, I will change the boot flag back to the first partition where I have GRUB and boot it using the chainloader command.
On my 8Gb USB stick, I plan to use the first 2Gb for a data only (FAT) partition. I have Puppy Linux installed in the next partition, and it is working fine with the GRUB chainloader. The next partition is the System Rescue CD, and I can't get chainloader working yet. The next partition is the Ubuntu Live CD, and chainloader isn't working yet there either.
Since Puppy is an actual full install, it installed its own extlinux bootloader, so it worked fine. Since I am copying files from bootable CDs into the respective partitions for the next two, I have to manually get extlinux working on them. I seem to be missing something, probably related to the partition's boot sectors, but I'm still working on it.
Thanks for the great thread! I'm a Linux Newbie and learning a lot!
>>>> Clay >>>>
Logical partitions on USB stick
I've hit a snag in my project. I have an 8Gb USB memory stick and I have one FAT partition of 2GB for shared data and GRUB. Then I have multiple ext2 partitions for loading various Linux distro "Live CDs", utility disks, and some full installs of small distros. I want a fully bootable install of each in its own partition, so that I can use your chainloader scheme to start any of them from one GRUB menu.
The plan is working fine with Puppy Linux in Partition #2 and System Rescue CD in Partition #3. I converted the ISOLINUX from the Live CD to EXTLINUX on the USB partition. These two both work fine with the GRUB chainloader. It is after that where I run into trouble.
Partition #4 is the Extended partition that houses the Logical partitions, #5, #6, #7, #8, etc. When I use the same EXTLINUX method to load a Live CD (Ubuntu, for example) into one of these Logical partitions, it refuses to boot from the GRUB chainloader. I can put a full stanza into GRUB (title, root, kernel, initrd) and they will then boot up just fine. But when I try to use the chainloader, I just get a "Boot error" with no error code or other information.
The reason that I wanted to use the chainloader command is partly for consistency, and partly because on some Live CDs, I have not been able to figure out what to put into the full GRUB stanza to get it to boot correctly. Take Ultimate Boot CD for example, I can't find a description anywhere of what would go into a GRUB menu to start that CD.
It seems like the EXTLINUX should boot from the GRUB chainloader, but it is only working for me in the two Primary Partitions (#2 and #3), not in any of the Logical Partitions. Since you are clearly using the chainloader command to boot from many Logical Partitions on your hard disks, I was hoping that you might be able to give me a clue as to where to look for a solution on my USB stick drive.
Thanks,
Employing your scheme on a USB Flashdrive!
First of all, I am so glad that i stumbled upon your posts Saikee. I have become an instant fan of your posts and you are a celebrity in my world. Your instructions are clear and precise. I am pretty new to linux but am so deeply in love with it that I am posting this at 4:30am in the morning... lol... I go crazy about linux...
Anyhow, the problem:
I wish to create a bootable USB flash drive with dual/triple boot with various small distros such as DSL, Knoppix, INSERT.
So I took a 512MB Kingston SD Card, shoved it in a USB card reader and deleted whatever partition was there by default.
Using fdisk, i created two primary partitions for now. The first partition (sdb1), 10MB in size is FAT16, the second partition (sdb2), 60MB in size (for DSL) is ext3. The remaining space is empty for now.
I love your scheme of installing grub into it's own partition, hence I made the Fat16 partition.
I created /boot/grub dir structure in /dev/sdb1 and copied all the files from /usr/share/grub/i386-redhat/ into /boot/grub/
Then on my Centos system, I typed:
grub
root (hd1,0)
setup (hd1)
quit
Now, when I plug this USB into my thinkpad and boot from USB, I get the grub prompt. So far it's all good.
Next, I copy the 'boot' dir and 'KNOPPIX' dir that reside inside the dsl-4.4.10.iso image into /dev/sdb2 (the 60MB ext3 partition).
On /dev/sdb1, i create a menu.lst under /boot/grub/ and type this inside this file:
title Damn Small Linux
root (hd1,1)
chainloader +1
Save, exit, plug this USB into thinkpad and boot from USB, i still get the grub prompt. Shouldn't it show me the menu, or since there is only one item in menu.lst, boot directly into DSL. What am I doing wrong?
Thanks a lot in advance.
P.S. My Linux System is a Centos 5.2 running as a Virtual Machine on XP Host (VMware Workstation). Intel Core 2 Duo E8400, 4GB RAM.
Problem with booting Linux Mint 8
Hello saikee,
i have read the most of the postings in this thread but found no solution for my problem with Linux Mint 8...
My USB disk structure is:
Code:
Device Part.Type Format Label Marks
/dev/sdc1 primary fat32 boot boot
/dev/sdc2 extended
/dev/sdc5 logical linux-swap
/dev/sdc6 logical ext2 Dream
/dev/sdc7 logical ext2 Arcade
/dev/sdc8 logical ext2 Mint
/dev/sdc9 logical ext2 Sabyon
/dev/sdc3 primary fat32 HOME
First i installed DreamLinux 3.5 Gnome in /dev/sdc6 with grub in MBR and via terminal in /dev/sdc6 and copied the boot folder from /dev/sdc6 to /dev/sdc1.
Seccond i installed Linux Mint 8 Helena and its grub in /dev/sdc8.
The menu.lst on /dev/sdc1:
Code:
color red/black red/light-gray
title This is the frequently use Linux booting menu
boot
title DreamLinux @ sda6
root (hd0,5)
chainloader +1
title Puppeee Arcade @ sda7
root (hd0,6)
chainloader +1
title Linux Mint @ sda8 via chainloader
root (hd0,7)
chainloader +1
title Linux Mint @ sda8 via core.img
root (hd0,7)
kernel /boot/grub/core.img
savedefault
boot
title Sabayon Linux @ sda9
root (hd0,8)
chainloader +1
If i select DreamLinux it boots the DreamLinux menu and from there it boots DL like it should.
If i select "Linux Mint @ sda8 via chainloader" grub tells me:
Code:
Error 13: Ivalid or unsupported executable format
Press any key to continue...
If i select "Linux Mint @ sda8 via core.img" grub tells me:
Code:
, bss=0x0
Error 15: File not found
Press any key to continue...
Linux Mint 8 Helena uses /boot/grub/grub.cfg as boot meu seems it uses grub2...
Can you help me?
Greetings from Germany
Luemmel