0

Ok, before you say this is a duplicate, please let me explain and then point me to the duplicate answer and I will delete this post. I have searched a bit but I have found no definitive answer or way to do this. I have tried installing Ubuntu onto a USB before without touching my HDD but it installed Grub and then all the boot files on the USB. I have a duel boot Ubuntu/Windows 10 now but not because I wanted to. I originally just had Windows and wanted to install Ubuntu on a flash drive so I could transfer it to any computer like a live .iso file but it failed miserably. It put the boot files on the USB and installed Grub to my HDD and so I could not boot my computer without the USB. I have since turned my computer into a duel boot so now I can boot it fine but I still want to try to install Ubuntu onto a USB in a way that I can transfer it to another computer and it will run like a live copy but with more space (and before you tell me to just create a live one and add a second partition, I tried and it didn't work... several times.) So, is there a sure fire way to do a complete install onto a USB and install Grub only onto the USB in a way that will not touch my current boot status at all?

EDIT:

It's been over a year now and I still haven't been able to do this yet I haven't tried for a long time. When I first tried this, I had a bootable USB and went through the process of installation on the same USB and went through the process of selecting the USB for both installation and GRUB. For some reason, Grub did get installed correctly to the USB but it screwed up my master boot record and would only boot to grub on the USB. This got fixed when I decided to do a full install and it recognized my other boot files. I could have messed up somewhere in the process but I can't remember. I will try doing this again but this time around I will do it in a virtual machine. I will try the solutions you have made and get back with the working solution.

  • UEFI or BIOS. If UEFI you must gpt partition in advance. And then copy grub from sda back to flash drive. If BIOS you must use Something Else as that is only option that says where to install grub. May say hard drive, but applies to any external or second drive: http://askubuntu.com/questions/312782/how-to-install-ubuntu-on-separate-hard-drive-in-a-dual-boot Partitioning: http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu Flash drive for both UEFI & BIOS. https://help.ubuntu.com/community/Installation/UEFI-and-BIOS – oldfred Apr 16 '16 at 03:37
  • @oldfred I'm not exactly sure what you are pointing out. Could you please expand it a bit as an answer? – BobserLuck Apr 16 '16 at 03:57
  • I think links are self explanatory. But you need to specify UEFI or BIOS as external boot flash or hard drive is different. I use different flash drives for each, although the one link has a way to have one flash with both ways to boot a full install on on flash drive. – oldfred Apr 16 '16 at 04:17
  • @oldfred I have checked out the links but the last time I tried installing on a USB like this it messed with my boot loader and would not work on other computers. – BobserLuck Apr 16 '16 at 16:38
  • It is vital to understand if booting in UEFI or BIOS and if all systems are UEFI or BIOS boot. Systems that came with Windows 8 or later are UEFI, but you can install in BIOS mode. Systems with Windows 7, usually were BIOS, but a few were UEFI. – oldfred Apr 16 '16 at 17:29
  • @oldfred It's going to be BIOS as both older and newer computers "are able" to boot that way. But that is not the problem, the problem is installing Ubuntu on a USB in a way that it can be a true install, be able to transfer to any computer, and will not mess with the computer that is putting Ubuntu on the USB. Similar to live iso. The last time I went through the install on the USB, it screwed up my computers boot in a way that it installed grub on my computer (even though I specified other wise) and then put all the boot files on the USB so that I could not boot my computer with out it. – BobserLuck Apr 16 '16 at 17:44
  • 2
    With BIOS install and Something Else including specifying install grub boot loader to sdb or whatever drive is, has never been a problem to me. Many skip the combo box on the bottom of the partitioning screen on where to install grub. I even have when moving to quick, but then it just is reinstall grub to correct places. – oldfred Apr 17 '16 at 12:11
  • @oldfred Ok, I'll try it again and see what happens. But, just in case it might mess up my boot, do you know a grub command that will re-arrange my boot to boot off sda instead of sdb? – BobserLuck Apr 18 '16 at 19:19
  • It depends whether you can boot into install or not. If in a working install it is just sudo grub-install /dev/sda or whatever drive. If from live system you have to mount system partition(s) first or use Boot-Repair. https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System – oldfred Apr 18 '16 at 20:06
  • To emphasize earlier comments: Your problems are well known UEFI problems when installing to USB, not legacy/BIOS problems. Double check your machine settings for how the USB boots, the install media has both boot mechanisms on it, and will boot/install however your machine is set (UEFI/legacy). – ubfan1 Apr 20 '17 at 20:28

4 Answers4

1

How about unplugging your HDD and then installing Ubuntu to the USB drive.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
  • Someone edited the answer with a link, I didn't have it in my original answer. This is a response to a prior comment talking about flagging this question. – Terry Cater May 11 '17 at 18:08
0

I have used Unetbootin to create many different bootable USBs.

It has never tried to touch my Grub.

If you want to boot from USB without touching your HDD's boot sector, you will need to check your PC's BIOS settings. In the "boot order", USB will need to come before HDD.

(People say Unetbootin is out-of-date, but I haven't found a decent alternative. I mostly use it's lower options to "burn" an ISO which I have manually downloaded. It takes some time doing compression!)

joeytwiddle
  • 1,957
  • Will it enable more than the standard FAT32 file system storage bottle neck? I have a 32 gb USB that I would like to install Ubuntu on that I can transfer to any computer and can use the full 32 gb worth. – BobserLuck Apr 16 '16 at 02:57
  • No idea about that. You could also try Ubuntu's standard USB creation tool. – joeytwiddle Apr 16 '16 at 03:25
  • Whelp, I looked threw the comments about the file type and it will format my USB to a FAT32 file system which has some major limitations. And so does the standard Ubuntu USB creation tool. – BobserLuck Apr 16 '16 at 03:38
0

Make a second drive that is the Ubuntu Live CD/DVD/USB, and boot from that. Then use that to do "something else", and select the flash drive from the disks. Then, at the bottom, MAKE SURE that it has "Install bootloader to" set to your USB drive. This is critical.

FireFaced
  • 187
  • That's what I attempted to do the first time but it still screwed up my boot even though I selected my USB for grub. I was able to recover everything with a complete install of Ubuntu on my computer and grub was able to detect my windows boot and added it to the grub boot loader. I think I will try it again the same way but I will deficiently do it over a virtual machine this round. – BobserLuck Apr 20 '17 at 20:00
0

I did this last week. I booted a live-usb of LinuxMint and installed it. Instead of just installing it on my HDD I set "something else" and chose the Bootloader to be installed on the stick. I made some partitions (1M Grub, 100M /boot, 20G /, 4G /swap, and the rest (it was a 128G-Stick) as /home).

It needed some time but worked fine.