I'm trying to repair my GRUB after Windows 7 installation.
I have 64bit and 32bit live Ubuntu CDs + Super Grub Disk (Rescatux) + Boot-Repair-Disk . I'm following this answer's steps . But in 6th step I'm getting
/usr/sbin/grub-probe: error while loading shared libraries: libdevmapper.so.1.02.1: wrong ELF class: ELFCLASS32
after executing update-grub
command.
And then I tried to use Boot-Repair . Firstly tried Recommended repair and it's finished successfully but when I restart there isn't boot menu. And then next time I hold Left Shift while booting. Still it's booting Windows automatically.
And then I tried to use Advanced repair . Same results. This is my Boot-Repair logs : http://paste.ubuntu.com/936178/
I need specific answers for my system. Thank you.
Note :
My installed Ubuntu system is 64 bit and I have 64bit and 32 bit Live CDs
Note 2
(after booting with a 32bit Live CD) (look at Note 3 for 64bit Live CD results)
file /lib/libdevmapper.so.1.02.1
->/lib/libdevmapper.so.1.02.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
file /usr/sbin/grub-probe
->/usr/sbin/grub-probe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
ubuntu@ubuntu:~$ sudo mkdir /mnt/ubusda3
ubuntu@ubuntu:~$ sudo mount -t ext4 /dev/sda3 /mnt/ubusda3
ubuntu@ubuntu:~$ file /mnt/ubusda3/sbin/init
/mnt/ubusda3/sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
Note 3
(after booting with a 64bit Live CD)
file /lib/libdevmapper.so.1.02.1
->/lib/libdevmapper.so.1.02.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
file /usr/sbin/grub-probe
->/usr/sbin/grub-probe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# mkdir /mnt/ubusda3
root@ubuntu:/home/ubuntu# mount -t ext4 /dev/sda3 /mnt/ubusda3
root@ubuntu:/home/ubuntu# file /mnt/ubusda3/sbin/init
/mnt/ubusda3/sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
root@ubuntu:/home/ubuntu# file /mnt/ubusda3/lib/libdevmapper.so.1.02.1
/mnt/ubusda3/lib/libdevmapper.so.1.02.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
Drat!
I finally got a multi-boot of versions of Ubuntu and a Windows 7 install working in a VirtualBox Virtual Machine so I could experiment with the repair tools. It turns out my original suggestion was wrong and did not work as I thought it would. :-(
So ... starting over ...
While I intend to experiment more with a VM to learn more about the various tools such as the Boot-Repair tool or using a Live CD and
chroot
and to reinstall GRUB, I figured the most expedient thing I could offer now would be to sketch out one way to allow booting from Windows into the GRUB menu.I am not suggesting this as "the" final solution. But it should at least enable booting up the Ubuntu partition again which also, I think, opens up other repair options.
Also, having tried it on the VM, I have some confidence that this should work. (Mentally crossing fingers here ...)
Using EasyBCD 2.1.2 to Boot to GRUB from Windows Boot Menu
Note: This link is underneath the Buy Now button towards the bottom of the page.
While they prompt for a name & email, you are not required to enter them to do the download.
Note: This adds the NeoGrub bootloader code to your
C:\
directory.You should see the file
NeoGrub
and the directoryNST
inC:\
if the install worked correctly.Note: You can delete the entry for NeoGrub Bootloader if you wish.
It was added when you installed the NeoGrub Bootloader in step (3). You need the bootloader but you do not need a boot menu entry for it. You only need the entry added in step (5).
Boot into the live CD and try these commands (only if you already have Ubuntu installed). This is for Grub2.
You will need to find your partition with ubuntu on it and replace /dev/sdAX. This can be done with the following command
sudo fdisk -l
- and then choose the partition 'Linux'