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

Thread: install Grub2 and full install of Ubuntu onto usb flashdrive

  1. #1
    Join Date
    Feb 2013
    Beans
    5

    install Grub2 and full install of Ubuntu onto usb flashdrive

    Hello, as the title indicates, i would like to make a full install of Ubuntu (most likely gonna use Quantal for now) and Grub2 on a flashdrive. I am using a PNY 16GB flashdrive which I have been using as a persistance LiveDisk, but I wanna try doing a full install on the drive, mostly just to learn how

    I have searched around a bit but have found mostly a bunch of dead ends, such as this one which has a section for how to do just this, but it has a dead link to an external source https://help.ubuntu.com/community/In...n/FromUSBStick

    Could anyone give me the most straightforward least complicated way to do this? Or even just post a link to where that might be located in case I over looked it. (I am not the best searcher sometimes lol) I currently have a LiveCD and am also running Vista so I can use whichever is easier, which I'm guessing will probably be the LiveCD.

    Thank you for any help you might provide

  2. #2
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    3,367

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    You will need your current 16gb flashdrive with the live environment (and installer), and another one to install the regular Ubuntu onto. Or, make another installer on DVD or another USB, and reuse your 16gb flashdrive for the regular Ubuntu.

    Copy of a student activity that does this:

    Note: Does not use UEFI. If you are using that, sorry.

    Computer Lab Activity:

    Installation of Lubuntu 13.04 to USB Flash Drive
    Using Lubuntu 13.04 installer and Lubuntu 13.04 live session


    (If you are installing Xubuntu or Ubuntu, they use the same installer, so the steps here should still be usable. Use the dash to find gparted in Ubuntu).

    Before beginning, you need:
    1) USB flash drive to be used for the installation. Suggested size 8gb or more.
    2) Standard Lubuntu Installer, made either as CD/DVD or USB.

    Steps:

    Boot the computer from installer on usb flash drive (or cd/dvd) into live session.
    Insert flash drive to be used for installation into USB port of computer.

    Live Session of Lubuntu -
    a) Prepare the USB flash drive for the installation

    Start gparted partition editor: From Application Menu: System Tools > gparted
    In the gparted program window:
    In upper right: select the device name of the usb flash drive (probably /dev/sdb if your installer is a dvd, or /dev/sdc if your installer is another usb)
    Unmount any mounted partitions on the flash drive: select the partition, then from the menu, Partition > unmount
    Repeat for any other mounted partitions.
    Create a Partition Table on the Flash Drive:
    Menu: Device > create partition table.
    Use the default (MS-DOS partition table) – click on Apply
    All space is now shown as unallocated.
    Create a New Primary Partition
    Select (left-click) the unallocated space.
    Menu: Partition > new
    Leave “Free Space preceding” as is.
    New size (MiB) = initially shows maximum size; subtract 1000 for each gB of RAM on your computer, and edit the value shown. This will be allocated later for linux swap
    Leave “Free Space following” as is.
    Create as: primary partition
    File system: ext4
    Label: leave blank for now.
    Click add.
    Create the Swap Partition
    Left-click to select the unallocated space.
    Menu: partition > new
    Leave “Free Space preceding” as is.
    Size: (leave as is)
    Create as: primary partition
    File system: linux-swap
    Label: leave blank
    Click add.
    Click the check mark on the tool bar (apply all operations)
    In the popup dialog, click on “Apply”
    Wait while partitions are created, then close the dialog.
    Close gparted.
    Preparation complete, ready to install.

    b) Installing
    Start the installer from the desktop icon.
    Language: Choose your language, then Continue
    Preparing to Install Window: Mark “Install this third party software”. Do Not Mark “Download Updates While Installing” (do this later).
    Continue.

    Installation type: Mark “Something else” and Continue
    Select primary partition you made in part (a) from list of available partitions
    Click Change (left side, below list), then in the “Edit Partition” popup dialog, make these choices:

    Size: leave as is
    Use as: select “ext4 journaling file system”
    Check the “format the partition” box.
    Mount point: select “/”

    Click OK

    Grub Boot Loader
    At the bottom of the screen, notice “Device for bootloader installation” and select the device designation (like sdb) of the correct flash drive, and NOT a partition (which all end in a number, like sdb1). Do NOT choose your hard disk (usually sda, with partitions sda1, sda2, etc.)

    Click "Install Now"
    The installer will now finish the installation, with some information to be supplied by the user.

    --------------------------------------------
    [End of Activity Sheet]

    [Rechecked by installing onto 8gb USB flash drive. Installer was also on a USB flash drive. All are USB 2.0]

    Elapsed Time from "Install Now" to completion, filling in any requested information as quickly as possible: 41 minutes. The install time was considerably lengthened by the read/write and transfer speed of the USB flash drives.

    Boot Up Test: Boots and Runs.

    Other Comments:

    Grub menu shows any installations on the hard drive as well as the new USB, so you could use this flash drive to boot to an OS on your hard drive. The first option is our new USB installation. If we try this USB to another machine, only the default (first) choice (USB) will boot. Portability is questionable due to hardware differences.

    Performance is slowed by the flash drive's limitations. But it works. USB 3.0 would improve this.
    Last edited by Dennis N; August 26th, 2013 at 12:05 AM. Reason: Style, UEFI note

  3. #3
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    It really is just like any install to a second hard drive or external USB hard drive. You do need to use Manual install or Something else just to get the partition screen and the combo box at the bottom which gives the option on where to install the grub2 boot loader. If flash drive is sdb, you want the grub2 boot loader installed to the drive that is sdb, not internal drive nor any partition. Note last link to .png below.

    I used 8GB for my install and another 8GB for data. The 8GB root is not large and if used a lot you would need to houseclean regularly. Mine is more to test or as a backup way to boot. I also put ISO in data partition to use as an installer booted with grub2's loopmount.

    Pros & cons of persistence install over direct install to flashdrives - C.S.Cameron
    http://ubuntuforums.org/showthread.php?t=2133067
    http://ubuntuforums.org/showthread.php?t=1655412


    Full install - C.S.Cameron post #2
    http://ubuntuforums.org/showthread.php?t=2116798
    Full install of 12.04 to 64GB USB device C.S.Cameron post #3
    http://ubuntuforums.org/showthread.php?t=2092077


    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
    For more info on UEFI boot install & repair - Regularly Updated :
    http://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
    Feb 2013
    Beans
    5

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    Just one question, does it matter where on the flashdrive I install Grub as long as it's not in a partition? I'm still kinda confused on that part

    Thank you both very much. Between both posts I think I've got enough information to feel comfortable to take the leap and try it out once I know for sure about where to install Grub. I'll just post again if I screw it up and need some more help haha

  5. #5
    Join Date
    Aug 2007
    Location
    a puddle in Manchester
    Beans
    9,204
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    You need to install grub to the MBR of the flash drive - just selecting /dev/sdb is enough in the drop-down box at the bottom of the partitioning page of the installer (if that is the designation of the flash drive you are installing to). At the device for bootloader installation section.
    MacBook Pro 10,1 retina

  6. #6
    Join Date
    Mar 2011
    Beans
    1,218

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    You didn't say if your machine was UEFI -- and if you are setting up a stick to boot on such a machine (maybe even secure boot). If so, I found that the bootloader location should be the USB stick's EFI partition (e.g. /dev/sdb1). If you just give it the USB device (like /dev/sdb), the installer will ignore it and use the EFI partition from the hard disk.

  7. #7
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    3,367

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    Quote Originally Posted by zack4200 View Post
    Just one question, does it matter where on the flashdrive I install Grub as long as it's not in a partition? I'm still kinda confused on that part

    Thank you both very much. Between both posts I think I've got enough information to feel comfortable to take the leap and try it out once I know for sure about where to install Grub. I'll just post again if I screw it up and need some more help haha
    You can only install Grub in the MBR or a partition. No other choices. Not considering UEFI here. I don't have computers available with UEFI, so nothing applies to that. Sorry.

    Relevant Part:

    Grub Boot Loader
    At the bottom of the screen, notice “Device for bootloader installation” and select the device designation (like sdb) of the correct flash drive, and NOT a partition (which all end in a number, like sdb1). Do NOT choose your hard disk (usually sda, with partitions sda1, sda2, etc.)
    You use the partitions only in a multiboot situation, just to put the unwanted Grub somewhere if you already have a grub installation you plan to keep.
    Last edited by Dennis N; August 26th, 2013 at 12:10 AM.

  8. #8
    Join Date
    Feb 2013
    Beans
    5

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    Quote Originally Posted by Quackers View Post
    You need to install grub to the MBR of the flash drive - just selecting /dev/sdb is enough in the drop-down box at the bottom of the partitioning page of the installer (if that is the designation of the flash drive you are installing to). At the device for bootloader installation section.
    Okay I think I've got it.

    Just for my own knowledge, what does MBR mean? I'm pretty much a noob as far as Linux goes, so I have no idea what most of the terms y'all are using mean lmao.

    Quote Originally Posted by ubfan1 View Post
    You didn't say if your machine was UEFI -- and if you are setting up a stick to boot on such a machine (maybe even secure boot).
    I'm not sure that I know what UEFI is, but I know that my laptop does not have it based on what I have read in other posts on the forum.

  9. #9
    Join Date
    Feb 2013
    Beans
    5

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    Am I supposed to do anything with the "linux-swap" partition I made?
    I don't see anything mentioned about it after creating it.

    Thanks again for all the input


    EDIT: I just answered my own question. I selected the partition then clicked "Change..." and saw that it already knew it was gonna be used for swap. I feel accomplished haha.
    Last edited by zack4200; August 26th, 2013 at 08:42 AM. Reason: Solved

  10. #10
    Join Date
    Aug 2007
    Location
    a puddle in Manchester
    Beans
    9,204
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: install Grub2 and full install of Ubuntu onto usb flashdrive

    Lol.
    MBR stands for Master Boot Record.

    Is it installed and booting?
    MacBook Pro 10,1 retina

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
  •