2

I have a serious problem. I had a perfectly good working UBU 14.04 LTS on a 1TB WD Drive in SATA 1 position. I had a good and working Win10 installation on a Seagate 180GB HDD.

I turned off the computer, plugged in a Clonezilla Live USB, plugged in an external Toshiba USB 1TB Drive, and a WD 3 TB Drive.

Then I booted the computer to the Clonezilla flash drive, restored the WIN10 image from Toshiba drive to the WD drive.

I turned off the computer, unplugged every drive, plugged in my 1TB WD drive with Ubu 14.04 and I get a message that there is no bootable device available.

I look in the BIOS and the drive is there, it's the only one, but it doesn't show in the boot devices. Instead, it shows the words "hard drive".


Threads read that do not apply:

  1. GRUB menu lost in win 8 dual boot configuration after hard drive swap
  2. Boot menu does not offer choice between Ubuntu and Windows
  3. Dual boot windows 8 (UEFI / GPT) with Ubuntu and boot-repair

I am booted to Live USB now, and gparted shows the drive with the following partitions:

/dev/sda1 fat32 {no mount point} Size: 380MiB used: 4.13MiB Unused: 357.87 MiB Flags: boot
/dev/sda2 ext4 {no mount point} Size: 22.84 GiB Used: 9.72 GiB Unused: 14.12 GiB {no flag}
/dev/sda4 {key} ext4 /media/bef01012-a316-4c2c-9d93-fc16b989ae62 Size: 407.30 GiB Used 99.97 GiB Unused: 307.33 GiB {no flag}
/dev/sda3 {key} linux-swap {no mount point} 7.81 GiB Used: - Unused: - {no flag}
unallocated unallocated {no mount point} Size 492.12 GiB {rest of line blank}

In my file system, I see 26GB Filesystem, 437GB filesystem, and Ubuntu 12.04.5 LTS amd64 (flash drive.)

I cannot mount the 26GB filesystem, or sda1, the fat32 partition.

I read the following "similar questions":

My BIOS has few settings that I can change compared to my laptop's BIOS. I have tried resetting factory defaults, turning on and off secure boot, moving the drive to different SATA ports (This computer only has two SATA connections and they are SATA II)

I disconnected them and installed the 3TB Win10 drive I sent the restore to and it booted and worked, in spite of it being for a different computer. I did a full shutdown, not a hybrid. I unplugged every drive from the computer, I tried setting BIOS defaults back to factory setting, and nothing seems to work.

Except for the Toshiba drive, these drives are all SATA internal.

... and many more.

===================== Additional Info ============

I have done some more experimenting with this to see what I can do.

@kos and @Ashhar Hasan

I removed all drives from the computer and rebooted to, hopefully, reset the BIOS. Then I installed the drives as they were originally before using the computer to create a backup of my laptop drive.

It will only boot to windows.

@Old Fred

I'll see if I can repair the grub or boot loader after lunch. Thank you all for your answers.

Buck
  • 720
  • 1
    99% the problem is that grub was installed on the Windows 10 drive, so simply there's no bootloader installed. See if plugging the Windows 10 drive lets you boot from the Ubuntu drive again. – kos Dec 06 '15 at 17:17
  • Can you please check where grub is installed. It may be that grub was installed to a different drive. Try what @kos suggests. An easier check would be to bring up the boot menu (F12, F10 etc) and then select Windows Boot Manager. That should boot you into Windows and confirm that grub is missing. – Ashhar Hasan Dec 06 '15 at 17:18
  • 2
    UEFI has its own NVRAM to remember boot entries. But when you unplug a drive it forgets them. You may get it to re-read ESP - efi system partition by cold booting, not rebooting several times. Or use efibootmgr from live installer to add entry back into UEFI memory. Or use Boot-Repair to reinstall grub. To avoid issue always create /EFI/Boot/bootx64.efi. Make it a copy of shimx64.efi if Ubuntu or Winodws boot file if only Windows. http://askubuntu.com/questions/668506/changed-the-uefi-motherboard-on-a-dell-laptop-now-it-says-no-os-detected – oldfred Dec 06 '15 at 17:47

3 Answers3

2

I had a similar thing occur with my Slackware installation. I was able to fix it by re-running the installation but skipping the actual filesystem install part. The install originally gave me the option of doing a UEFI or LILO install but I chose UEFI install because newer is better, right? Turns out, nope. LILO for me next time if the MB supports it.

With respect to Rod Smith, "Don't power on a computer with its boot disk(s) unplugged. Ever." appears to be a true answer but also one that I consider to be completely crazy. Who designs this stuff?

1

Actually, that first link you posted is basically applicable. Also, oldfred has almost certainly correctly diagnosed the problem. More broadly speaking, EFI is not BIOS! This means you must abandon certain BIOS-centric habits, such as your trick of unplugging a disk to protect it from the activities you undertook. Under EFI, boot order information is stored in NVRAM, and unfortunately, some EFIs will delete NVRAM entries that no longer exist. When you unplugged your boot disk, your firmware almost certainly deleted those entries. (You can argue, with merit, that this is a lame design decision, but it's one that exists in the real world, so you as an end user must be aware of it.) There are three ways to adapt to this strange new world:

  • Don't power on a computer with its boot disk(s) unplugged. Ever.
  • Know how to recover your boot loader if you unplug your boot disk. (Hint: efibootmgr can do this. See this tutorial, or any of dozens of others, for help.)
  • Put a suitable boot loader in the fallback filename position (EFI/BOOT/bootx64.efi on the ESP). This could be a copy of GRUB or something else entirely.

You may also find my rEFInd boot manager, placed on a USB flash drive or CD-R, to be useful for recovery in situations like this. It should at least get your system up and running again, from which point you can run efibootmgr or even do a full re-install of GRUB.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
1

First, I want to thank @Rod Smith for your answer. I would certainly look up boot manager and try it, but I did find a work-around.

I used my backup drive as a test to reinstall Ubuntu over the existing data in the drive.

It did not boot when I plugged it in, but I was able to boot a live disk and perform the install.

When I finished the install, I was able to boot the backup drive and it was complete with all the software and data.

When I plugged in this, my active drive, I was able to boot right into Ubuntu without a problem.

So, now my backup plan includes keeping a dummy drive handy to reinstall Ubuntu in case this happens again.

As for booting without a drive, I did not do that until after I could not boot Ubuntu.

Thank you all for your help. It was your information, whether I understood it or not, that triggered my thoughts to attempt to rectify the problem by reinstalling Ubuntu.


The cause of this problem is that I bought an SSD for my boot drive, but I decided to use it in my laptop instead and to buy a larger one for my desktop. I needed to run Clonezilla to create a drive I can safely change partitions on so the 1TB drive fits on the 240GB SSD.

I still need resize the partitions, but at least I know how to fix the efi problem if it occurs again.

So, again, thank you to all.

Buck

Buck
  • 720