Ubuntu: How to get rid of Grub and Ubuntu Studio on a USB drive



Question:

I searched, but couldn't find the answer for my situation. In fact my problem considers two questions.

Here's the thing; I have Linux Mint 18 installed on my computer, and I tried to install an 'independent' Ubuntu Studio version on a 32 GB USB drive. (So not just as a "live" version, but as a complete OS on its own)

The intention was to have a situation like: If no USB drive is plugged, Linux Mint will boot, if the USB drive is plugged, either Ubuntu studio boots, or I'll get a bootloader to choose one of the two.

In order to (attempt to) achieve this I created a Linux Studio live DVD, I started this on my Mint system, I chose the option: 'Install Ubuntu Studio', I chose the USB drive to install it to (first I got an error, but after choosing '/' as mountpoint on the USB drive it continued) Then I was asked where to install grub too. I prefered to have no bootloader at all, but if it must, then it should only be there if the USB drive was plugged. So I chose to install Grub to the USB drive. The install process continued without any problem.

However the end situation is that I can only boot my Linux Mint now when the USB drive is plugged. Without the USB drive plugged I get some Grub command prompt. You can guess that it is quite irritating to be obliged to plug the USB drive everytime I want to boot the default OS, Linux Mint.

So ome thing is sure; I made one or more mistakes during installation. Which brings me to my two questions; 1) How can I restore/remove Grub in such a way that the default OS will boot without the need of a USb drive 2) Is it even possible (and how) to install a second Ubuntu OS on a USB drive in a way that it acts like a complete OS (So settings, updates, additional installed programs and data will completely stay on the USb drive. And 2b) Can I keep them apart without a bootmanager (So only via the efi settings)?


Solution:1

First to solve the booting problem, I suggest you to follow these instructions.

Second some explanation for understanding. You have two options in my opinion:

  1. Option

Install Grub only on your internal drive, and have there two entries (one for the local os on your internal drive and one for the os on your usb drive) and always boot from internal drive. In that case you would want to have the os on your internal drive as default boot option, since it would always stuck, if your usb drive was not plugged in. Additionally you need to configure your BIOS to always boot from internal drive!

  1. Option

Install Grub on both devices (with each having only its own os listed) and configure your BIOS to boot first from USB, if plugged in. The advantage of that option is, that you don't have to choose, what you want to boot. If your USB drive is plugged in, it will boot the USB, else the internal drive os will boot. (I'd prefere this Option)


Solution:2

Q 1) How can I restore/remove Grub in such a way that the default OS will boot without the need of a USb drive

A 1) You can boot into Mint and in Mint run

sudo grub-install /dev/sdx  

where x is the drive where you want grub, I guess the first drive, a, so /dev/sda

Q 2) Is it even possible (and how) to install a second Ubuntu OS on a USB drive in a way that it acts like a complete OS (So settings, updates, additional installed programs and data will completely stay on the USb drive.

A 2) Yes, it is possible, and easiest if you disconnect or unplug the internal drive while you are doing the job. You run in UEFI mode, so otherwise the bootloader will go into the existing one in the first drive. (This is not explained in the installer.)

Q 2b) Can I keep them apart without a bootmanager (So only via the efi settings)?

A 2b) If you want the system in the USB drive portable, it should have an own bootloader, but if you run it only in this computer, you can boot from the internal drive and run

sudo update-grub  

Together with grub-install it will make the computer boot from the internal drive, and give an option to select the external drive as a menuentry in the grub menu. Another alternative is a chainloader. See these links and links from them,

help.ubuntu.com/community/Grub2

Installation/FromUSBStick#Chainloading


Solution:3

While in your Mint OS, run:

sudo grub-install /dev/sdX  sudo update-grub  

(where sdX is the name of your internal hard drive: most likely /dev/sda)

A safe way to write ISO files into a bootable USB stick is Unetbootin - this has an option to create a persistent filesystem on your memory stick which will retain settings across reboots.

There's also the dd command, type man dd in a terminal to see its manual page.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »