4

My desire is to do the following.

The computer has W8.1 on the HDD and it is using UEFI I want to install Ubuntu 15.04 on 32GB USB stick in a way that I can install regular updates and it remembers my settings and programs. When I remove the USB - I want the windows boot to start windows automatically (to avoid GRUB on the HDD at all)

I tried to install from live USB to /dev/usbdrive. However - even I pointed that the boot loader should be on /dev/usbdrive it still utilized the hard drive (and in such way mingled with the windows boot loader).

I checked the following guide How to create UEFI-only bootable USB live media? It looks to me however that it is done on fat32 There is 1 main program that I need on this computer specifically and it is darktable.

Can you point me to some guide that I can follow step by step please? My first attempt ended up with restoring the whole HDD (thanks to clonezilla).

BB1
  • 61

1 Answers1

1

You could have removed GRUB from your hard disk pretty easily, just by deleting some files. That ship has sailed, though....

The easiest way to do what you want is:

  1. Start the Ubuntu installation media, but select the option to try Ubuntu without installing rather than the option to install Ubuntu.
  2. Launch a Terminal window.
  3. Type ubiquity -b or ubiquity --no-bootloader. The installer will run, but in such a way that it will not install GRUB.
  4. Select options to install Ubuntu on your USB flash drive. Be sure to include a FAT partition on the USB flash drive that will eventually hold a boot loader. (550MiB is a good size for this; it should not be the whole drive, and it should not be your root partition.)
  5. Install the boot loader of your choice on the USB flash drive's FAT partition. Install it as EFI/BOOT/bootx64.efi on that partition. Personally, I'd use rEFInd for this purpose, since it's easy to configure and flexible; but as I'm rEFInd's maintainer, I'm biased.

When you want to boot Ubuntu, insert its USB flash drive and use the computer's built-in boot manager to pick the USB drive.

There are other ways to achieve your main goal. For instance, you could set up rEFInd on your hard disk. Configure it to make your Linux kernel the default, with Windows as the second choice. When the USB flash drive is not inserted, Windows will boot; and when it is inserted, Ubuntu will boot.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • When I installed to flash drive as sdb it overwrote my ubuntu folder on sda, even though I told it to install to sdb. So there is an issue with the UEFI installer. But I just copied EFI/ubuntu folder back to efi partition on flash drive. And then copied grub to /EFI/Boot/bootx64.efi on flash drive. But I still have to use UEFI to choose to boot flash drive. Rod's suggestion of rEFInd seems better. – oldfred May 12 '15 at 13:16
  • When installing an OS entirely to a USB flash drive, as BB1 wants, using the firmware's boot manager to choose the boot device becomes somewhat unavoidable -- although some may remember a boot priority for the USB drive even after it's been removed. My proposed alternative to install rEFInd to the hard disk, with a default_selection list to favor the OS on the USB flash drive, can work around this problem, albeit by violating the specified desire to not modify the hard disk's contents. – Rod Smith May 12 '15 at 13:21
  • I am afraid I am missing something guys. The first part went well - ubuntu installed without boot loader. However - I am having challenge with the bootloader itself. I open the ubuntu live ISO and copied BOOTx64.EFI in the specific folder /EFI/Boot/BOOTx64.EFI At this time I go to grub exactly as I want but grub does not have configuration file. I am not sure what oldfred is referring to EFI/ubuntu. I checked this post too http://superuser.com/questions/376470/how-to-reinstall-grub2-efi and tried the method there with the hope that it will create grub configuration file but no success again. – BB1 May 14 '15 at 06:01
  • GRUB configuration can be tricky, which makes its use in your situation problematic. I'd use something else -- see the links I provided for more information. – Rod Smith May 14 '15 at 13:03
  • Hi Rob... Error again - on different place. I switched this time to refind. It tries to boot and during boot it stops with such error "dev/disk/by-uuid/XXXXX does not exist dropping to a shell". When I mount the drive I can see that indeed "dev/disk with all subfolders" does not exist under root folder. The installer never install them. Any ideas? – BB1 May 15 '15 at 22:57
  • Identify your root filesystem in some other way. Because you haven't said what the root filesystem is or how you're currently identifying it, I can't be more specific, except on the purely mechanical aspect that you can hit F2 or Insert twice, rather than Enter, to edit your options on a one-boot basis; and you can edit /boot/refind_linux.conf once you've booted to edit the options on a permanent basis. – Rod Smith May 16 '15 at 14:48
  • It tries to boot Rod - in text mode. As far as refind is concern - it identifies the kernel and the root system all by itself. It is at some point during starting of Ubuntu that it fails. So - I expect this is more of Ubuntu specific. "dev/disk with all subfolders" does not exist under root folder at all. I may need to try the approach with another version or try to configure persistent live image. – BB1 May 19 '15 at 23:32