Wednesday, March 21, 2018

recovering after overwriting EFI partition

Tried to install Windows XP on the Macbook running OS X 10.6 and Linux Mint 18.1 dual boot. Though a new primary partition was created at the beginning of the drive, Windows XP refused to install on it, saying there are too many partitions.



In the process, the EFI boot partition was overwritten. So, the machine would not boot. Tried creating a refind boot USB drive - that showed up the Mac and Linux boot loaders, but did not boot either of them - the Linux boot ended in an emergency shell, and the Mac boot ended with the Mac apple turning into a cross, and not booting.

Googled various options, and thought the easiest way would be to do another Linux install. Made another Linux Mint installable USB drive by doing dd of the Mint 18.3 iso to a 16 GB drive, recreated an EFI partition using the installer's GUI partitioning tool, installed the 18.3 to another partition created in free space, and after install, the 18.3 and MacOS were successfully booting.

The original Linux Mint 18.1 was still not booting - dropping into emergency shell. 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.'



journalctl -xb showed that the reason for not booting up was that it was not able to mount /boot/efi with UUID - the UUID had changed, of course, since the boot partition had been re-created. So, just booted into the new 18.3 Linux install, mounted the 18.1 volume, sudo nano edited the /etc/fstab with the UUID from the 18.3's /etc/fstab, and then rebooted - all OK.

Here are some of the things I googled and found - something like rough notes -

enabling bios mode
https://superuser.com/questions/1133040/unable-to-boot-into-windows-10-with-refind-solved/1133052
Ctrl R for safe boot into OS X
https://kb.wisc.edu/helpdesk/page.php?id=7197



No comments:

Post a Comment