Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Is there any way to install Ubuntu to USB / thumb drive ?

  1. #1
    wpshooter is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Virginia, USA
    Beans
    3,581
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Is there any way to install Ubuntu to USB / thumb drive ?

    Is there any way to install Ubuntu to a USB / thumb drive ?

    I am not asking about putting the Ubuntu image on the USB for a LIVE version but actually INSTALLING (just like you do on a computer internal hard drive) with /root /home & swap partitions.

    I have tried this a number of ways and none have so far been successfully.

    One of the problems that I am running into is that once the installation is completed to the USB, I get an error message saying that it can NOT install the bootloader to the USB drive.

    Is there a way to do a complete installation to a USB key drive just like you would to a hard drive ?

    Thanks.

  2. #2
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    See if this post can somehow point you in a good direction.

    Edit: Also, you might want to take a look at isostick
    Last edited by slickymaster; June 12th, 2013 at 05:23 PM.

  3. #3
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    It is just like any install to a second drive or external drive. You do have to use manual install and specify to install grub2's boot loader to the MBR of the external drive if a BIOS boot system. If UEFI then you need gpt partitioning and an efi partition to be first.

    Install to external drive. Also any second drive.
    Installer version has not changed much so still a good guide except I do not recommend the separate /boot for most systems. Older systems may need it. And some with very large / (root) partitions. BIOS/MBR not for UEFI
    http://www.linuxbsdos.com/2012/07/23...2-hard-drives/
    Installing Ubuntu in Hard Disk Two (or more) internal or external Lots of detail - now alternative (text based) installer which is not available on newest versions.
    Different versions have slight difference in install screens but process is the same. And gui versions are not really a lot different.
    http://members.iinet.net.au/~herman546/p24.html
    p24/041.png Shows combo box to select where to install the grub2 boot loader.
    Where Do You Want To Install GNU/GRUB boot loader?
    http://members.iinet.net.au/~herman546/p24/041.png

    If you have installed to a flash drive, run the BootInfo report and post link.

    Post the link to the BootInfo report that this creates. Is part of Boot-Repair:
    https://help.ubuntu.com/community/Boot-Info
    Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:
    https://help.ubuntu.com/community/Boot-Repair
    You can repair many boot issues with this or 'Create BootInfo' report (Other Options) & post the link it creates, so we can see your exact configuration and diagnose advanced problems.
    LighterWeight (Lubuntu based) Boot-RepairCD
    http://sourceforge.net/projects/boot-repair-cd/files/
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #4
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,449
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    Following is step by step how to install 12.04 on a 8GB flash drive, 13.04 is similar.

    Turn off and unplug the computer. (See note at bottom)
    Remove the side from the case.
    Unplug the power cable from the hard drive.
    Plug the computer back in.
    Insert the flash drive.
    Insert the Live CD or Live USB.
    Start the computer, the CD/USB should boot.
    Select language.
    Select install Ubuntu.
    Select Download updates while installing and Select Install this third-party software.
    Continue
    At "Installation type" select "Something else".
    Continue
    Confirm Device is correct.
    Select "New Partition Table"
    Click Continue on the drop down.

    (Optional partition for use on Windows machine)
    Click "Free space" and "Add".
    Select "Primary".
    Make "New partition size..." about 1000 megabytes.
    Location = Beginning.
    "Use as:" = "FAT32 file system".
    And "Mount point" = /windows.
    Select "OK"

    Click "free space" and then "Add".
    Select "Primary", "New partition size ..." = 4500 to 6000 megabytes, Beginning, Ext4, and Mount point = "/" then OK.

    (Optional home partition)
    Click "free space" and then "Add".
    Select "Primary", "New partition size ..." = 1000 to 4000 megabytes, Beginning, Ext2, and Mount point = "/home" then OK.
    (Optional swap space, allows hibernation)

    Click "free space" and then "Add".
    Select "Primary", "New partition size ..." = remaining space, (1000 to 2000 megabytes, or same size as RAM), Beginning and "Use as" = "swap area" then OK.

    (Important)
    Confirm "Device for boot loader installation" points to the USB drive. Default should be ok if HDD was unplugged.
    Click "Install Now".

    Select your location.
    Continue.
    Select Keyboard layout.
    Continue.
    Insert your name, username, password, computer name and select if you want to log in automatically or require a password.
    Selecting "Encrypt my home folder" is a good option if you are worried about loosing your USB drive.
    Select Continue.
    Wait until install is complete.
    Turn off computer and plug in the HDD.
    Stick the side panel back on.

    Note:
    You may omit disabling the hard drive if after partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Be cautious, many people have overwritten the HDD MBR.
    You may do an update-grub later.

  5. #5
    wpshooter is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Virginia, USA
    Beans
    3,581
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    I discovered that the problem with the bootloader not being able to be installed was the fact that apparently you have to make a separate /boot partition on the USB thumb drive for it to be installed into and point to that /boot partition (whereas you do NOT have to do this when installing to an internal hard drive because the hard drive apparently already has provisions for the bootloader) !!!

    However, unfortunately, even after the "APPARENTLY" completely sucessfully installing to the USB thumb drive, when I tried re-booting to USB, it would not boot to it (yes, I had BIOS set correctly), just went to a blank screen after BIOS displays and would never come to the desktop.

    Back to the drawingboard.
    Last edited by wpshooter; June 13th, 2013 at 06:58 PM.

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    I have a full install in a flash drive and do not have a separate /boot.

    Some large external hard drives need a /boot inside the first 100GB or a smaller / (root) fully inside the first 100GB and the rest of the drive as /home or data partitions.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    May 2013
    Location
    Crossville, TN. USA
    Beans
    174
    Distro
    Ubuntu Gnome 13.10 Saucy Salamander

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    If you're wanting to install Ubuntu on a USB drive so you can take it with you and boot off of it on other machines then you can either use UNetbootin or Startup Disk Creator. I've had more luck with Startup Disk Creator in making bootable USB's then I have with UNetbootin although I can only use UNetbootin to make USB drives with small iso's like CorePlus or Damnsmall, Startup Disk Creator won't see them for somereason.
    Either way I like being able to take a familiar Op System with me to use on other computers that I may have to use.
    "Gentlemen, you can't fight in here! This is the War Room!"

  8. #8
    Join Date
    Mar 2011
    Beans
    1,994

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    As Oldfred indicated, full USB install used to be nothing special, no need for /boot, swap, etc. Install the bootloader to the target device and enter your password when asked. Maybe you have another issue?

    UEFI/Secure boot machines have special requirements for booting, which a full install to USB must handle.

    You need to decide how you are going to use the USB:
    1) Booting on non-UEFI machines
    a) msdos partitioning takes an MBR bootloader (the legacy way).
    b) gpt partitioning requres a grub-boot partition (never tried this)
    2) Booting on non-secure boot UEFI, need a bootable, FAT32, efi partition
    containing a copy of nonsigned grubx64.efi as file /EFI/Boot/bootx64.efi,
    and file /EFI/ubuntu/grub.cfg (never tried this).
    3) Secure boot machines need shim.efi copy as file /EFI/Boot/bootx64.efi
    as well as the signed grubx64.efi in /EFI/Boot. grub.cfg should be
    located at /EFI/ubuntu/grub.cfg (Works on machines following the UEFI spec).
    4) Boots anywhere like the live media, use msdos partitioning for an
    MBR bootloader, have a bootable FAT32 efi partition set up like the secure
    boot, but not sure how a non-secure boot EFI boot works. As TNFrank
    says, the live media is hard to beat for portability. Fix the UEFI persistence
    problem (bug 1159016) yourself, and if you really need more than 4G,
    use a partition labeled "casper-rw"

    The UEFI install problem is that the install allows you to specify the "boot" device, but that really only works for installing the MBR. When run on an UEFI secure boot machine, and installing to a USB meant to be run on a secure boot machine, the hard disk's EFI partition is mounted on the target
    (/target/boot/efi) instead of the target's efi partition.
    This leaves the USB efi partition empty, and unbootable. Either you fix this empty partition manually (It's really simple), or run the install from the "Try" desktop icon, and have a terminal handy to quickly unmount the hard disk's efi partition and mount the target's.

    Removable media ESP -- bootable FAT 32 EFI Partition (250M)
    (Skipping the Windows files)
    /EFI/Boot/bootx64.efi -- this the bootloader used, so make it a copy of shimx64.efi for secure boot, otherwise a copy of unsigned grubx64.efi
    /EFI/Boot/grubx64.efi -- When bootx64.efi is a copy of shimx64.efi, put the signed grubx64.efi in the same directory.
    /EFI/ubuntu/grub.cfg -- The grub file.

  9. #9
    wpshooter is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Virginia, USA
    Beans
    3,581
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    Quote Originally Posted by TNFrank View Post
    If you're wanting to install Ubuntu on a USB drive so you can take it with you and boot off of it on other machines then you can either use UNetbootin or Startup Disk Creator. I've had more luck with Startup Disk Creator in making bootable USB's then I have with UNetbootin although I can only use UNetbootin to make USB drives with small iso's like CorePlus or Damnsmall, Startup Disk Creator won't see them for somereason.
    Either way I like being able to take a familiar Op System with me to use on other computers that I may have to use.
    My understanding is that the programs that you mention do not INSTALL OS to the USB drive but instead only burn the ISO image to the USB drive, which you can then boot to (i.e. LIVE boot version) but it is NOT the same as doing an INSTALL to a hard drive which can subsequently have all of the available updates applied to it and also has the capability to save user data to the /home partition so that it can be available to the user on subsequent boots. I have tried both of the ones you mention and also others and none of them so far will make a bootable INSTALL of the OS to a thumb drive, make a LIVE boot version with the image YES, no problem, but it is a no go for INSTALLING.

    How do you INSTALL the OS to a USB thumb drive. It would seem like that this would be a fairly straight forward task but it sure is NOT turning out that way for me ?

    Thanks.

  10. #10
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,449
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Is there any way to install Ubuntu to USB / thumb drive ?

    See post 4 above for a step by step on installing to USB.

Page 1 of 2 12 LastLast

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
  •