Page 1 of 2 12 LastLast
Results 1 to 10 of 17

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

  1. #1
    Join Date
    Dec 2020
    Location
    Denmark
    Posts
    40

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

    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.

  2. #2
    Join Date
    Sep 2012
    Posts
    6,795

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

    Quote Originally Posted by MrBW View Post
    The less command is not available in the emergency shell
    I believe there is either more or vi command.
    Code:
    [ 2895.949491] FAT-fs (sdb1): codepage cp437 not found
    Try to mount as msdos explicitly (mount -t msdos ...)
    The provided journalctl in this emergency shell doesn't include the pager
    journalctl never "includes" any pager, it calls external command. If more is available you can use it.

    If you have another system you could check which commands are available using lsinitrd.

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,363

    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
    No, it ain't a Bash shell – your system can't find the root ‘/’ partition when booting – <https://linuxtroubleshootblog.wordpr...rst-blog-post/>.


    Bottom line –
    • It seems that, somehow, some way, an entry in the GRUB2 configuration was changed – the entry which points to the partition where the “/” (root) filesystem is located …

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

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

    Neither more or vi is available.

    If I execute "help" is says "GNU bash, version 4.4.23..." so yes, I would say it's a bash shell. But of course it's not the same as the one on a "nornal" full booted openSUSE shell but I newer said or claimed that!

    And it didn't help to add "-t msdos" when mount.....I get the error "unknown filesystem type 'msdos'"

    In my view it make the emergency shell use case very limited. One of the most important actions is to be able to read the error-log file which isn't really possible in practice.
    Do you agree and should I request a fix?

    And to be able to mount would also be helpful.

  5. #5
    Join Date
    Sep 2012
    Posts
    6,795

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

    Quote Originally Posted by MrBW View Post
    The less command is not available in the emergency shell
    I briefly tested Leap 15.2, 15.3 and Tumbleweed and all of them have less in initrd.
    Code:
    [ 2895.949491] FAT-fs (sdb1): codepage cp437 not found
    While that is a problem, in general you will not even have vfat support. It is added only on UEFI systems due to ESP.

    If you stop in initrd due to misconfiguration you should be able to mount one of your disks (or volumes or whatever) and copy rdsosreport there. Actually you should be able to load necessary kernel module (in this case nls_cp437) from root directly.

    That said it is certainly not nice, and there are multiple issues here.

    1. vfat filesystem is not functional even when dracut decices to add it. This is actually upstream issue.

    2. Should dracut always include vfat suport to facilitate collecting troubleshooting info. Each configuration is different, someone may prefer networking support etc. You certainly can arrange for necessary modules being present. Whether this should be default is subject to discussion.

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

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

    Strange! If I search for "less" in the initrd image I get this result:

    localhost:~ # lsinitrd /boot/efi/EFI/kernels/openSUSE_15.3/initrd.img | grep less
    -rw-r--r-- 1 root root 6200 Jul 16 09:54 lib/modules/5.3.18-59.16-default/kernel/drivers/input/ff-memless.ko.xz

    Just using a "default" created image using dracut.

    Could it have been injected manually in your initrd?

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

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

    Quote Originally Posted by MrBW View Post
    In my view it make the emergency shell use case very limited. One of the most important actions is to be able to read the error-log file which isn't really possible in practice.
    Can you boot the installation media?
    If yes, please follow the openSUSE trouble shooting instructions –

  8. #8
    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
    Can you boot the installation media?
    If yes, please follow the openSUSE trouble shooting instructions –
    Please stay on the subject which is: one cannot in practice read the log files in the emergency shell which is one of the most important thing to do in the shell.

    Subject has nothing to do with booting problems....I got that fully under control.

  9. #9
    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
    Can you boot the installation media?
    If yes, please follow the openSUSE trouble shooting instructions –
    And you didn't answer how less ended up in you initrd image? Are you using a custom made initrd or default automatic created?

  10. #10
    Join Date
    Sep 2012
    Posts
    6,795

    Default 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:
    Code:
    bor@leap15:~> sudo lsinitrd /boot/initrd-5.3.18-59.16-default | grep less
    -rw-r--r--   1 root     root         6200 Jul 16 10:54 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
    bor@leap15:~>
    Could it have been injected manually in your initrd?
    I have pretty much vanilla installation, no customization. Anyway, "less" is added by base dracut module since the very beginning. The only reason it could be missing is if it is not found when initrd is being created ("less" is installed as optional).

Page 1 of 2 12 LastLast

Posting Permissions

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