You are not logged in.

#1 2015-11-05 20:30:57

sidra
Member
Registered: 2011-12-22
Posts: 24

[Solved] Help me recover from unexpected shutdown while updating

Settup:
I run arch linux as guest inside windows 7.
It only has one partition /dev/sda1.

How it happened:
I was running a system update and got bsod from windows sad

1st boot:
I had to check the disk. There were a lot of inconsistencies.

2nd boot:
I couldn't log in at all. It wouldn't accept my password or root one.

So I booted in arch-linux live cd.
Tried changing the password and it turned out it is not wrong.

So I tried updating the system.
Turns out that the system was littered with inconsistent files that are not registered by pacman.
After a while I decided to use : pacman -Qnq | pacman -S --force -
To override the inconsistencies.

The problem:

After rebooting I get the following messages (I am copying them by hand,so theuuid stands for the long uuid):
"Warning: /lib/modules/4.2.5-1-ARCH/modules.devname not found ignoring"
"Waiting 10 seconds for device /dev/disk/by-uuid/the-uuid"
"ERROR: device 'the-uuid' not found. skiping fsck"
"ERROR: Unable to find root device 'the-uuid'. You are being dropped to a recovery shell.
..."

But I can't type in that shell... it doesn't accept anything.

I double checked and my fstab doesn't use uuid's instead it points to mounting /dev/sda1.

I have no idea how to procede here.
I read posts on google about reinstalling the packages mkinitcpio systemd linux liux-headers. And I have done that but still no change.
I even tried the linux-lts linux-lts-headers.


Can anyone help me figure that out ?

Last edited by sidra (2015-11-05 21:55:17)

Offline

#2 2015-11-05 20:34:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [Solved] Help me recover from unexpected shutdown while updating

Not sure what happened to your Arch VM but if you boot to a live CD in the VM, can you chroot into Arch install and change your password, reinstall all packages or at least the packages that were being processed when the host crashed?  Look in /var/log/pacman.log and just reinstall them.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2015-11-05 20:39:29

sidra
Member
Registered: 2011-12-22
Posts: 24

Re: [Solved] Help me recover from unexpected shutdown while updating

graysky wrote:

Not sure what happened to your Arch VM but if you boot to a live CD in the VM, can you chroot into Arch install and change your password, reinstall all packages or at least the packages that were being processed when the host crashed?  Look in /var/log/pacman.log and just reinstall them.

Yes I did boot from a live-cd. As I explained I reinstalled all installed packages. And the password seems to be the same. But I get the UUID problem.

Offline

#4 2015-11-05 20:50:36

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [Solved] Help me recover from unexpected shutdown while updating

Ah, perhaps your bootloader is using uuids?  If it's grub, you can edit /etc/grub/grub.cfg replacing it with the /dev/sda1 path.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2015-11-05 21:17:09

sidra
Member
Registered: 2011-12-22
Posts: 24

Re: [Solved] Help me recover from unexpected shutdown while updating

graysky wrote:

Ah, perhaps your bootloader is using uuids?  If it's grub, you can edit /etc/grub/grub.cfg replacing it with the /dev/sda1 path.

Aha ! thanks ! I backed up the grub.cfg, uncommented the GRUB_DISABLE_LINUX_UUID=true in /etc/default/grub and ran

grub-mkconfig -o /boot/grub/grub.cfg

. Now I get

ERROR: Root device mounted successfully, but /sbin/init does not exist. Bailing out, you are on your own. Good luck.

Now I just have to figure out why "mkconfig" produces a pre-systemd (as far as I understand it) config and how to make it generate a proper ?(pointing to / grub config...


Edit: I ended up creating the symlink.
For anyone interested the symlink is : /sbin/init -> ../llib/systemd/systemd
Don't forget to use relative path for it smile

I think it is supposed to be a symlink ?

Anyways the vm boots  now smile

Again thanks for the suggestion.

Last edited by sidra (2015-11-05 21:29:54)

Offline

Board footer

Powered by FluxBB