I broke my bootloader help!

Yeah I kind of fucked up and when I was trying to write a disk image to an SD card on /dev/sdb1 I accidentally wrote it to /dev/sda1... which was my boot loader... fuck...

Anyways, how the hell do I fix this?? I've tried the boot repair manager but it keeps giving me the error

"GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again."

I've tried creating a BIOS-Boot partition on /dev/sda1 that's unformatted and has a bios_grub flag, but I keep getting the same error. What do I do?

I've used Super grub Disk in similar situations. It's worth a go.

Link: http://www.supergrubdisk.org/

you need a boot partition, if the partition /dev/sda1 still exists and was your old boot partition, you simply need to format it with FAT (vfat) filesystem. After that you will need to reinstall grub.

any "fix grub" guide should work to install grub. Check one of the other broken boot loader threads for the links :) If you run into trouble, don't hesitate to ask :)

Okay I really need help now. It seems like something got even more messed up beyond just grub. All of my attempts to repair grub failed, and I eventually just decided to reinstall the whole system. Even though I did that, I still can't boot! My motherboard doesn't even see the new OS for some reason! I haven't touched the BIOS at all since I originally messed up the boot loader, and now I'm really confused about why I can't boot into anything!

Nevermind, I've got it to boot again.

1 Like

Yay, congrats! :) what fixed it?

For future note you should keep something like an OpenSUSE liveCD available. I recently found a GRUB, GRUB2 and SysLinux bootloader repair tool in there.