I have

  • installed Windows and encrypted it with VeraCrypt
  • made a backup of the VeraCrypt MBR (actually everything up to the first partition: dd if=/dev/sda of=/some/file bs=512 count=2048)
  • installed Linux (debian) on the same disk and let grub overwrite the MBR

I know that I can tell grub to boot into the VeraCrypt recovery disk. I used to do this with TrueCrypt, but VeraCrypt always asks me if I'm trying to create a hidden volume. I do want grub to be the primary boot loader, because I use Windows only occasionally and don't want to go through the VeryCrypt boot loader every time to get to Linux.

My idea was that I might be able to give the backed up VeraCrypt MBR to grub, and somehow let grub execute it, i.e. pretend that this has been the MBR all along. However, this is not as easy as I (naively) expected.

Loading it as an ISO (with memdisk) like the recovery disk does not work - I get a bunch of errors and then come back to grub's boot menu. I presume this is because my MBR file is not actually a bootable disk. Everything else I've tried ends with a message that I need to load the kernel first.

I'm not sure anymore, if what I try to do even makes sense. Maybe MBRs really do need to be in the MBR? But I also can't really come up with a reason why it shouldn't be possible.

TL;DR Is it possible to make grub load another MBR from a file?

If so, can anyone give me a hint as to how I might achieve this? If it's not possible, can anyone roughly explain why?


You must log in to answer this question.

Browse other questions tagged .