El 9/11/22 a les 5:20, Andrei Borzenkov ha escrit:
On 08.11.2022 23:12, Pascal Hambourg wrote:

Then you can wipe the boot image in the first 440 bytes of the MBR and
preserve the partition table with

   dd if=/dev/zero of=/dev/sda count=1 bs=440


This leaves final 0x55aa signature which may fool BIOS into believing there still *is* boot code.

IMO it is not worth wiping the core image sectors. They are useless
without the boot image.


Yes, but it is still better to get "no boot device found" from BIOS than blank screen because boot code attempted to load some garbage and silently crashed or looped.

Perhaps there is some way to copy sector 0 to a file, writing a new MBR, and copy just partition table from file to sector 0 concrete bits.

After this, what sectors (and how) can I write next to sector 0 so rest of GRUB code is wiped?

All this procedure could be named "grub-uninstall" (lack at GRUB project).

--
Narcis Garcia

Reply via email to