LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to install on external hard drive then boot from any computer? (https://www.linuxquestions.org/questions/linux-general-1/how-to-install-on-external-hard-drive-then-boot-from-any-computer-645998/)

Mr_Shameless 05-31-2008 02:03 AM

how to install on external hard drive then boot from any computer?
 
Hi,

I had a look around this forum but haven't found any entry that answers to my problem. I'm sorry if this has already been explained before.

My goal:
  • I have an external hard disk and want to install linux on a portion of it, then i can use this drive to boot from any computer.
  • It doesn't need to have a comprehensive set of wizards like Ubuntus or PCLinuxOS. For example, i can just boot into the command line then from there type
    Code:

    Xorg -configure
    to configure xorg, then startx.

What i did:
  • I installed archlinux 2008.7 into my external hard drive, setting 20G for the root partition, 5G for the /home partition, and 1G for swap.
  • At the end of the installation, i installed GRUB to the external hdd's master boot record. The disk was recognized as /dev/sdb on my computer.

What i got when booting from the drive:
  • The computer could boot from my external HDD and load GRUB. But when i chose Arch from the list, it said "Failed to mount device"

Can any one help me solve this, or point me to some tutorials?

Btw, in GRUB's menu.lst, my booting partition was called (hd1,0). This won't work if I plug my HDD to other computers, will it?

Thank you very much :)

stress_junkie 05-31-2008 10:03 AM

The GRUB boot record probably has the wrong device. When you installed Linux on the external har drive the machine saw the drive as /dev/sda. If you had booted GRUB from your internal hard disk in interactive mode and used GRUB commands to list the hard drives then the external hard disk would probably have shown up as HD1. This is probably what is in the GRUB boot specification on the external hard drive. However, when you boot from that drive GRUB sees that drive as HD0. Therefore when it is looking for menu.lst on HD1 it is looking at the wrong disk.

I think that's the way it works. I don't play with GRUB in interactive mode very often. I have found that when running GRUB in interactive mode I use the geometry command to list visible boot devices and I use the find command to find the menu.lst file or the Linux kernel.

Either that or GRUB doesn't have a device driver to read the external hard drive.

Several of the larger distributions have step by step instructions for installing Linux on an external, removeable, bootable drive. Try the documentation for your distribution. If that doesn't work try the Gentoo documentation or the Debian documentation.


All times are GMT -5. The time now is 01:34 PM.