Page 1 of 1

Failed to update and now cannot boot, showing initramfs

Posted: Sat Nov 18, 2017 9:46 am
by mono chrome
Dear Linuxmint Community, huge and green newbie reporting in.

When i just installed my LM 18.2, in the Update Manager for some very personal reasons i've chosen not the 1st quickest local mirrors, but 2nd and 3rd instead. Everything was nice until few days later my Update Manager started showing ominous red icon in the tray: it suggested i would rather choose the quickest local mirrors. Being possessed with naturally daring behavior, i've tried to choose some very different mirrors, refreshed list of updates and tried to install them. After some errors i've switched to 1st quickest local mirrors, refresh cache, refresh list of updates, tried to install them, but then Update Manager again responds with error message. 'Okay, things will sort themselves out', - i thought and turned the machine off.

Next day, when i tried to boot the system, instead of LM 18.2 Cinnamon x64 i saw something that which i intuitively figured out as BusyBox with initramfs going on.
псто1.jpg
It stated about line 24 not being found in some script.

Somehow, i feel that this line or this script should be fixed, but i had little success trying initramfs. Gave up when tried to 'pwd' (print working directory) and system said i'm working within '/', which is root, probably. I have little wish to mess up root.

Here's my machine info from last attempt to do recovery:
https://gist.github.com/anonymous/038ac ... c950da5e65

Would appreciate any kind of help. I promise not to do any daring behavior until i finished my 9000 hours of GNU/Linux education.

Re: Failed to update and now cannot boot, showing initramfs

Posted: Sat Nov 18, 2017 10:13 am
by Laurent85
Can you boot a live usb session to try to fix the initrd ?

Re: Failed to update and now cannot boot, showing initramfs

Posted: Sat Nov 18, 2017 10:19 am
by coffee412
Well, Sounds like a real bummer. If this is a fresh install with no real personal data in your home directory then I would take the easy route and just reinstall. If thats not the case then...

I would boot from your bootable iso device and open up a term window. Then find the hard drive. It could be /dev/sda or /dev/sdb ect.. so do a

sudo fdisk -l (thats a lower case L) and take note of the device your hard drive is. Lets say its /dev/sda for arguments. Then lets check the file system and attempt a repair.

Code: Select all

sudo e2fsck /dev/sda1
Then reboot and see if it fixed things.

Going further, If you run into an error about a UEFI partition (depends on how things were installed) then try it on the second partition:

Code: Select all

sudo e2fsck /dev/sda2
Answer yes to the prompts.

Keep in mind that you first have to figure out what device your hard drive is. Do not take my example (/dev/sdaX) as gospel. Make sure.

Report back after rebooting after the filesystem check ;)

Re: Failed to update and now cannot boot, showing initramfs

Posted: Sat Nov 18, 2017 12:35 pm
by mono chrome
Thanks for attention, everyone!
coffee412 wrote:I would boot from your bootable iso device and open up a term window. Then find the hard drive. It could be /dev/sda or /dev/sdb ect.. so do a

sudo fdisk -l (thats a lower case L) and take note of the device your hard drive is. Lets say its /dev/sda for arguments. Then lets check the file system and attempt a repair.

Then reboot and see if it fixed things.
In my case it was totally /dev/sda1, just as you mentioned. But 'sudo fdisk -l' also told something red about 'Partition 2 does not start on physical sector boundary' - is it somehow related to usb stick i booted system from?
sudo fdisk -l.png
And when i try

Code: Select all

e2fsck
it fails with /dev/sda1 as well as with /dev/sda2.
sudo e2fsck dev sda2.png
Maybe, if it's worth to note, i noticed one thing: when i've tried to do recovery from bootable usb device, in 'Advanced boot' options there were versions 4.8 and 4.10 - is it different kernel updates?

Also, reinstall is an opinion too (because i always do back-ups to anything important), but i would like to know how to manage 'bad updates' in further. It seems to be an issue.

Re: Failed to update and now cannot boot, showing initramfs

Posted: Sat Nov 18, 2017 2:14 pm
by coffee412
mono chrome wrote:Thanks for attention, everyone!
coffee412 wrote:I would boot from your bootable iso device and open up a term window. Then find the hard drive. It could be /dev/sda or /dev/sdb ect.. so do a

sudo fdisk -l (thats a lower case L) and take note of the device your hard drive is. Lets say its /dev/sda for arguments. Then lets check the file system and attempt a repair.

Then reboot and see if it fixed things.
In my case it was totally /dev/sda1, just as you mentioned. But 'sudo fdisk -l' also told something red about 'Partition 2 does not start on physical sector boundary' - is it somehow related to usb stick i booted system from?
sudo fdisk -l.png

And when i try

Code: Select all

e2fsck
it fails with /dev/sda1 as well as with /dev/sda2.
sudo e2fsck dev sda2.png

Maybe, if it's worth to note, i noticed one thing: when i've tried to do recovery from bootable usb device, in 'Advanced boot' options there were versions 4.8 and 4.10 - is it different kernel updates?

Also, reinstall is an opinion too (because i always do back-ups to anything important), but i would like to know how to manage 'bad updates' in further. It seems to be an issue.

One must remember to be root to perform such things. Also be sure your filesystems (/dev/sdaX) are not mounted. If you fsck a mounted file system your asking for a major scrambling.


sudoe2fsck is not a command.

sudo e2fsck is what you need.

sudo means run the following as root. You will need to enter your user password to run the command.

Could you just copy and paste the output in your terminal instead of posting a pic. Too hard to see and not worth the effort. Just copy paste your output text and then highlight it all again and click the code button at the top of this editor :)

Re: Failed to update and now cannot boot, showing initramfs

Posted: Sat Nov 18, 2017 3:03 pm
by kukamuumuka
mono chrome wrote:

Code: Select all

e2fsck
it fails with /dev/sda1 as well as with /dev/sda2.
If you run via lveDVD or USB, the commands are

Code: Select all

sudo umount /dev/sda1  ## if it is mounted
sudo fsck -fyc /dev/sda1
/dev/sda2 is an extented partition, so do not do anything with it.