Grub2, NTFS Recovery Partition & OpenSUSE 12.3

I am frustrated beyond belief and hope somebody else that has experience could help work through this. I have a Lenovo Helix that I want to reinstall Windows 8 on; Linux is just not ready to be a full tablet system and I do not want to install Android x86. I left the recovery partition alone and it still exists; however, I cannot get grub2 to see it at all.

I have searched these forums, the Internet and Ubuntu’s site. Anything dealing with Debian is a no-go as they have a script called “update-grub” that will implement changes made in /etc/grub.d/.

After reading many posts, I created the following:

/etc/grub.d/11_Windows


#!/bin/bash -e
echo "Adding Windows">&2
cat<<EOF
menuentry "Lenovo Recovery" {
set root=(hd0,5)
chainloader +1
}
EOF

I then run the command:


grub2-efi-mkconfig -o /boot/grub2-efi/grub.cfg

and receive the following:


Generating grub.cfg ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-3.7.10-1.16-desktop
Found initrd image: /boot/initrd-3.7.10-1.16-desktop
Found linux image: /boot/vmlinuz-3.7.10-1.1-desktop
Found initrd image: /boot/initrd-3.7.10-1.1-desktop
Adding Windows
    No volume groups found
done

gparted shows:


/dev/sda2          fat16          /boot/efi          260.00 MiB
/dev/sda1          crypt-luks                         2.00 GiB [This is my swap space]
/dev/sda3          ext-4         /                      40.30 GiB
/dev/sda4          crypt-luks  /home              107.00 GiB
/dev/sda5          ntfs          /mnt/ntfs           10.14 GiB
unallocated                                               7.00 GiB

I mounted the ntfs partition and re-ran


grub2-efi-mkconfig -o /boot/grub2-efi/grub.cfg

And it still did not find the Windows Recovery partition.

Grub used to be wonderfully useful and intuitive; or, if not intuitive, at least easy to learn; adding a Windows partition to grub2 seems to take some voodoo as I cannot find a straight example anywhere.

Any help is much appreciated, thank you.

Continuing my search, I found another openSUSE forums threadand tried to implement their solutions, to no avail.

I added the following to /etc/grub.d/40_custom:


menuentry "Lenovo Recovery" {
  insmod part_gpt
  insmod ntfs
  insmod search_fs_uuid
  insmod chain
  search --fs-uuid --no-floppy --set=root D6F09912F098FA47
  chainloader ($(root)/RecoveryImage/install.wim
}

This returned a ton of errors.

D6F09912F098FA47 = /dev/sda5 uuid.

I used the following command to find the uuid:


grub2-probe -t fs_uuid -d /dev/sda5

Why does grub2 have to be so darn complicated? =/

I also ran the command:


os-prober

and it returned


No volume groups found

I have had /dev/sda5 both mounted and unmounted; Dolphin, nautilus and Thunar all see the Lenovo Recovery partition and i can browse that partition using those file managers; however, that is the extent of it.

More work:

efibootmgr -v


BootCurrent: 0018
Timeout: 0 seconds
BootOrder: 0018,0019,0000,0001,0002,0003,0007,0008,0009,000A,000B,000C,000D,000E,000F,0011,0010,0012
Boot0000  Setup    
Boot0001  Boot Menu    
Boot0002  Diagnostic Splash Screen    
Boot0003  Lenovo Diagnostics    
Boot0004  Startup Interrupt Menu    
Boot0005  ME Configuration Menu    
Boot0006  Rescue and Recovery    
Boot0007* USB CD    030a2400d23878bc820f604d8316c068ee79d25b86701296aa5a7848b66cd49dd3ba6a55
Boot0008* USB FDD    030a2400d23878bc820f604d8316c068ee79d25b6ff015a28830b543a8b8641009461e49
Boot0009* ATAPI CD0    030a2500d23878bc820f604d8316c068ee79d25baea2090adfde214e8b3a5e471856a35401
Boot000A* ATA HDD0    030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f600
Boot000B* ATA HDD1    030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f601
Boot000C* ATA HDD2    030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f602
Boot000D* USB HDD    030a2400d23878bc820f604d8316c068ee79d25b33e821aaaf33bc4789bd419f88c50803
Boot000E* PCI LAN    030a2400d23878bc820f604d8316c068ee79d25b78a84aaf2b2afc4ea79cf5cc8f3d3803
Boot000F* ATAPI CD1    030a2500d23878bc820f604d8316c068ee79d25baea2090adfde214e8b3a5e471856a35404
Boot0010  Other CD    030a2500d23878bc820f604d8316c068ee79d25baea2090adfde214e8b3a5e471856a35406
Boot0011* ATA HDD3    030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f604
Boot0012  Other HDD    030a2500d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f606
Boot0013* IDER BOOT CDROM    ACPI(a0341d0,0)PCI(16,2)ATAPI(0,1,0)
Boot0014* IDER BOOT Floppy    ACPI(a0341d0,0)PCI(16,2)ATAPI(0,0,0)
Boot0015* ATA HDD    030a2400d23878bc820f604d8316c068ee79d25b91af625956449f41a7b91f4f892ab0f6
Boot0016* ATAPI CD:    030a2400d23878bc820f604d8316c068ee79d25baea2090adfde214e8b3a5e471856a354
Boot0017* PCI LAN    030a2400d23878bc820f604d8316c068ee79d25b78a84aaf2b2afc4ea79cf5cc8f3d3803
Boot0018* opensuse    HD(2,1f4800,82000,3fc7f419-1350-4cca-85dc-9b852f471937)File(\EFI\opensuse\grubx64.efi)
Boot0019* Windows Boot Manager    HD(2,1f4800,82000,3fc7f419-1350-4cca-85dc-9b852f471937)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................

I found an error in /etc/grub.d/40_custom and changed it to:


menuentry "Lenovo Recovery" {
  insmod part_gpt
  insmod ntfs
  insmod search_fs_uuid
  insmod chain
  search --fs-uuid --no-floppy --set=root D6F09912F098FA47
  chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

the (${root}) had another set of parentheses instead of the curly brackets. Following the advice on a second openSUSE forum post.

I also changed the line:


...
insmod ntfs
...

to


...
insmod fat
...

And still does not work.

The entry shows up on the Grub2 menu, but when I try to boot it gives the following:


error: No server is specified

Not sure what that means, but I’ll look it up. Hope I can find it, as grub2 seems to be fairly esoteric.

I ran blkid:


/dev/sda1: UUID="b24db185-f3f1-4db6-b372-0d888768b741" TYPE="crypto_LUKS" 
/dev/sda2: SEC_TYPE="msdos" UUID="D490-C000" TYPE="vfat" 
/dev/sda3: UUID="eb326845-4441-4c20-8bc6-6ee43efbd1a3" TYPE="ext4" 
/dev/sda4: UUID="1ef89f7e-8e9d-44bd-8ecb-178917012b5d" TYPE="crypto_LUKS" 
/dev/sda5: LABEL="Lenovo_Recovery" UUID="D6F09912F098FA47" TYPE="ntfs" 
/dev/mapper/cr_swap: UUID="2a94f6c2-bef1-4a2d-a6b8-cb0bd5f9893b" TYPE="swap" 
/dev/mapper/cr_home: UUID="da200646-9f32-4f81-b8f7-3f4d86ae553a" TYPE="ext4" 

On Fri 25 Oct 2013 08:06:03 PM CDT, susecmail wrote:

BootCurrent: 0018
Timeout: 0 seconds
BootOrder:
0018,0019,0000,0001,0002,0003,0007,0008,0009,000A,000B,000C,000D,000E,000F,0011,0010,0012
Boot0000 Setup Boot0001 Boot Menu
Boot0002 Diagnostic Splash Screen
Boot0003 Lenovo Diagnostics
Boot0004 Startup Interrupt Menu
Boot0005 ME Configuration Menu
Boot0006 Rescue and Recovery

Hi
Just run the efi file in 0006 or maybe 0003?


efibootmgr -n 0006

The reboot. If you can browse to the efi file is another method. If you have the
recovery on a USB device, it should boot from that as well.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLED 11 SP3 (x86_64) GNOME 2.28.0 Kernel 3.0.93-0.8-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

grub2? Please explain how to launch recovery partition and I will explain how to integrate it in grub2. But from what you had shown so far it appears that BIOS does some magic undocumented tricks to start it. At which point there is not much that can be done on bootloader side.