3

I have tried using grub to boot into the filesystem but with no success. I don't want to reinstall the OS using external media. Help me out to recover this issue. Do check the screenshot of the error in the below link image.

I am using Ubuntu 18.04 LTS as the only OS in my HP pavilion g6 with an intel i5 processor and 8GB ram.

Error Image

I have tried 'e' options before booting into the system and changing the Linux command line by removing 'quiet splash' with 'nomodeset'. I have followed most of the solutions but without success.

I have tried to boot from grub using the following steps with failure and facing the same error. The commands below vary a bit as per my system -

grub> set root=(hd0,1) grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 grub> initrd /boot/initrd.img-3.13.0-29-generic grub> boot

The problem occurred when I was not able to start vbox as virtualization was disabled in the BIOS, so I rebooted the system to enable virtualization in BIOS and again after rebooting the machine, I am facing this issue.

Right now, I am only able to access the grub command-line interface and advanced boot options in Linux with 'c' and 'e' options.

UPDATE 1: I disabled virtualization but it did not resolve the issue. I am also unable to locate the file zz-resume-auto using the locate command. Grub does not recognize this command. I also tried to do that using search.file zz-resume-auto but without success. I am not too familiar with the grub command-line interface. Do help me out with the command to search for the file.

The output of ls -al /boot :-

enter image description here

UPDATE 2: I am also unable to boot into the last kernel version. I am attaching the link for further information. I tried to troubleshoot this issue using boot-repair, but without any luck. Kindly check out the boot-repair report at - http://paste.ubuntu.com/p/F2kbMT6nd5/

Thank you.

Abhishek Genva
  • 35
  • 1
  • 1
  • 7
  • 1
    Does this answer your question? [Cannot boot because: Kernel panic - not syncing: Attempted to kill init!](https://askubuntu.com/questions/92946/cannot-boot-because-kernel-panic-not-syncing-attempted-to-kill-init) and [My computer boots to a black screen, what options do I have to fix it?](https://askubuntu.com/q/162075) – karel Mar 10 '20 at 16:02
  • No. I have gone through the link but without any luck. I am doing more research on kernel panic till then. – Abhishek Genva Mar 10 '20 at 18:07
  • Did you make changes that caused this to happen? If so, what changes did you make? Is this a new system that you are creating or were you using it for a while before this started happening? please include all of this information in the original question so we can better assist you. – Gordster Mar 10 '20 at 20:06
  • I rebooted my system after enabling virtualization in BIOS. I was using this system for some time. – Abhishek Genva Mar 11 '20 at 04:25
  • Go backwards, and disable virtualization in the BIOS, and see if that gets you to boot. If it boots, try and locate the file outlined in my answer, below. – heynnema Mar 11 '20 at 14:59
  • @AbhishekGenva you have to let me know that you've accomplished my requests, so I know if we need to take another step. Start comments to me with "@heynnema" and I'll get notified. In the mean time, at the GRUB menu, try booting with the -28 kernel. Report back. – heynnema Mar 11 '20 at 18:58
  • Status please... – heynnema Mar 11 '20 at 19:52
  • @heynnema Kindly check out the update 2 on the question. I have attached the link for the boot-repair report. – Abhishek Genva Mar 12 '20 at 08:38
  • @AbhishekGenva Status please... – heynnema Mar 14 '20 at 14:48
  • @AbhishekGenva Status please... did the -28 kernel boot? – heynnema Mar 15 '20 at 15:01

3 Answers3

1

A "kernel panic" occurs when the kernel for some reason cannot continue running.

"Attempted to kill init" actually means: "init died or failed to start." This is process #1 and it has a special place in Linux such that the system cannot run without it. Most likely there's a library error or some other problem which prevented the process from starting at all. Check the dmesg logs immediately before the failure occurred.

Mike Robinson
  • 229
  • 2
  • 8
1

This error...

You've installed an application (like maybe zram, or some such) that has installed an invalid file zz-resume-auto.*, or you've manually added a file named zz-resume-auto.* somewhere that has an error in it, or you have a defective /boot/initrd.img-5.3.0-40-generic file.

Locate this file and correct the script error. Use locate -b zz-resume-auto or find / -name zz-resume-auto to help find this file. It might be in /etc/initramfs-tools/conf.d/. If so, you'll need to do a sudo update-initramfs -c -k 5.3.0-40-generic after fixing the script.

Update #1:

Disable virtualization in the BIOS, and see if that gets you to boot.

Update #2:

Trying to boot an older -28 kernel.

Update #3:

sudo update-initramfs -c -k 5.3.0-40-generic solved the problem

heynnema
  • 68,647
  • 15
  • 124
  • 180
  • No such file exists in `/etc/initramfs-tools/conf.d/` – Abhishek Genva Mar 11 '20 at 04:44
  • @AbhishekGenva I just took a guess where the file might be. Try and use `locate -b zz-resume-auto` to find it. – heynnema Mar 11 '20 at 14:00
  • @AbhishekGenva Also, edit your question and show me `ls -al /boot`. – heynnema Mar 11 '20 at 14:49
  • @AbhishekGenva Go backwards, and disable virtualization in the BIOS, and see if that gets you to boot. – heynnema Mar 11 '20 at 14:56
  • I appreciate your willingness to help me out with this issue. Do let me know if you need any additional information. Thank you. – Abhishek Genva Mar 11 '20 at 17:51
  • @AbhishekGenva Did you try disabling virtualization in the BIOS and see if you can boot again? – heynnema Mar 11 '20 at 18:16
  • @heynnema Since `locate` only reads the databases, can never report files created after the most recent update of the relevant database and doesn't confirm existence of a file, wouldn't `find` be a better choice? – Elder Geek Mar 11 '20 at 18:41
  • @ElderGeek Thanks! Would `sudo find / -name zz-resume-auto` be the correct command to do it? – heynnema Mar 11 '20 at 18:53
  • @heynnema I would think so. – Elder Geek Mar 11 '20 at 19:47
  • @ElderGeek I am not able to locate that file using both the approaches. – Abhishek Genva Mar 12 '20 at 08:40
  • @AbhishekGenva This is important... you tried booting to the -28 kernel, yes? You can, or can not, boot into Recovery Mode from the GRUB menu? If you were booted to a Ubuntu Live USB, then the `find` command would need to be changed to search on the HDD. Report back. – heynnema Mar 12 '20 at 13:37
  • @AbhishekGenva status please... – heynnema Mar 14 '20 at 00:14
  • @AbhishekGenva Status please... did the -28 kernel boot? – heynnema Mar 18 '20 at 18:32
  • @heynnema The status appears to be resolved. See the OP's comment under my answer [here](https://askubuntu.com/a/1216755/225694) – Elder Geek Mar 24 '20 at 15:51
  • @ElderGeek Yes, thanks. OP disappeared after Mar 12 and wouldn't answer 4 requests for status about booting an older -28 kernel... and that would have proven the fix provided by your answer on Mar 13 :-) – heynnema Mar 24 '20 at 16:00
1

It's entirely feasible that you have a corrupted initramfs image for the kernel you are attempting to boot. Based on your ls -al /boot output this is either 5.3.0-28 or 5.3.0-40

The initramfs is a gzipped cpio archive. At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system. All finding of the root device happens in this early userspace. These are typically found in /boot and on my system are called initrd.img-kernel-version

You can check to see if the file in question exists in the image by using the command lsinitramfs /boot/initrd.img-5.3.0-28-generic | grep zz-resume-auto (for example, adjust your filenames accordingly to the image your searching in and what you are searching for)

If this is the case, the The update-initramfs script will likely resolve the problem. Here's an excerpt from the [man page]

EXAMPLES
   Update the initramfs of the newest kernel:

   update-initramfs -u

   Create the initramfs for a specific kernel:

   update-initramfs -c -k 2.6.18-1-686

For more detail on the boot process, here's a decent introduction.

Sources:

man update-initramfs

https://unix.stackexchange.com/questions/424599/is-update-initramfs-u-needed-after-adding-or-removing-a-module-with-modprobe

https://opensource.com/article/17/2/linux-boot-and-startup

Elder Geek
  • 35,476
  • 25
  • 95
  • 181
  • Thank you for your support! Fixing the broken Initrd image worked for me. Cheers! – Abhishek Genva Mar 20 '20 at 05:19
  • @AbhishekGenva Always happy to help. – Elder Geek Mar 20 '20 at 16:23
  • I found that `lsinitramfs /boot/initrd...` only runs with `sudo` on my system. – Zanna Nov 22 '20 at 11:43
  • @Zanna What version of Ubuntu are you running on your system that required 'sudo' to accomplish this? Thanks. – Elder Geek Nov 27 '20 at 14:25
  • 1
    Sorry, it's Lubuntu 20.04 – Zanna Nov 28 '20 at 02:18
  • 1
    @Zanna That's interesting. Perhaps something has changed since this question was asked about 18.04 I'll look into that further when I get the chance. I can verify at the moment that lsinitramfs works as specified on 16.04 and 18.04 which this question was about. Perhaps default file permissions were changed? On my systems the initrd images default to -rw-r--r-- which allow all to read the content but only root can change it. – Elder Geek Dec 14 '20 at 22:43
  • since had [shared parent](https://unix.stackexchange.com/questions/648824/stuck-at-busy-box-attempt-to-boot-old-linux-at-another-partition?noredirect=1&lq=1), I am looking the update-initramfs executable, but can't find it. – Adi Prasetyo May 12 '21 at 15:01
  • @AdiPrasetyo Try the command `which update-initramfs` – Elder Geek May 16 '21 at 00:21