Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 7850  / 2 Years ago, wed, july 27, 2022, 2:28:13

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.)




  1. My old Ubuntu was installed on /dev/sda3 . I mounted it to /mnt/ubusda3

  2. 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

  3. 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

  4. sudo dpkg --root=/mnt/ubusda3 -i /mnt/ubusda3/var/cache/apt/archives/libbz2-1.0_1.0.5-6ubuntu1.11.10.1_amd64.deb

  5. chroot /mnt/ubusda3

  6. apt-get install --reinstall libdevmapper1.02.1

  7. And then again i tried to update-grub i got mapdevfs: error while loading shared libraries: libdebian-installer.so.4: cannot open shared object file: No such file or directoryerror.

  8. I restarted my system but nothing changed.

  9. i found mapdevfs on /bin/mapdevfswith which mapdevfs command.

  10. sudo rm /bin/mapdevfs

  11. for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/ubusda3$i"; done

  12. grub-install /dev/sda

  13. Finally i fix my GRUB problem. Now there is a GRUB menu while booting.
    enter image description here
    Previous Linux Versions screen (and dusts)
    enter image description here



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.)
enter image description here



When i choose other kernel versions -which in previous ubuntu versions screen- , i'm getting this error for both of them.



enter image description here



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&section=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 ?


More From » grub2

 Answers
2

OK I tried all answers, everything. But I couldn't solve my problem. And finally, I reinstall my Ubuntu.


[#39179] Wednesday, July 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whoppinolo

Total Points: 93
Total Questions: 113
Total Answers: 107

Location: Cyprus
Member since Mon, Oct 24, 2022
2 Years ago
;