Find the answer to your Linux question:
Results 1 to 7 of 7
Is it possible to install Linux on an USB external hardrive? If so, will I be able to partition it....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    34

    Linux on an external drive


    Is it possible to install Linux on an USB external hardrive? If so, will I be able to partition it.

  2. #2
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    Yes you can. I don't think all distros can, but many can.

  3. #3
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    i've personally never tried it but i've found some info on it, so i'm sure it can be done

    A detailed response of what you're looking for

  4. #4
    Just Joined!
    Join Date
    Nov 2005
    Posts
    34
    Thanks to both, that link was very helpful.

    Now, will an external drive be much slower than an internal?

  5. #5
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,879
    I wrote a short tutorial on exactly how to do USB boot of Fedora Core a short while ago. I've posted it a couple of times on here in the newbie section, a quick search should turn it up. It was based on other posts I'd read on here, and it worked like magic, even when I had to do a reinstall. The basic principles should work on other distros too!

    As far as speed goes - you're right, USB (even USB2) is much slower than booting from an internal hard disk, but once the system is up and running it's hard to tell the difference unless you're running something that does a lot of disk access.
    Linux user #126863 - see http://linuxcounter.net/

  6. #6
    Just Joined!
    Join Date
    Nov 2005
    Posts
    34
    Quote Originally Posted by Roxoff
    I wrote a short tutorial on exactly how to do USB boot of Fedora Core a short while ago. I've posted it a couple of times on here in the newbie section, a quick search should turn it up. It was based on other posts I'd read on here, and it worked like magic, even when I had to do a reinstall. The basic principles should work on other distros too!

    As far as speed goes - you're right, USB (even USB2) is much slower than booting from an internal hard disk, but once the system is up and running it's hard to tell the difference unless you're running something that does a lot of disk access.
    Thanks man, i'll search for that.

    I already have three hardrives in my case, and a fourth one would really limit proper airflow!

  7. #7
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,879
    Quote Originally Posted by Glass Casket
    Thanks man, i'll search for that.

    I already have three hardrives in my case, and a fourth one would really limit proper airflow!
    I have a copy of it here at work, so here it is in all its glory:

    Before you start, make sure your pc will boot off the USB drive - this is a bios setting, turn on the PC with the drive already attached and see if the bios gives the option to boot from it. If all is working, proceed as follows:

    Install FC4 using the 'linux expert' command line boot option, the USB drive appears as /dev/sda, so partition and install to that drive. When asked, make sure that grub is installed to the boot sector of the USB drive. This is very important.

    Once the system is in, boot up off the rescue CD, dont bother getting it to try and find your linux system, skip that stage and go to the command line. Now mount the / partition on /mnt/system (or whatever mount point it gives you) and the /boot partition on /mnt/system/boot.

    Use chroot to change the root to /mnt/system (or wherever you mounted your drives to) and cd to /boot.

    now issue the following command:

    mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod /boot/[initrdname]-usb.img [kernel-no., as per the kernel you're loading, e.g. 2.6.12-...FC4]

    the initrdname should be the same as the kernel, so you can identify it if you upgrade the kernel later - take a look at the existing .img file so you get a good idea what to call it. The kernel number is the same as the kernel you're loading, for instance my kernel filename might be 'vmlinuz-2.6.11-1.1369_FC4', so i'd put '2.6.11-1.1369_FC4' in this field.

    Edit /boot/grub/grub.conf and make sure the entry for the kernel you're going to be booting uses the new ...-usb.img file not the original img file.

    reboot the computer off the USB drive and check that everything works.

    You'll need to repeat this each time you upgrade the kernel, but you dont need to use the rescue disk every time. After your yum or apt update, just cd back to the /boot directory and start from the mkinitrd command with the new kernel info, update grub and reboot.

    And there you have it, a fully working USB boot! I keep a brief reminder of these instructions in a text file in my /boot partition, just so I dont forget how to do it on the infrequent occasions that the kernel is updated.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •