Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Dracut emergency shell: cannot read log, journal or mount

  1. #11
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,358

    Question Re: Dracut emergency shell: cannot read log, journal or mount

    Quote Originally Posted by MrBW View Post
    Strange! If I search for "less" in the initrd image I get this result:
    Here also with a default Leap 15.3 installation – no changes to the Kernel or initrd – no modifications to the Kernel or initrd –
    Code:
     # lsinitrd /boot/initrd-5.3.18-59.16-default | grep -i 'less'
    -rw-r--r--   1 root     root         6200 May 10 16:57 lib/modules/5.3.18-59.16-default/kernel/drivers/input/ff-memless.ko.xz
    -rwxr-xr-x   1 root     root       168064 May 25  2018 usr/bin/less
     # 
     # uname -a
    Linux xxx 5.3.18-59.16-default #1 SMP Thu Jul 15 11:28:57 UTC 2021 (0b62bdb) x86_64 x86_64 x86_64 GNU/Linux
     # 
     # find /boot/ -iname '*initrd*'
    /boot/initrd-5.3.18-59.16-default
    /boot/initrd-5.3.18-59.13-default
    /boot/initrd
    /boot/initrd-5.3.18-59.10-default
     # 
     # l --almost-all /boot/efi/
    insgesamt 40
    -rwxr-xr-x 1 root root 6322  3. Okt 2020  db*
    -rwxr-xr-x 1 root root 3724  3. Okt 2020  dbx*
    drwxr-xr-x 4 root root 8192 18. Aug 2020  EFI/
    -rwxr-xr-x 1 root root 3573  3. Okt 2020  KEK*
    -rwxr-xr-x 1 root root  886  3. Okt 2020  PK*
     # l --almost-all /boot/efi/EFI/
    insgesamt 16
    drwxr-xr-x 2 root root 8192 28. Aug 2020  boot/
    drwxr-xr-x 3 root root 8192 24. Aug 2020  opensuse/
     # l --almost-all /boot/efi/EFI/*/
    /boot/efi/EFI/boot/:
    insgesamt 1840
    -rwxr-xr-x 1 root root 939800 14. Jul 17:34 bootx64.efi*
    -rwxr-xr-x 1 root root  86352 14. Jul 17:34 fallback.efi*
    -rwxr-xr-x 1 root root 846240 14. Jul 17:34 MokManager.efi*
    
    /boot/efi/EFI/opensuse/:
    insgesamt 3184
    -rwxr-xr-x 1 root root      58 14. Jul 17:34 boot.csv*
    drwxr-xr-x 2 root root    8192 24. Aug 2020  fw/
    -rwxr-xr-x 1 root root   63744 24. Aug 2020  fwupdx64.efi*
    -rwxr-xr-x 1 root root     125 14. Jul 17:34 grub.cfg*
    -rwxr-xr-x 1 root root 1222656 14. Jul 17:34 grub.efi*
    -rwxr-xr-x 1 root root  143360 14. Jul 17:34 grubx64.efi*
    -rwxr-xr-x 1 root root  846240 14. Jul 17:34 MokManager.efi*
    -rwxr-xr-x 1 root root  939800 14. Jul 17:34 shim.efi*
     #
    But, you have an “initrd.img” located in “/boot/efi/EFI/kernels/openSUSE_15.3/” –
    • Are you building your own Kernels and/or initrd?

  2. #12
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,964

    Default Re: Dracut emergency shell: cannot read log, journal or mount

    Quote Originally Posted by MrBW View Post
    My system boot into dracut emergency shell (I assume, it's a bash shell, ver. 4.4).

    It created this error log /run/initramfs/rdsosreport.txt

    I now got two problems
    1: I want to read the log
    2: I want to copy the log to my USB stick
    3: Read the journal

    Read log:
    The less command is not available in the emergency shell :-( How can I read the log pages one at a time? Using cat scroll fast to the end-line of course.

    Mount:
    If I try to mount I get this error:
    [ 2895.949491] FAT-fs (sdb1): codepage cp437 not found

    Journal:
    The provided journalctl in this emergency shell doesn't include the pager, again it jump fast to the end-line. Any solution for this?

    Obviously I don't access this shell through SSH terminal and therefore I can't use SHIFT-PgUp to scroll up. This is the VGA console.

    Any help would be appreciated.
    How to debug Dracut problems


    https://fedoraproject.org/wiki/How_t...e_dracut_shell
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  3. #13
    Join Date
    Dec 2020
    Location
    Denmark
    Posts
    40

    Default Re: Dracut emergency shell: cannot read log, journal or mount

    Quote Originally Posted by dcurtisfra View Post
    Here also with a default Leap 15.3 installation – no changes to the Kernel or initrd – no modifications to the Kernel or initrd –
    Code:
     # lsinitrd /boot/initrd-5.3.18-59.16-default | grep -i 'less'
    -rw-r--r--   1 root     root         6200 May 10 16:57 lib/modules/5.3.18-59.16-default/kernel/drivers/input/ff-memless.ko.xz
    -rwxr-xr-x   1 root     root       168064 May 25  2018 usr/bin/less
     # 
     # uname -a
    Linux xxx 5.3.18-59.16-default #1 SMP Thu Jul 15 11:28:57 UTC 2021 (0b62bdb) x86_64 x86_64 x86_64 GNU/Linux
     # 
     # find /boot/ -iname '*initrd*'
    /boot/initrd-5.3.18-59.16-default
    /boot/initrd-5.3.18-59.13-default
    /boot/initrd
    /boot/initrd-5.3.18-59.10-default
     # 
     # l --almost-all /boot/efi/
    insgesamt 40
    -rwxr-xr-x 1 root root 6322  3. Okt 2020  db*
    -rwxr-xr-x 1 root root 3724  3. Okt 2020  dbx*
    drwxr-xr-x 4 root root 8192 18. Aug 2020  EFI/
    -rwxr-xr-x 1 root root 3573  3. Okt 2020  KEK*
    -rwxr-xr-x 1 root root  886  3. Okt 2020  PK*
     # l --almost-all /boot/efi/EFI/
    insgesamt 16
    drwxr-xr-x 2 root root 8192 28. Aug 2020  boot/
    drwxr-xr-x 3 root root 8192 24. Aug 2020  opensuse/
     # l --almost-all /boot/efi/EFI/*/
    /boot/efi/EFI/boot/:
    insgesamt 1840
    -rwxr-xr-x 1 root root 939800 14. Jul 17:34 bootx64.efi*
    -rwxr-xr-x 1 root root  86352 14. Jul 17:34 fallback.efi*
    -rwxr-xr-x 1 root root 846240 14. Jul 17:34 MokManager.efi*
    
    /boot/efi/EFI/opensuse/:
    insgesamt 3184
    -rwxr-xr-x 1 root root      58 14. Jul 17:34 boot.csv*
    drwxr-xr-x 2 root root    8192 24. Aug 2020  fw/
    -rwxr-xr-x 1 root root   63744 24. Aug 2020  fwupdx64.efi*
    -rwxr-xr-x 1 root root     125 14. Jul 17:34 grub.cfg*
    -rwxr-xr-x 1 root root 1222656 14. Jul 17:34 grub.efi*
    -rwxr-xr-x 1 root root  143360 14. Jul 17:34 grubx64.efi*
    -rwxr-xr-x 1 root root  846240 14. Jul 17:34 MokManager.efi*
    -rwxr-xr-x 1 root root  939800 14. Jul 17:34 shim.efi*
     #
    But, you have an “initrd.img” located in “/boot/efi/EFI/kernels/openSUSE_15.3/” –
    • Are you building your own Kernels and/or initrd?
    It doesn't show that less is included in the initrd-image so it will be available in the emergency shell

    In regards to my initrd location:
    No, not at all. I'm just using the boot-manager systemd-boot instead of grub.
    systemd-boot is a lot simpler and you have full control :-)
    With grub you are in the hands of an wizard-script and it's very difficult to have 100% control (well, at least that's the case for me, I'm sure there are some out there who actually have full understanding of how grub works).
    The only down-side of systemd-boot is it can only read the initrd from the efi partition whereas grub is able to read it from your root drive direcly.
    But you can place it wherever want in the efi partition. You specify the path in the systemd-boot config file.

    An example of the systemd-boot config file:

    Code:
    title      "SUSE_15x"
    linux      "/EFI/kernels/SUSE_15x/vmlinuz-5.3.18-59.10-default"
    initrd     "/EFI/kernels/SUSE_15x/initrd-5.3.18-59.10-default"
    options    root=UUID=7e9215e3-f469-4d72-bf2a-2e4c795a228b (and put your additional kernel options here)
    (this example is from another system)

    A thing of beauty...compare that with the grub config file, yark!

    When your initrd-image is rebuild e.g. at a kernel update you have to copy the initrd to the efi partition (but I have a script for that, so no hazle)

    In my old grub days I often ended up with a non-booting system and was totally lost if the chroot + grub-wizard-regenerate-script didn't work. Which happen rather often.
    With systemd-boot I can ALWAYS get my system booted by modifying the "options" line in the systemd-boot config file.

  4. #14
    Join Date
    Dec 2020
    Location
    Denmark
    Posts
    40

    Default Re: Dracut emergency shell: cannot read log, journal or mount

    Quote Originally Posted by karlmistelberger View Post
    This guide doesn't seem to show you how to actually read log file FROM the emergency shell! And that's because you can't as the necessary tools are not available in the emergency shell e.g. less or more only cat. Try to read a 2000 lines file with cat!
    And that's where your need it most, when your system will not boot.

  5. #15
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,358

    Default Re: Dracut emergency shell: cannot read log, journal or mount

    Quote Originally Posted by MrBW View Post
    I'm just using the boot-manager systemd-boot instead of grub.
    Oh yes, indeed, now things are beginning to be clear – and, there was this post – <https://forums.opensuse.org/showthre...L-Systemd-boot>.

    I hope that, you noticed the following in the systemd-boot man (7) page –
    Note that unless configured otherwise in the UEFI firmware, systemd-boot will use the US keyboard layout, so key labels might not match for keys like +/-.
    Given that, SUSE and openSUSE are both extremely quiet with respect to “systemd-boot”, I'm beginning to wonder if, an error has crept in with Leap 15.3 …

    Beginning with kernel 2.6.13, the initrd has been replaced by the initramfs (initial RAM file system), which does not require a file system driver to be mounted. openSUSE Leap exclusively uses an initramfs.

  6. #16
    Join Date
    Dec 2020
    Location
    Denmark
    Posts
    40

    Default Re: Dracut emergency shell: cannot read log, journal or mount

    Quote Originally Posted by dcurtisfra View Post
    Oh yes, indeed, now things are beginning to be clear – and, there was this post – <https://forums.opensuse.org/showthre...L-Systemd-boot>.

    I hope that, you noticed the following in the systemd-boot man (7) page –

    Given that, SUSE and openSUSE are both extremely quiet with respect to “systemd-boot”, I'm beginning to wonder if, an error has crept in with Leap 15.3 …
    When I say initrd it is implied that I'm actually talking about initramfs, which "all" distro has switched too. I will claim that initrd doesn't really exist anymore in practice, only as an alias for initramfs

    After a second test my first accusation about "less" was missing from the dracut emergency shell (the initrd image) was wrong.
    "less" does seem to be added automatically by dracut and therefore available in the Emergency shell :-/

    systemd-boot work perfectly with suse/openSUSE. I'm sure it's not updated automatically by yast or when you update the kernel with zypper, but I wouldn't expect it would.
    Just copy the new initrd image to the EFI partition at kernel updates yourself.

  7. #17
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,358

    Default Re: Dracut emergency shell: cannot read log, journal or mount

    Quote Originally Posted by MrBW View Post
    I will claim that initrd doesn't really exist anymore in practice, only as an alias for initramfs
    Yes, and, “lsinitrd” is –
    tool to show the contents of an initramfs image
    • Looks as if, the maintainers have retained the “older” tool name – to confuse people like me …

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •