1

after installed Ubuntu 16.04 to external drive on Windows 8 system, i can't boot without external drive. if i plug in the Ubuntu 16.04 external drive, i can boot with grub normally. if not, it go to GNU GRUB version 2.02~beta2-36ubuntu prompt. my window use UEFI. i try running "sudo update-grub /dev/sda"( sda is my internal hard drive) but it not work.

this it how i installed Ubuntu 16.04 to external drive and all step i try to fix it.

  1. i format my external drive as ntfs.
  2. i use LiveCD and boot on disk.
  3. i select try Ubuntu.
  4. i partition using gparted by unmount than set
    / 30 GB
    /Swap 8 GB
    /home the rest
  5. i installed Ubuntu 16.04 and i set boot loader at /dev/sda
  6. after i done i can't boot without my LiveCD
  7. so i boot Ubuntu, on Ubuntu, i remove my LiveCD.
  8. now i use boot repair.
  9. it working without my LiveCD but i still need my external drive to be plug in.
  10. so i try running "sudo update-grub /dev/sda" but still not working.
  11. i use boot repair again and here is the log https://paste2.org/YjdhLnDd

thank i new any os other than window.
Edit: My external drive is wd element se 500gb with usb2.0

update i found out that some part of grub to is in /dev/sda2 and i don't know how to move it to sdb

i move grub2 to sdb1 now using http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd but now no grub when boot but i can't boot to grub2

  • Boot your external disk in UEFI mode and then install...your external disk should be in FAT32..show us some pictures whatever u r saying – minigeek Sep 25 '16 at 04:46
  • sudo update-grub /dev/sda is wrong, update grub doesn't accept parameters. Perhaps what you're looking for is sudo grub-install /dev/sda && sudo update-grub. Even so, I'm not sure it will work because boot-repair already made a mess... –  Sep 25 '16 at 04:46
  • @sardapv - Why FAT32? Do you realize the external disk is where Ubuntu is already installed (certainly not in FAT32)? The OP isn't talking about a USB flash drive but a 500GB external hard drive. –  Sep 25 '16 at 04:48
  • I dont know if it does with ntfs.. since many bootable device asks to format into fat32! – minigeek Sep 25 '16 at 04:50
  • I think he installed in legacy mode and made a mess with boot-repair... installing in uefi mode alongside uefi mode doesn't arise such problems! Ohk wait correction: he installed in External Disk...sry ! – minigeek Sep 25 '16 at 04:52
  • @CelticWarrior ok i will try that sudo grub-install /dev/sda && sudo update-grub – khunjuice Sep 25 '16 at 04:53
  • Now thinking a little about it... It's UEFI so you can also boot Windows directly from the UEFI menu whenever the external drive is disconnected. Otherwise, with the default entry being Grub (which then manages the dualboot), I'm afraid there's no way around it, the external must be connected. –  Sep 25 '16 at 04:57
  • @sardapv - At times you really don't make sense at all... It has nothing to do with NTFS either!! Please stop, relax, read and understand the question. Ubuntu is already installed in an external HDD and for the rest read the comment above. –  Sep 25 '16 at 05:00
  • if i reinstalled and set boot loader at /dev/sdb will it work? – khunjuice Sep 25 '16 at 05:04
  • @sardapv maybe you right.how can i check that it is legacy mode or UEFI – khunjuice Sep 25 '16 at 05:17
  • @khunjuice - No. Bottloader is always in the ESP (EFI partition) which then chainloads to Grub which in turn resides in the same partition where Ubuntu is installed. That's why you need the HDD conected. The probelm is you have Grub as the default boot option in UEFI which is fine for a dualboot but requires the drive where Ubuntu is. Again, you can boot Windows directly from the UEFI menu so, please, don't overcomplicate things. Ubuntu was installed in UEFI mode (I think is clear by now that you can and should ignore certain comments. –  Sep 25 '16 at 05:21
  • i can't find EFI partition on my external drive – khunjuice Sep 25 '16 at 05:26
  • @khunjuice - It's NOT in your external drive. It's always in sda (it would be in the external drive if that was the ONLY drive). Now it's clear you don't understand UEFI. Quite sad, because you have a simple solution right in front of your face and you aren't seeing it because you're thinking in the "old ways" of BIOS/MBR. –  Sep 25 '16 at 05:35
  • You can check if you're in UEFI mode by running: dmesg | egrep "EFI v". If the results is blank you're running Legacy. What is the output? – L. D. James Sep 25 '16 at 06:03
  • It's a clean UEFI-install, Grub is installed in sda by default, but config-files for grub are on sdb. so with sdb unplugged leads to Grub-rescue. another problem: sdb is mbr, not gpt and dont have ESP. – mook765 Sep 25 '16 at 07:42
  • @mook765 thank anyway to fix this i reinstalled 3-4 time but still the same – khunjuice Sep 25 '16 at 09:09

1 Answers1

1

The problem that you're having comes from booting into Legacy mode and trying to install grub into Drive /dev/sda during your install. You could install grub to /dev/sdb and set your BIOS for /dev/sdb as your boot priority. During that will boot you to Ubuntu. However, you won't have boot options to boot to Windows.

While there may be a number of methods around this, the simplest method would be to install an Ubuntu partition on /dev/sda. This can be a very small installation, just enough to have the basic install which can be as small as 8 gigs.

When you boot to the UEFI version of Ubuntu on /dev/sda and run update-grub if your external drive is installed it along with any other OSes detected will be added to the boot menu.

Now when you select UEFI Ubuntu from as your BIOS boot option, you'll have all the Operating systems included all the external drives in the Grub menu. You'll be able to select either one for your default, including Windows.

The information is automatically added to the EFI partition on /dev/sda.

There are many "seemingly" complex descriptions for how to manually edit the EFI partition to do this. But I consider spending 8 gigs of space to allow the Ubuntu install to do this automatically well spent for the ease. Anytime you want to make a change, just boot to the Ubuntu on the /dev/sda drive and run update-grub to have any changes to be automatically reconfigured.

The steps above are to provide being able to have Windows included in your Boot menu.


If you don't care to have your UEFI Windows installation included in your boot menu. Just install group on /dev/sdb (your external drive). Set your BIOS for legacy with /dev/sdb as your default boot device.

L. D. James
  • 25,036
  • If an external drive and boot it in UEFI mode, you must have the ESP - efi system partition on sdb and create /EFI/Boot/bootx64.efi. All external UEFI devices whether Windows installer or Ubuntu live installer or full install of Ubuntu use that file name (But different actual files). But if installed in UEFI mode to external using gpt you may be able to boot from ESP on internal drive. Or if BIOS mode you can swithc form UEFI to BIOS to boot Ubuntu on external and switch ot UEFI to boot Windows. http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu – oldfred Sep 25 '16 at 18:37
  • @oldfred I just took a drive from a 10 year old Dell Laptop. The drive is in BIOS mode. The computer doesn't have EFI support. None of my EFI drives will boot to that computer (Windows or Linux). I attached the drive using a SATA to USB adapter. Then ran update-grub from my UEFI session. The Linux OS was added to the grub menu. I booted the computer in UEFI mode to /dev/sda. I selected the USB attached Installation and successfully booted to it. – L. D. James Sep 25 '16 at 19:17