[HOWTO] Boot Rescue&Recovery with GRUB on Edge 13

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
Ezekeel
Posts: 2
Joined: Sun Jun 13, 2010 4:44 pm
Location: Muenster, Germany

[HOWTO] Boot Rescue&Recovery with GRUB on Edge 13

#1 Post by Ezekeel » Tue Jun 15, 2010 3:38 pm

Hey guys,

I recently bought an Edge 13 and put Linux on it and everything works just perfect (I love you Tux!).

The only problem I have encountered is that after installation of GRUB the option to boot the Rescue&Recovery system (on Edge 13 you have to press enter on the BIOS boot screen and then select F11 in the BIOS boot menu) is gone from the BIOS boot menu.

The reason for this is Thinkpads use a custom MBR which is able to catch the flag activated when F11 is pressed in the BIOS boot menu. When installing GRUB the MBR is modified and no longer able to catch this and there is a check in the BIOS which only shows the F11 option when an unmodified MBR is present.

On other older Thinkpad models one was simply able to boot the recovery partition after unhiding it (http://www.thinkwiki.org/wiki/Rescue_and_Recovery). On my Edge 13 however the R&R partition (hd0,0) was not hidden and when booting it with GRUB I ended up on the normal Windows 7 desktop just like when booting the Windows 7 OS partition (hd0,1) directly with GRUB.

After some research and some experimenting (restoring right now ;) ) I found that on the Edge 13 the flag to boot the R&R system is passed on from the MBR to the Windows 7 bootloader on hd0,0 (which is the active partition in the pre-installed state) which then selects the proper entry from the boot menu which boots up the R&R system. If this flag is not present the default entry from the boot menu is chosen which corresponds to booting the normal Windows 7 desktop on hd0,1.

Since Windows 7 can be booted directly with GRUB by booting the hd0,1 partition, the most convenient way to access the R&R system from GRUB would be to modify the Windows 7 bootloader on hd0,0 to boot up the R&R system by default instead of the Windows 7 desktop.
This can be done with a Windows 7 rescue disc which unfortunately is not included (cheap basterds!), but luckily can be obtained from http://neosmart.net/blog/2009/windows-7 ... pair-discs. Since the Edge 13 does not have a CD drive I made a bootable USB stick using http://wintoflash.com/home/en.

Here are the steps to make the R&R default when booting from hd0,0:

1. Boot up the laptop using the bootable USB stick you made.

2. Start the recovery text console.

3.

Code: Select all

bcdedit /v
which will print the boot configuration data.

4.

Code: Select all

bcdedit /default ID
where ID is the string found next to custom:54000001 in the printed boot configuration data above (for my Edge 13, ID is {572bcd55-ffa7-11d9-aae0-0007e994107d} but that probably will vary for different models).

5.

Code: Select all

bcdedit /displayorder {default} /addfirst
That is it. Now you only have to configure GRUB to boot from hd0,0 for the R&R system and boot from hd0,1 for the normal Windows 7 desktop.

Have fun,
Eze



UPDATE:

The first time I restored the Windows systems I had to do it with the USB version of the R&R system (which you can create in Windows while it is still running) since I had not figured out yet how to boot the R&R partition. GRUB did not show up and instead it booted directly into Windows 7. Since the F11 option was in the BIOS menu again and was also working, I assumed the restore process also restored the MBR to its orginal pre-installed state.
This time I did a restore using the R&R pre-installed on hd0,0 and to my surprise GRUB showed up when rebooting after the restore and it worked perfectly. An even bigger surprise was that nevertheless the F11 option showed up in the BIOS boot menu and using it started the R&R system without showing GRUB. The only explanation I can think of is that, when restoring from the pre-installed R&R on hd0,0, the MBR is not restored to its pre-installed state, but instead the current MBR is extended enabling the MBR to catch the F11 keypress and boot the Windows 7 bootloader on hd0,0 directly.
So there seems to be a difference between the ways the MBR is 'restored' when doing a restore using R&R from USB and hd0,0, respectively. A way to check this theory would be to get the MBRs using Linux and dd for both restored methods and then compared them, maybe even run them through a disassembler and compared the code. No, I will not do that, since I am happy the way things work now and pretty sick of the restore screen. :wink:

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 3 guests