I was trying to repair my GRUB after installing Windows over Ubuntu . But i couldn't repair it and asked this question. While discussing with psusi , we notice something. My installed system is 64Bit but my some library files' are 32 bit (for example : libdevmapper.so.1.02.1
).
(You can check step 13 for my question. And check other steps for see which steps i followed.)
- My old Ubuntu was installed on
/dev/sda3
. I mounted it to/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
sudo dpkg --root=/mnt/ubusda3 -i /mnt/ubusda3/var/cache/apt/archives/libbz2-1.0_1.0.5-6ubuntu1.11.10.1_amd64.deb
chroot /mnt/ubusda3
apt-get install --reinstall libdevmapper1.02.1
- And then again i tried to
update-grub
i gotmapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directory
error. - I restarted my system but nothing changed.
- i found mapdevfs on
/bin/mapdevfs
withwhich mapdevfs
command. sudo rm /bin/mapdevfs
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/ubusda3$i"; done
grub-install /dev/sda
- Finally i fix my GRUB problem. Now there is a GRUB menu while booting.
Previous Linux Versions screen (and dusts)
But when i choose Ubuntu 3.0.0.17-generic
, it's freezing on loading screen and i'm getting this error :
(Scroll Lock and Num Lock flashing.)
When i choose other kernel versions -which in previous ubuntu versions screen- , i'm getting this error for both of them.
Note 1 (for irrational John)
ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# mkdir /mnt/ubusda3
root@ubuntu:/home/ubuntu# mount /dev/sda3 /mnt/ubusda3
root@ubuntu:/home/ubuntu# for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/ubusda3$i"; done
root@ubuntu:/home/ubuntu# chroot /mnt/ubusda3/
root@ubuntu:/# apt-get -V --reinstall install libnih
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libnih
and then i noticed it's libnih1
not linbih
(http://packages.ubuntu.com/search?keywords=libnih&searchon=names&suite=oneiric§ion=all)
root@ubuntu:/# apt-get -V --reinstall install libnih1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
winbind (3.5.11~dfsg-1ubuntu2.2)
The following packages will be upgraded:
winbind (3.5.11~dfsg-1ubuntu2.1 => 3.5.11~dfsg-1ubuntu2.2)
1 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 54.7 kB/5,693 kB of archives.
After this operation, 32.8 kB disk space will be freed.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libnih1
Install these packages without verification [y/N]? y
Get:1 http://tr.archive.ubuntu.com/ubuntu/ oneiric/main libnih1 amd64 1.0.3-4ubuntu2 [54.7 kB]
Fetched 54.7 kB in 0s (57.1 kB/s)
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 196784 files and directories currently installed.)
Preparing to replace winbind 2:3.5.11~dfsg-1ubuntu2.1 (using .../winbind_2%3a3.5.11~dfsg-1ubuntu2.2_amd64.deb) ...
/sbin/runlevel: error while loading shared libraries: libnih.so.1: wrong ELF class: ELFCLASS32
* Stopping the Winbind daemon winbind
...done.
Unpacking replacement winbind ...
Preparing to replace libnih1 1.0.3-4ubuntu2 (using .../libnih1_1.0.3-4ubuntu2_amd64.deb) ...
Unpacking replacement libnih1 ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up libwbclient0 (2:3.5.11~dfsg-1ubuntu2.2) ...
Setting up samba-common (2:3.5.11~dfsg-1ubuntu2.2) ...
Setting up winbind (2:3.5.11~dfsg-1ubuntu2.2) ...
* Starting the Winbind daemon winbind
/usr/sbin/winbindd: error while loading shared libraries: libcap.so.2: wrong ELF class: ELFCLASS32
...fail!
invoke-rc.d: initscript winbind, action "start" failed.
dpkg: error processing winbind (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up libsmbclient (2:3.5.11~dfsg-1ubuntu2.2) ...
Setting up samba-common-bin (2:3.5.11~dfsg-1ubuntu2.2) ...
Setting up smbclient (2:3.5.11~dfsg-1ubuntu2.2) ...
Setting up libnih1 (1.0.3-4ubuntu2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
winbind
E: Sub-process /usr/bin/dpkg returned an error code (1)
This time i'm getting same boot error for libnih-dbus.so....
file.
Also for finding other 32bit files, i executed your commands and i see all files in /mnt/ubusda3/lib/modules/3.0.0-12-generic/
and /mnt/ubusda3/bin
are 32 bit.
Is it possible to reinstall whole kernel files ?
~/.mozilla/firefox/*.default/bookmarkbackups/
But if you got Chrome, you could sync your bookmarks to your google account and not have to worry about losing them