0

Recently, I bought a 250GB Samsung 840 EVO SSD. I wanted to migrate my system to it, so I copied my / and swap partition to it and ran boot-repair. The program told me I was in EFI mode so I made an EFI partition at the start of the disk and put the boot flag on it. I ran boot-repair again and this time it completed successfully. But when I rebooted and selected the SSD to boot from, my BIOS says:

This is not a bootable disk. Please insert a bootable floppy and press any key to try again ...

Then when I press a key I get:

error: no such partition.
Entering rescue mode...
grub rescue>

Sigh. How can I get my PC into a usable state, booting from the SSD?

Additional information: The live USB does not seem to want to boot besides in UEFI mode. My boot info script is at http://www.paste.ubuntu.com/9436761

Richard
  • 8,502
  • 11
  • 47
  • 72
  • Could you add a link to the boot-repair info? How did you add a the EFI partition at the disk start? Did you remake the filesystem and recopy the / info in the newly reduced partition? – ubfan1 Dec 09 '14 at 05:56
  • Open terminal and try sudo apt-get install lilo – BDRSuite Dec 09 '14 at 06:12
  • Just a guess, but it looks like grub can't find it's configuration files or the partition to boot linux from... Maybe the new partition isn't in the same place (or order or label or something) as the old one. I'd try update-grub but I'm not sure how to do that from a live cd/usb, though it's a common fix. I'd imagine the boot-repair program would have tried that though... Maybe it's just missing the boot flag? – Xen2050 Dec 09 '14 at 06:31
  • How to do it from a live CD is a FAQ - covered before in some detail so I'll not repeat it. – Mark Williams Dec 09 '14 at 07:31
  • @MarkWilliams The live CD comes with grub-efi-amd64-bin on the disk, but not installed. Following these non-UEFI specific answers usually results in installing an MBR loader or an error because of a missing BIOS partition on a GPT drive. – LiveWireBT Dec 09 '14 at 08:47
  • @Xen2050 Please read more carefully, he already said that set the boot flag. Also talking about grub configuration files, there are at least 2 in a UEFI instalaltion, one very simple in the ESP that boots the other in /boot/ only the latter is updated through update-grub as far as I know. The description is missing information about the boot order, which makes it difficult to analyse further how it ends up at a grub rescue prompt, but it should have booted through the first device. – LiveWireBT Dec 09 '14 at 09:07
  • @LiveWireBT I was reading carefully, "so I made an EFI partition at the start of the disk and put the boot flag on it". There is no mention of the boot flag on the / or any other partitions, just the EFI partition. The location of the grub parts could be the problem, with old-to-new disk copying. Maybe just re-installing grub could be a fix, and forget about updating or fixing. – Xen2050 Dec 09 '14 at 09:24
  • Hi all, I moved my / over 100mb just to accommodate the EFI partition. Only the EFI partition has the boot flag. My / partition is a direct copy of my previous using a partition editor. My boot order is SSD first and then HDD. – Richard Dec 09 '14 at 16:15
  • See my other edits for the boot script etc. – Richard Dec 09 '14 at 16:25

2 Answers2

0

Have you been booting UEFI before? In that case copy contents of the old EFI System Partition (ESP) to the SSD's ESP, and re-register the bootloader with efibootmgr, else install GRUB to the ESP (note that you need to have at least the grub-efi-amd64-bin package isntalled). Both should give you a ubuntu labeled entry in the firmware (aka BIOS) boot order that boots Ubuntu.

If that however does not work, then please try this: UEFI machine doesn't boot Ubuntu through NVRAM bootcatalog. How to fix?

Please also check the boot order, to determine how you ended up in grub rescue mode after pressing a key (is the old drive still conneced or something else?).

LiveWireBT
  • 28,763
0

Solved. I installed Ubuntu on the HDD, booted there and ran sudo update-grub. Now it works like a charm and I have an extra Ubuntu installation of I need one, or I can delete it if I want to.

Richard
  • 8,502
  • 11
  • 47
  • 72