1

After the last reboot it seems Ubuntu is not loading all its modules properly. The system doesn't see anything connected to usb, wifi, it seems keyboard and touchpad drivers aren't loaded properly. When typing into terminal the keyboard is not set to the language set in the settings.

Here is the error that occurs when system is booting:

Error occurred at line: 1
Try 'iptables-restore -h' or 'iptables-restore --help' for more information.
modprobe: ERROR: ../limod/libmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/3.16.0-30-generic/modules.dep.bin'
iptables-restore v1.4.21: iptables-restore: unable to initialize table 'filter'

I ran sudo depmod but nothing happened

Can anyone help me solve this problem?

I thought that reinstalling the kernel from live usb could solve it so I followed the instructions here: How to restore a system after accidentally removing all kernels?

however running the command apt-get install linux-image-generic returns

bash:apt-get:command not found

Another solution would be to reinstall Ubuntu, but that would delete all the apps installed and all the configurations.

Configuration:

Asus G551JW laptop
OS: Ubuntu 14.04.2 LTS 32 bit
RAM: 8GB
Partitions:
/boot  /dev/sdb1 ext4
/      /dev/sdb2 ext4
/usr   /dev/sdb3 ext4

/var   /dev/sda2 ext4
/home  /dev/sda5 ext4
swap   /dev/sda1
Zanna
  • 70,465
ips
  • 31
  • I dot see anything related to linux kernel in your post. It looks like you removed some system files, like apt-get. Something wrong with iptables configuration too. But there is no information in your post to diagnose. I suggest to re-install the system. – Pilot6 Jun 09 '15 at 12:58
  • I don't think I removed any system files, apt-get was run from live usb and it works if I'm not in chroot it seems to me that the kernel doesn't link to some modules correctly, which is why I thought reinstalling the kernel might help – ips Jun 09 '15 at 13:16
  • Kernel is not related to apt-get or iptables config at all. – Pilot6 Jun 09 '15 at 13:18
  • true, but it seems I was right that the problem was in the kernel because I managed to fix the problem by reinstalling the kernel – ips Jun 09 '15 at 14:12

1 Answers1

2

Managed to solve the problem by reinstalling the kernel from a live system.

I booted Ubuntu from live USB, downloaded the kernel 3.16.0 from ubuntu-kernel ppa, copied it to home partition, logged onto the system installed on my disk and ran the dpkg -i command.

Everything is working properly now.

After this kind of kernel installation it is advisable to run

sudo apt-get install [kernel version suited to the OS installed]
Zanna
  • 70,465
ips
  • 31
  • And what is the point of installing kernel this way? It will never update. What is your Ubuntu version? – Pilot6 Jun 09 '15 at 14:17
  • well, everything is working now. it's Ubuntu 14.04.2 LTS 32 bit – ips Jun 09 '15 at 14:37
  • You normally install kernel by sudo apt-get install linux-generic-lts-utopic. This will install latest 3.16 for this version, and it will get updates. – Pilot6 Jun 09 '15 at 14:46
  • yeah, but I couldn't connect to the internet from the previous state of the system due to the damaged kernel, now I can do that. Tnx – ips Jun 09 '15 at 15:00
  • just how exactly do you log yourself in to the non booted system? – tatsu Jan 19 '19 at 20:44