Linux.com

Author Message
Joined: Oct 12, 2008
Posts: 12
Other Topics
Posted Oct 15, 2008 at 2:05:26 PM
Subject: Loading on External Hard Drive

I am trying to load Linux on an external hard drive. I have been successful at loading it on there and then booting from it, but it will not boot on any other computer. How do I install Linux on a Drive that can be used on any computer?

Back to top Profile Email Website
Waxon
Joined Apr 02, 2008
Posts: 125

Other Topics
Posted: Oct 15, 2008 5:48:45 PM
Subject: Loading on External Hard Drive

Well, I'm pretty sure that the reason it won't boot is because the USB drive with the external HD isn't the first boot device on the other computers. You can change the boot order in the BIOS and that should allow you to then run the Linux OS on any computer so configured.

If it ain't broke, you aren't trying hard enough.

Back to top Profile Email Website
gigman7
Joined Oct 12, 2008
Posts: 12

Other Topics
Posted: Oct 15, 2008 6:05:08 PM
Subject: Loading on External Hard Drive

Quote Waxon:
Well, I'm pretty sure that the reason it won't boot is because the USB drive with the external HD isn't the first boot device on the other computers. You can change the boot order in the BIOS and that should allow you to then run the Linux OS on any computer so configured.

That is not the problem.

Back to top Profile Email Website
proopnarine

Joined Apr 03, 2008
Posts: 402
Location:San Francisco

Other Topics
Posted: Oct 16, 2008 3:37:07 AM
Subject: Loading on External Hard Drive

Is the boot loader on the external hard drive? It's possible that it was installed on the internal hard drive.

Take the red pill www.calacademy.org/blogs

Back to top Profile Email Website
gigman7
Joined Oct 12, 2008
Posts: 12

Other Topics
Posted: Oct 16, 2008 2:23:34 PM
Subject: Loading on External Hard Drive

Quote proopnarine:
Is the boot loader on the external hard drive? It's possible that it was installed on the internal hard drive.
That I do not know. How do I make sure? I'm installing Ubuntu.

Back to top Profile Email Website
tophandcwby
Joined Apr 10, 2008
Posts: 66

Other Topics
Posted: Oct 16, 2008 3:47:45 PM
Subject: Loading on External Hard Drive

The issue is more than likely with drivers. The initrd.img used to boot one machine maybe different than the initrd.img used on another in that it loads only the drivers for the machine it was made on. You can modify what drivers are loaded by the initrd.img. See the docs for mkinitrd or mkinitramfs.

Back to top Profile Email Website
gigman7
Joined Oct 12, 2008
Posts: 12

Other Topics
Posted: Oct 16, 2008 3:54:50 PM
Subject: Loading on External Hard Drive

I'm not sure what you are talking about on what I need to do. I am very new to Linux so I need more detailed instructions.

Back to top Profile Email Website
proopnarine

Joined Apr 03, 2008
Posts: 402
Location:San Francisco

Other Topics
Posted: Oct 17, 2008 2:58:33 AM
Subject: Loading on External Hard Drive

I think that tophandcwby is right. Your system was installed to boot the hardware of your specific machine, e.g. PCI controllers, video card, etc. If you move the drive to another machine with different hardware, the system will simply be unable to boot. If you'd like to move a Linux installation around, what you could do is to place a system on a USB stick and provide it with persistent memory/storage. For example, the Fedora project provides a way to do this using live-usbcreator.

Take the red pill www.calacademy.org/blogs

Back to top Profile Email Website
tophandcwby
Joined Apr 10, 2008
Posts: 66

Other Topics
Posted: Oct 17, 2008 9:36:04 PM
Subject: Loading on External Hard Drive

I am most familiar with how this works on debian. When the kernel boots, it doesn't necessarily have all the drivers it needs compiled into it, to boot the system. In the example of booting from an USB external HD it probably doesn't have the drivers available to mount the HD. To help with this there is a method available to help the kernel do this. It is the init ram disk (initrd). If you look at your grub menu.lst file, you'll see something like this:

title Debian GNU/Linux, kernel 2.6.18
root (hd0,1)
kernel /boot/vmlinuz-2.6.18 root=/dev/hda2 ro
initrd /boot/initrd.img-2.6.18
savedefault

The initrd entry tells the system which initrd to use. To see what is in it you can use cramfsck. If the initrd I wanted to see was initrd.img-2.6.18 then I would
$ cramfsck -x initrd-2.6.18_dir /boot/initrd-2.6.18

and the initrd would be expanded into the dir initrd-2.6.18_dir.

There are 2 sets of tools that I am aware of to create a initrd. They are mkinitrd and mkinitramfs. They are both good tools. You would need to look the docs over for both of them and design your initrd from there.

Back to top Profile Email Website
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya