3

I am using Ubuntu 14.04 on vmware. I can't login to Ubuntu.

i'm in a situation similar to the one described in this post ALERT! /dev/disk/by-uuid/xxxxxxxxx does not exist. Dropping to a shell

I have tried the solution of the above post but on this command

 update-initramfs -u

I get this error

depmod error could not open directory lib/modules/3.16.0-44-generic

ls /lib

This is the content of the directory lib

Do you have any advice how this can be solved?

Raiden
  • 31
  • Which kernel do you have installed? Please add the output of uname -r. If the output deviates from the kernel version in the error message, try update-initramfs -uk $(uname -r) and then select the kernel with this version on the next boot. – s3lph Jan 11 '16 at 14:55
  • @the_Seppi With uname -r I get 3.19.0-25-generic. Running update-initramfs -uk $(uname -r) I get the same error written above but on lib/modules/3.19.0-25-generic – Raiden Jan 11 '16 at 15:15
  • Oh I just noticed that this won't work... uname -r in a chroot environment gives the kernel version of the chroot host... Fot what kernel versions do directories exist in /lib/modules? – s3lph Jan 11 '16 at 15:28
  • @the_Seppi I have added the content of the directory lib in my question. Seems that the directory modules there isn't. – Raiden Jan 11 '16 at 15:36
  • Try apt-get install --reinstall linux-headers-3.16.0-44-generic – Andrea Corbellini Jan 11 '16 at 17:21
  • @Andrea Corbellini could not resolve it.archive.ubuntu.com. Maybe a dns error? – Raiden Jan 12 '16 at 10:39
  • make sure that /etc/resolv.conf in the chroot matches the one of the host – Andrea Corbellini Jan 12 '16 at 10:59
  • @Andrea Corbellini error writing resolv.conf no such file or directory. But with ls I can see the file in the directory – Raiden Jan 12 '16 at 11:58
  • how are you writing to the file? – Andrea Corbellini Jan 12 '16 at 12:18
  • @Andrea Corbellini sudo nano /etc/resolv.conf – Raiden Jan 12 '16 at 13:36
  • oh, that's because /etc/resolv.conf is a symlink (a broken symlink in your case). Remove it before editing – Andrea Corbellini Jan 12 '16 at 13:51
  • @Andrea Corbellini perfect. Now I have edited the file writing nameserver 8.8.8.8 nameserver 8.8.4.4. But I get the same error: could not resolve it.archive.ubuntu.com. What's wrong? – Raiden Jan 12 '16 at 15:33

0 Answers0