LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-25-2008, 09:47 AM   #1
NIN-Master
LQ Newbie
 
Registered: May 2008
Distribution: Fedora core 9, Slax
Posts: 6

Rep: Reputation: 0
BootLoader cd to usb drives


ok so heres the problem, i have 2 usb drives with seperate distrubutions of linux (fedora, and slax) and im trying to make a cd that will allow me to simply plug in a usb drive and boot off of it on machines that dont support usb booting, iv searched a few places but havent found a way to do this with multible usb drives running different distros.

any help would be appreciated
 
Old 05-26-2008, 03:07 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Your CD will need:
1. the initrd and kernel images of every distro you want to boot from HD
2. a startup script (in every initrd) which mounts the usb storage drivers, enumerates the HDs, and checks each HD to see if that is the one with the appropriate 'root' filesystem

Now if the script in [2] finds the right HD, then it can mount the HD partition as 'root'. If it doesn't find the HD, it needs to leave 'initrd' as root and at least drop you into a system that has enough functionality available for you to poke around and find out what's going on.

As you can probably imagine, this can be a nuisance at times because changing the kernel on each HD means you need to rebuild the initrd and CD.

The CD can never boot directly to a USB HD if the BIOS does not support USB booting. The reason is that the BIOS needs to provide the initial access to load the kernel and initrd (if you use initrd). So no BIOS support = effectively no HD to boot from. To be able to access the USB HD, you need an initialized kernel with the proper drivers booted - that is why your CD needs those initrd images - from there you mount the USB HD and finally 'chroot' to the final (r/w) root system. There are many good things about this approach anyway - for example, the system running under initrd can run fsck on the final root partition before mounting it.

By the way, there is no need for multiple USB HDs - you can have as many distros as you want on the one HD (even share directories such as 'home' if you want) - this really has insignificant effect on how you prepare your boot CD.


If that all sounds like ancient Arameic (or Sanskrit, Minoan, etc) then the answer is:
Unfortunately, the best preparation for what you want to do is to go build your own system from scratch (see http://www.linuxfromscratch.org). Then take apart the *.iso image from a suitable distribution (Debian is OK for this) and study the entire bootup process from the "init" program on to the mounting of the final filesystem. When you've done all that, then it's pretty easy to see how to do what you want. Unless you have a lot of free time and really love doing this stuff, give yourself about 3 months to get up to the level of expertise needed to do what you want.

No 'quick' answers for this one; this is kind of like asking 'how do we put someone on the moon and get them back alive?'
 
Old 05-26-2008, 09:23 AM   #3
NIN-Master
LQ Newbie
 
Registered: May 2008
Distribution: Fedora core 9, Slax
Posts: 6

Original Poster
Rep: Reputation: 0
well the only reason im using (now 3) multible drives, is because each one is taking most of my 1 gig of space, so i cant fit them all on to one drive, ill probably get a bigger drive that i can partition out to my current setup on the 3 drives, however right now this method seems to work just fine.... well if the computer can usb boot that is....

thanks for the help, i guess i was kinda hoping that i could get a boot loader to load a boot loader to boot the drive *shrugs* but that was kind of a long shot to begin with, ill go with what you have and start compiling that disk

Edit: probably should have mentioned that these are thumb drives, not full blown hard drives, thus the 1 gig of space max

Last edited by NIN-Master; 05-26-2008 at 09:38 AM.
 
Old 05-27-2008, 06:56 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Here is the ticket.

A full installation from a USB drive would not work because you can have only one Linux root directory system inside a CD. In other word there is no separate partition in a CD or DVD. Therefore the best way is to get the different iso files onto the same DVD disc.
 
Old 05-27-2008, 07:18 PM   #5
NIN-Master
LQ Newbie
 
Registered: May 2008
Distribution: Fedora core 9, Slax
Posts: 6

Original Poster
Rep: Reputation: 0
one word.... persistence.... some distros allow you to save your state to a usb thumb/pen drive however not all

although I'm working on getting the usb drivers loaded ... for some reason it isn't working right in my virtual box machine...

though it could be because I'm doing something wrong, which wouldn't be much of a surprise...

Last edited by NIN-Master; 05-27-2008 at 07:22 PM.
 
  


Reply

Tags
boot loader, cd, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two hard drives - two OS's - one big bootloader prolbem epsilon72 Linux - General 5 03-13-2007 11:16 AM
need bootloader ONLY on USB brimbleshoes Linux - Newbie 1 06-15-2006 07:02 AM
Any problems with USB-port PCMCIA cards and USB Floppy Drives? DreameR-X Linux - Laptop and Netbook 9 05-14-2005 01:37 PM
udev, USB Flash Drives, and usb-mount talkingwires Debian 13 11-07-2004 12:15 PM
Give user permission to mount/use cdrom drives or usb drives zwyrbla Linux - Newbie 2 08-23-2004 04:30 PM


All times are GMT -5. The time now is 08:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration