You are not logged in.

#1 2014-10-05 12:01:32

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

[SOLVED]Stuck within emergency mode

Hello Arch Forum,

My issue is that after updating with pacman -Syu the system isn't able to boot properly (must  be really frequent among arch users ;-)). Worth noticing is that I had to update apr-util and KWalletManager by force, though at least the latter worked perfectly after that. The thing is, not only it leaves me before the usual emergency dialogue, asking either for root password or Ctrl+D, after typing a few symbols, it doesn't respond at all, the only solution being manually turning power off. It happens at different points of a bootup, typically after reaching some target. The few lines which have drawn my attention were stating that 'Filesystem is NOT clear!', though I'm unable to do anything with that, even using chroot from LiveUSB. By the way, when trying to initialize an X server from chroot, it printed out something about NVIDIA kernel module; thus I updated everything again including NVIDIA drivers, but this time depmod printed out something about invalid characters in *.ko.gz files. Looking for solution, I've run 'depmod -a', but it seems that it's looking for modules in wrong directory (of the older kernel version) so that may be a bit irrelevant in my case. The question is, how do I get my installed system to work in such matters? I understand that I have to find and resolve the problem using the capabilities of chroot, I'm not able to do that on my own.

I'm considering reinstalling, but AFAIU all mans I've found imply saving only files. Would be glad to read I'm mistaken.

Another question is, how do I downgrade system painlessly if that sh*t happens after next update? Assume that I'm not even able to boot properly.

P.S.: was such a pain to type this on smartphone, so excuse not using bbcodes and stuff. I don't have elinks installed and can't get it with pacman, though I guess I can transfer files to phone using simple 'cp'.

Last edited by L1ghtmareI (2014-10-11 07:35:21)

Offline

#2 2014-10-05 12:08:07

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [SOLVED]Stuck within emergency mode

Check your /var/log/pacman.log to see any warning. See if the boot loader is working and try to start without a graphic interface.


do it good first, it will be faster than do it twice the saint wink

Offline

#3 2014-10-05 12:44:51

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

TheSaint wrote:

Check your /var/log/pacman.log to see any warning.

Was just about to do that. Will edit the reply.

Assuming that before upgrade everything went OK, there's nothing really concerning, just some files regarding display manager, locales and sudoers saved as *.pacnew's. (I understand these files are serious, but they have nothing to do with boot IMHO.

Last edited by L1ghtmareI (2014-10-05 14:20:37)

Offline

#4 2014-10-05 12:45:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED]Stuck within emergency mode

You'll need to describe this much more clearly if you want any help.

First, why did you install using "--force"?  That almost certainly caused the problems.  Knowing what errors led you to do this might help us understand what is going on.

Beyond that you have a couple very vague descriptions of error messages.  To solve any problems we'd need to know exactly what the messages say.

If you are considering reinstalling, that should work - and it may be the only alternative if blind flailing led to this situation (so you don't even know what you've done).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2014-10-05 12:47:21

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

I just wonder if someone else ever came across the same symptomes.

Last edited by L1ghtmareI (2014-10-05 16:18:44)

Offline

#6 2014-10-05 16:20:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED]Stuck within emergency mode

Trilby wrote:

You'll need to describe this much more clearly if you want any help.
First, why did you install using "--force"?  That almost certainly caused the problems.  Knowing what errors led you to do this might help us understand what is going on.
Beyond that you have a couple very vague descriptions of error messages.  To solve any problems we'd need to know exactly what the messages say.


Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2014-10-06 12:05:52

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [SOLVED]Stuck within emergency mode

@L1ghtmareI
If you plan to reinstall, it would be helpful to save your /home if isn't a separated partition and save the package list before redoing things.

Last edited by TheSaint (2014-10-06 12:06:57)


do it good first, it will be faster than do it twice the saint wink

Offline

#8 2014-10-06 16:43:09

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

Thank you, I think there's no other choice for me now.

Last edited by L1ghtmareI (2014-10-06 16:43:35)

Offline

#9 2014-10-06 17:22:04

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

Okay, it looks like I have underexplained the issue. Firstly, the system hangs at the random stages of the boot, which is presumably due to asynchrony in actions of systemd and lines shown up on screen; the next issue is perhaps aforementioned shutdown of a keyboard.

Running 'journalctl' helped find out true reasons of the stop:
'Failed to create mount unit file /run/systemd/generator/boot.mount, as it already exists. Duplicate entry in /etc/fstab?'

'Mounting /home...
mount: unknown filesystem type 'ext4'
home.mount mount process exited, code=exited status=32
Failed to mount /home.
Dependency failed for Local File Systems.'
After that point it began stopping processes.

'sd 7:0:0:0: [sdg] No Caching mode page found
sd 7:0:0:0 [sdg] Assuming drive cache: write through'

4 seconds later
'Failed at step EXEC spawning /bin/plymouth: No such file or directory'

'Timed out waiting for device sys-subsystem-net-devices-multi-user.device.'

So it looks like something that had to deal with ext4 was missing, though I can access /home as chroot perfectly well.

Last edited by L1ghtmareI (2014-10-06 17:22:32)

Offline

#10 2014-10-07 05:31:55

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [SOLVED]Stuck within emergency mode

Are you using boot loader from different distro ?
In that case, they maybe forgotten the rw mode on the kernel line.
Other case is to check your fstab, better if we can see it here, for guideline purpose.


do it good first, it will be faster than do it twice the saint wink

Offline

#11 2014-10-07 19:37:31

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

My fstab. As far as i have to type it on phone, I'll miss first few strings and begin straight with information about partitions.

#/dev/sda2
UUID=640d3b08-4182-4e44-8fa2-267cc0bbed61  /     reiserfs    rw,relatime    0  1

#/dev/sda1
UUID=47a74a55-61c8-471d-b156-a59211239475   /boot     reiserfs    rw,relatime   0  2

#/dev/sda4
UUID=D86E-8655       /boot          vfat     rw,relatime,fmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro     $

#/dev/sda3
UUID=77a3ebe6-9ef9-4a0b-805f-3fe173a0bb2a      /var      reiserfs         rw,relatime     0  2

#/dev/sda5
UUID=a4b1ffff-079f-437a-809d-e464ab5b6d56       /home      ext4           rw,relatime,data=ordered       0  2

I use Gummiboot as a bootloader, if that's what you mean. Idk how to check if that rw mode is intact.

Offline

#12 2014-10-08 08:21:30

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [SOLVED]Stuck within emergency mode

Sorry for the constrain. Maybe you could try to use a live and transfer fstab over the air.

  • For reiserfs I'd say is a bit deprecated.

  • You have 2 conflict on mounting /boot for 2 partitions. (the latter will go in force)

  • If you're using EFI, then probably you should check

    # gdisk -l  /dev/sda |grep EFI

    Please show it here. Then you may comment out in the fstab the #/dev/sda1 next line, if the first field result is 4. or vicevesa if is 1.

  • Gummiboot should be set with the correct path, see here
    Also the new kernel should reside into the ESP, gummiboot is looking in there for the kernel or executables. In your case it could go into the wrong path.
    You should unmount /boot and remount both partitions in a different point. Then check for kernel creation date and the latest should be copied to the older, once you made a backup.


do it good first, it will be faster than do it twice the saint wink

Offline

#13 2014-10-08 12:19:12

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

I see, there is one excess /boot partition. I didn't understand completely what I was doing when creating partitions and just carbon copied conflicting instructions.
So I guess I need only VFAT one, as it's used by UEFI.

Edit: Command output

4    139028480    139552767     256.0MiB     EF00    EFI System

Still failed to mount /home.
However, it now says in 'journalctl' that it failed to create boot.mount, as it already exists. Though the file itself does not.

The directory which Gummiboot binary should be in according to the wiki was empty. I reinstalled it and it moved files from /usr/lib to the right location.
Now it's unable to mount /boot due to the same 'unknown filesystem type'. The next time is stopped at /home again.
I didn't really get the last paragraph of your message though.

I just peeked into bootloader's confs, and what surprised me was that the 'default' value in loader.conf was not 'arch' as it's mentioned in the wiki, but some hexadecimal number. Gonna try to change that if it doesn't work now, of course backing up the file.

Last edited by L1ghtmareI (2014-10-08 16:12:36)

Offline

#14 2014-10-08 19:39:48

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

Tried everything, but googling suggests that problem is the some sort of incompatibility between  bootloader and newer kernel. Could you explain a bit simplier and step-by-step how do I fix this?

Last edited by L1ghtmareI (2014-10-08 20:52:31)

Offline

#15 2014-10-09 17:36:17

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [SOLVED]Stuck within emergency mode

Gummiboot is my preferred boot manager. It's slim and easy. So we my stay talking about it, at the first.
The conditions are to determine if ESP exists and set a mount point for setting gummiboot up. By gummiboot default the mountpoint is /boot.
If you started the installation over an existing windows 8 installation, mostly then the ESP already contains a EFI directory.
As for the best trial, for your case we may act as follow:

  1. backup the data of /boot, maybe both partition in turn.

  2. check if you have booted up in EFI mode

    $ ls /sys/firmware/efi/efivars/

    that should contain several files.

  3. mount your ESP and reinstall gummiboot

    # mount /dev/sda4 /boot
    # pacman -S gummiboot
  4. check

    $ ls /boot/EFI/gummiboot/

    that should contain gummibootx64.efi

  5. check

    $ ls /boot/loader/

    it should have entries directory and loader.conf. Following the wiki you should edit in order to configure the boot. If you find hard understanding it, please PM which point you don't get.

  6. following my method you should then remake the initramfs

    # mkinitcpio -p linux
  7. for the default entry you may take idea from mine

    title       Arch Linux
    linux       /vmlinuz-linux
    initrd      /initramfs-linux.img
    options     root=LABEL=Linux64 quiet rw
  8. beware of my mode that is using partition label, that isn't a bad idea. If you didn't labeled your partition then you may have to use

     options root=UUID=D86E-8655 quiet rw
  9. last, you should empty the /boot mount point, which means once you unmount the /dev/sda4 and/or /dev/sda1 the /boot directory should be empty. If it is not, backup your files, if interested, and empty it.

These directions are specific for this case, whom else is reading this topic should take care about device's references, which are herein mentioned, that are not same elsewhere


do it good first, it will be faster than do it twice the saint wink

Offline

#16 2014-10-10 02:24:06

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

Thanks a lot for such a detailed instruction.
So, steps up to H except F are already made by me. The one thing I didn't really pay attention to is that  'default' field in loader.conf should match with one of the entries, though it's pretty obvious.
What do you mean by emptying /boot mount point? It's not about deleting all files from respective partitions, or all the previous steps would make no sense, is it?

Offline

#17 2014-10-10 07:54:38

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [SOLVED]Stuck within emergency mode

L1ghtmareI wrote:

So, steps up to H except F are already made by me.

Step F should take place within the exact condition you follow the procedure. That will ensure you to have both kernel and initramfs in the correct place, needed to boot. That means they should reside into ESP root.
In this way, future kernel updates will go right there without causing trouble.
Anyways, you might skip to repeat the entire procedure, but make sure the files are in there.
Say

$ ls /boot # after /dev/sda4 is mounted there

L1ghtmareI wrote:

What do you mean by emptying /boot mount point?

Sorry, I wasn't clear and detailing that.
Referring to your journalctl, there was some issue. I thought you could have something in /boot in the /dev/sda2 partition.
So, obviously you should keep the ESP files safe (maybe /dev/sda1 too), but you should remove any underlaying file in the mount point.

# umount /boot
# umount /boot   # make sure no mountpoint is mounted twice
# rm /boot/*

But, for safe proceeding, you try whether the system boots correctly before doing removals.

Regarding gummiboot:
default means the exact name of the configuration file you want gummiboot to point at booting time. So, in my case, I have a file named arch [1] and my loader.conf

$ cat /boot/loader/loader.conf
timeout 10
default arch

In some case I commented the timeout, since I don't expect always to chose an option.

[1] that previously displayed above

Last edited by TheSaint (2014-10-10 08:01:51)


do it good first, it will be faster than do it twice the saint wink

Offline

#18 2014-10-10 09:14:15

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

Thanks again. Sorry kept you overexplaining everything to such an inexperienced user as me. I just wanted to get to know what does emptying the mountpoint refer to, just for further use. I'll get to try the method in a couple of hours.

Offline

#19 2014-10-10 14:46:39

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

So I tried running 'mkinitcpio -p linux', it wrote that '.../3.16.1-1-ARCH'  is not a valid kernel module. The version in the name of the dir was wrong, so i specified the kernel version '3.16.3-1-ARCH' and  created 'initramfs-linux.img' and 'linux.img' in /boot.

However, when I rebooted, it wrote out the following:

: :  running early hook [udev]
Warning: /lib/modules/3.16.1-1-ARCH/modules.devname not found - ignoring    #Still the wrong kernel version!
: :  running hook [udev]
: :  Triggering uevents
Waiting 10 seconds for device /dev/sda2 ...
ERROR: device '/dev/sda2' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/sda2'.

Offline

#20 2014-10-11 04:46:58

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,536

Re: [SOLVED]Stuck within emergency mode

OK, the explanation is for you in the first place, maybe someone else later wink.

Back to the issue, the kernel is wrong compared with the modules.
Maybe you should verify that you added the reiserfs module in your mkinitcpio.conf (because you're using on your root partition)

$ head /etc/mkinitcpio.conf

Then you should reinstall the linux package while you have mounted ESP on /boot. Perhaps you might reinstall gummiboot, too


do it good first, it will be faster than do it twice the saint wink

Offline

#21 2014-10-11 07:06:26

L1ghtmareI
Member
Registered: 2014-08-29
Posts: 96

Re: [SOLVED]Stuck within emergency mode

TheSaint wrote:

Maybe you should verify that you added the reiserfs module in your mkinitcpio.conf (because you're using on your root partition)

$ head /etc/mkinitcpio.conf

This is sort of strange, because before creating new image it used to mount these partitions without any issues.

Edit: Didn't need that. Reinstalling 'linux' was perhaps the only thing I needed, as it creates new mkinitcpio image simultaneously.

Thank everyone for the assistance. Hope this thread helps someone facing the same issue.

P.S.: you're truly a saint ;-)

Last edited by L1ghtmareI (2014-10-11 07:34:39)

Offline

Board footer

Powered by FluxBB