So I want to install Ubuntu Mate on an external hard drive, and I want to keep my internal Windows 10 HDD the same. No different boot loaders. Want to make it that if I have my external hard drive connected, it would boot on Ubuntu, and if its not connected it would automatically go to windows.
Tried to do it yesterday, I installed Ubuntu to my 500 GB hard drive using this dock. Started out fine, when restarting it would go to Ubuntu Mate, and if I wanted to use Windows 10 I restarted, pressed F12 to get the boot menu and chose windows. Problem is when I turned it off and then turned it on it would start on Windows and Ubuntu doesn’t show anymore in the boot menu.
Is what I want possible? Would appreciate some help with my issue.
It could be BIOS causing the order to change, since it seems everything has been set up as expected, but let’s double check:
Adjusting the BIOS settings to choose the right boot order:
First priority - External Drive / USB-HDD
Second priority - Internal Drive / Hard Disk
Some systems have the option to adjust the drive order too, but for systems (UEFI) that only rely on a disk boot order, that could result in the drive being “put to the bottom of the list” when it is no longer present and re-plugged in later.
Checked, and yes it seems that the usb storage option was put below the windows boot manage. However when I change the order to usb storage first, it doesn't detect ubuntu. Same as in the boot menu, only shows windows boot manager. These are my boot options on the BIOS:
Boot Option #1-USB Storage Device
Boot Option #2-UEFI Windows Boot Manager
Boot Option #3-Internal ODD Devices
Boot Option #4-USB Floppy Device
Boot Option #5- Onboard NIC Device
One thing I forgot to mention, if I remove the internal hard drive and try to boot from the ubuntu external hard drive I get "Reboot and Select proper Boot device or Insert Boot device and press a key".
If it doesn't boot even when manually specifying the boot device, the bootloader (GRUB) may need re-installation on the external hard drive. (Goodness knows if Windows did something...)
From a live session, find out which block device your external drive is.
sudo fdisk -l
For instance, if it's /dev/sdb1 execute:
sudo mount /dev/sdb1 /mnt sudo grub-install --boot-directory=/mnt/boot /dev/sdb
Replacing sdb1 with your drive.
This will have rewritten the bootloader to the external drive, just in case it was missing.
Also, been reading the link wolfman gave me, said to edit the menu.lst file but it looks like is not on grub2, it was replaced by grub.cfg, and according to some members not advised to edit since it changes anytime there is a grub update.
It shouldn't make a difference. This problem lies with the bootloader and BIOS settings.
If you haven't already, my previous post will install the GRUB2 bootloader onto the external hard disk. If installed correctly, you'll have the prompt of which OS to boot (including Windows if desired) when instructing the BIOS to boot that drive.
Your disks remain separated:
Disk 1
Windows Bootloader (hidden data at start)
Windows OS Partition (NTFS)
Disk 2
GRUB2 Bootloader (hidden data at start)
Ubuntu Partition (ext4)
It can be a bit fiddly depending on the BIOS/Motherboard. Some systems easily boot if the drive is present (as settings state), others only boot if the drive was plugged in and already spinning before the system powers on. Or, easiest method is to press F12 to choose the disk when you want to use Ubuntu.
This is why I think the GRUB2 bootloader is missing:
Either that, or the BIOS completely missed the boot order and booted "nothing".
This command just lists your drives and partitions, I think your drive is /dev/sdb2, the 19.6G one, which I presume contains the directories like /boot, /home, /etc, /var?
/dev/sdb1 65535 1048559 983025 480M EFI System
/dev/sdb2 1048560 42106879 41058320 19.6G Linux filesystem
/dev/sdb3 943310790 976733639 33422850 16G Linux swap
/dev/sdb4 42106880 943308799 901201920 429.7G Linux filesystem
Yeah, thats my root partition. trying it now there and I get the grub install error about blocklist. Is that normal?
ubuntu-mate@ubuntu-mate:~$ sudo mount /dev/sda2 /mnt
ubuntu-mate@ubuntu-mate:~$ sudo grub-install --boot-directory=/mnt/boot /dev/sda2
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
Both times the internal hard drive has been inside. It seems they change letters every time I boot.
Edit: Ok, tried the different name as @lah7 suggested but got the same problem, but with a new line:
ubuntu-mate@ubuntu-mate:~$ sudo grub-install --boot-directory=/mnt/boot /dev/sdaInstalling for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
ubuntu-mate@ubuntu-mate:~$
I see what's going on - the disk is formatted with a GPT layout. I'm more familiar (and had success) with MBR formatted disks on traditional BIOS machines.
I suspect this is a UEFI/EFI-based system... a bit complicated then the traditional BIOS... especially if the system is trying to boot a GPT disk in BIOS mode.
Do you have options in your BIOS options to always boot in UEFI mode?
Or see two disks like External Drive and [EFI] External Drive ?
There's a few ways we could go about this to get the external drive to boot. I think the easiest is to switch to legacy "BIOS" boot mode for this drive:
Converting the disk from GPT to MBR
This doesn't erase data, but if there's anything important, I recommend backing up first in case something disastrous happens.
To convert GPT → MBR:
Now we will attempt to convert your GPT disk layout to MS-DOS/MBR. Start gdisk:
gdisk /dev/sda
You should be prompted with:
Command (? for help):
Press r to start recovery/transformation.
Press g to convert GPT to MBR.
Press p to preview the converted MBR partition table.
When you're happy with the MS-DOS/MBR layout, press w to write changes to the disk.
You should restart the system at this point so the kernel can recognise this disk change. Ejecting and re-plugging it back in might help. Definitely do not use the wrong disk letter or Windows will bork itself!
After you're back in the live session again, you should be able to run that command to correct that drive's bootloader.
Then hopefully, with a bit of luck, if the BIOS settings are right, the drive will boot up in BIOS mode when the disk is plugged in to the machine.
My computer is from around 2014, so I imagine it is UEFI(that, and on the boot manager windows is on UEFI options, but I’m not cheating!). Basically my boot manager looks like this, but sometimes I can see Legacy Options below UEFI Options if I have some usb with an old live program. So I’m guessing Legacy is BIOS mode, correct? If I hit Change Boot mode settings on the Boot Manager I get this.
So to summarize, you want me to change the ode to BIOS, convert the Ubuntu Mate GPT partition to MBR, and then fix grub?
I think the first couple of times I tried to do this procedure I made Ubuntu Mate for since I could see my live usb in the legacy mode options. Then I saw people recomending to make it the same as the primary OS, so I changed the iso to usb conversion to be made as UEFI. After installing U-Mate to my external hard drive it didn’t appear either.
@pfeiffep, just saw your suggestion sorry got lost here. Showing my newbie skills here, because I can’t seem to get it.
Getting late here, so will reply after some hours.
UEFI is awkward… but yes, Legacy is BIOS mode. Thinking about it, the next problem is that Windows won’t boot in Legacy as it’s installed in UEFI, and vice versa where UEFI cannot boot an OS installed in Legacy mode… so I guess we ought to stick with UEFI mode. Unless the system has an option to boot specific drives in different modes:
#1: External Drive
#2: [EFI] Windows OS
#3: [EFI] External Drive .... etc
That may bring the question of how you installed Ubuntu onto the external disk to start with. If it installed in BIOS mode, but formatted as a GPT disk, that could be why it’s not booting.
But if it’s definitely installed in EFI mode, try re-installing grub-efi: https://wiki.debian.org/GrubEFIReinstall (Link for Debain, but would still apply to Ubuntu)
BIOS Computers were a lot easier with systems that supported booting from USB-HDD
Ubuntu was installed in UEFI mode. When it worked, it showed on the UEFI Boot Options alongside the Windows Boot Manager.
I think those 4 that I put on post #4 were the only options…
Anyway, I made a live usb of supergrub disk 2, booted into ubuntu, and did this. Had it working fine then, but like the first post, once I turned it off and later turned it on before turning my pc on made it disappear. So I looked around and found this answer by Rod Smith and tried the first bullet point (renaming ubuntu folder to BOOT, and grubx64 to bootx64 since I have secure boot off), but when starting up I get the Minimal Grub Bash-like line. Don’t know what to do from there so I type exit and it goes to windows.
I sucessfully did that on my UEFI laptop. The only truble I had was with the location of GRUB at the installation. Double check it is on your external hard drive. You can also try to create a /boot partition or EFI partition. I did’t need that.
I know this is not a solution to your question. Win 10 has made things much more difficult to boot with another OS. I got so frustrated with it that I pulled the Win10 hard drive, since it would not let me downgrade back to Win7, and installed a new one and installed UbuntuMATE. If I ever feel the need for Win10, then I’ll swap the hard drive back. But it’s now gotten to the point that, it is easier for me to swap hard drives than to deal with Windows. I don’t do well when I feel my choices are being taken away, so I’ll likely not ever use Windows again. I used to love Apple, but after the ipod started rearranging MY music files, I quit using Mac and haven’t ever gone back.
Just a thought, I know it sounds like a pain to swap hard drives, but I only have that one step, instead of trying to rewrite GRUB, Bios, or whatever crazy Windows settings, just to do something that used to be as easy as “turn it off and back on again”-Roy.