Results 1 to 3 of 3

Thread: moving grub2 mbr because of truecrypt, please help

  1. #1
    Join Date
    Nov 2008
    Beans
    5

    Question moving grub2 mbr because of truecrypt, please help

    After having encrypted my windows partition, truecrypt overwrote my mbr, and now I can't access grub during boot, not even when I press escape

    I was thinking of restoring my original mbr with the truecrypt rescue cd, boot into ubuntu and copy the mbr to the ubuntu partition, but I'm really not sure how to do it. I'm still learning and any help would be greatly appreciated. When you do this, truecrypt supposedly loads grub when you press escape.

    To give you an idea of how my drive is partitioned, pls see the attachment.

    Thanks in advance!
    Attached Images Attached Images
    Last edited by dex87; May 23rd, 2010 at 10:26 AM.

  2. #2
    Join Date
    Oct 2010
    Location
    Cork, Ireland
    Beans
    18
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: moving grub2 mbr because of truecrypt, please help

    Quote Originally Posted by dex87 View Post
    After having encrypted my windows partition, truecrypt overwrote my mbr, and now I can't access grub during boot, not even when I press escape
    this worked for me (until a GRUB update overwrote the MBR without confirmation)

    Leave the truecrypt boot loader on the MBR.

    1. Boot using ubuntu live disk
    2. Check which is the main ubuntu partition using: sudo fdisk -l /dev/sda(or gparted)
    3. You need to install grub on a logical partition.
    4. If the Main Ubuntu partition is extended and not logical, grub will not boot up properly, so you have to use a logical partition
      • install gparted to help you with this:sudo aptitude install gparted
      • Some dell laptops seem to have takend the first partition as a small utilities area: give it the boot flag (truecrypt likes grub having a boot flag.)

    5. Mount the main linux partition: sudo mount /dev/sdaX /mnt
    6. Install grub2 on the partition (either the main one or the one you just took)
      Code:
      : sudo grub-install --force --root-directory=/mnt  /dev/sdaX
      (in my case it was sda1).
    7. Restart your computer. In my case I can press escape when it asks for my passphrase, and then I get GRUB menu, or I can put in my passphrase, and then I still get the grub menu (which is strange) but when I pick windows it boots fine)

    BE CAREFUL with this, use at your own risk, installing GRUB on a partition not a disk is not recommended. But as I said, this worked well for me.

    PLEASE NOTE ON THE INSTRUCTIONS ABOVE.

    After you move GRUB to a new partition, run
    Code:
    dpkg-reconfigure grub-pc
    This SHOULD stop your MBR being lost during a future update.

    Even so, once you have it all set up take a copy of the MBR so you can restore easily
    Use (Be carful of using dd)
    Code:
    dd if=/dev/sda of=/boot/mbr.bak bs=512 count=1
    NB. if you do install GRUB2 on an extended partition, it will boot once, but will fail after.
    NNB. Don't do this without backing up
    NNNB. If you dont put in the password, and then boot windows, you end up in the recovery program. I am no expert on windows, but I am guessing if you try to recover, you will kill your encrypted win partition.
    Last edited by roomey; February 4th, 2011 at 04:34 PM. Reason: added warnings

  3. #3
    Join Date
    Dec 2006
    Beans
    25

    Re: moving grub2 mbr because of truecrypt, please help

    oops, failed to read original post. Edited.
    Last edited by Turpin; February 4th, 2011 at 01:08 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •