Results 1 to 10 of 59

Thread: How to install Ubuntu Edgy to USB, to boot from any USB bootable machine

Threaded View

  1. #1
    Join Date
    Jan 2005
    Location
    Minneapolis, MN
    Beans
    510
    Distro
    Xubuntu 11.10 Oneiric Ocelot

    How to install Ubuntu Edgy to USB, to boot from any USB bootable machine

    Robertar and I have been trying to get Edgy installed on an external USB HD for a few weeks and had no success. Hopefully this will work for some of you, or at least help.

    Normal install methods weren't working (ie. selecting the USB disk as the install target) because grub would get messed up when installed on the USB drive. Even once grub was installed 'correctly', it would only work on the original computer with the original hard disk configuration. These problems would result in grub errors 15 and 21 .

    The following procedure worked for us, and allowed us to boot on a variety of USB bootable machines. I'm not a grub or Linux expert, so some of my details may be slightly wrong. Please forgive me if they are.

    Installing Linux to an external HD
    ----------------------------------------

    Goal:
    To get Linux to install on an external HD and boot from it on any computer which has a 'boot from USB' BIOS option.

    Resources:
    * HP Compaq dc7600 desktop computer
    * Western Digital 80 Gb USB, bus powered, laptop hard drive
    -- Several other models have now been tested, all have worked, although some drives have required the use of the text based installed available on the alternative install CD.
    * Ubuntu Edgy (6.10) Desktop install CD -- this procedure won't work with 6.06!

    Procedure/Explanation:

    1) Remove all internal hard drives from the computer, or disable the internal hard drives in the BIOS.
    * Grub by default installs to the first hard drive detected by the BIOS. The simplest way to ensure that it installs correctly is to make sure that the only hard drive available is the install target drive.

    2) Connect the USB drive and boot from the Ubuntu CD.

    3) Run the Ubuntu installer
    * Just double-click the 'Install' icon on the desktop.

    3.1) When the installer is done, "Continue using the live CD"

    4) Mount the root partition of the newly installed Ubuntu
    * Run the Gnome Partition Editor (System-->Administration-->GNOME Partition Editor)
    * If running the Gnome Partition Editor doesn't mount the partition open a terminal and do the following:
    Code:
    # Create a directory: 
    mkdir newinstall
    # Mount your new root partition
    sudo mount /dev/sda1 newinstall
    5) On the new root partition, modify the GRUB config file to allow computer-independent booting.
    * It is named boot/GRUB/menu.lst
    * To edit it, open a terminal and type "gksudo gedit " then drag the file to the terminal, then hit return. This edits the file as the super user.
    * Find the line that says "kopt=root=UUID=(Long HEX number here) -- copy the portion from 'root' through the end of the HEX number
    * Find all instances of 'root=/dev/sda1' (where sda1 is the partition you installed to) and replace it with the 'root=....' string you just copied
    * Save and close the file

    5) On the new root partition, modify the GDM startup script to re-detect the graphics card at each login.
    * Edit the GDM (Gnome Desktop Manager) script. It is named etc/init.d/gdm
    * To edit it, open a terminal and type "gksudo gedit " then drag the file to the terminal, then hit return. This edits the file as the super user.
    * Add a blank line after the line that says "start)"
    * On this blank line, enter the text "dpkg-reconfigure -fnoninteractive --no-reload -phigh xserver-xorg" (with no quotes).
    * Save and close the file

    6) Shut down, and you should be set!


    Issues:

    All BIOSs aren't created equal. In the current configuration, GRUB needs to be on hd0. On some computers, selection USB from the BIOS boot menu, USB is made hd0, on others it is not.
    Solution: Set the boot order in the BIOS to be CDROM, USB, First HD
    Last edited by stuporglue; January 15th, 2007 at 05:57 PM. Reason: Updated for clarity and to reflect minor changes.
    My projects and ramblings: http://stuporglue.org
    http://www.mormon.org/bookofmormon -- Free Book of Mormon

Bookmarks

Posting Permissions

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