View previous topic :: View next topic |
Author |
Message |
Satarsa n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Sep 2005 Posts: 70 Location: Russia, St.-Petersburg
|
Posted: Fri Jan 25, 2019 8:07 pm Post subject: Dracut drops to a shell with a strange message |
|
|
I have a disk encrypted by luks, the encrypted key is stored on a usb stick. When dracut boots the kernel, it gives this error message:
Code: |
[ 3.466770] dracut: Probing /dev/sde1 for /key...
[ 3.629063] EXT4-fs (sde1): mounted filesystem with ordered data mode. Opts: (null)
[ 3.641960] dracut: Found /key on /dev/sde1
[ 3.652221] dracut: luksOpen /dev/nvme0n1p2 luks-0cd5d4cd-730f-42c1-a2c5-d9ce3dbbff96
[ 3.658428] dracut: Using '/key' on '/dev/sde1'
[ 3.821279] EXT4-fs (sde1): mounted filesystem with ordered data mode. Opts: (null)
[ 6.882036] EXT4-fs (dm-0): INFO: recovery required on readonly filesystem
[ 6.883338] EXT4-fs (dm-0): write access will be enabled during recovery
[ 7.275155] EXT4-fs (dm-0): orphan cleanup on readonly fs
[ 7.276663] EXT4-fs (dm-0): 2 orphan inodes deleted
[ 7.277893] EXT4-fs (dm-0): recovery complete
[ 7.294063] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: data=ordered
[ 7.322992] dracut: Checking ext4: /dev/disk/by-uuid/7cec672b-cb75-4f9f-812d-77fe1fdb3124
[ 7.324296] dracut: issuing _drv=e2fsck fsck_drv_com -a /dev/disk/by-uuid/7cec672b-cb75-4f9f-812d-77fe1fdb3124
[ 7.327145] dracut Warning: _drv=e2fsck fsck_drv_com returned with 127
[ 7.329694] dracut Warning: *** An error occurred during the file system check.
[ 7.332215] dracut Warning: *** Dropping you to a shell; the system will try
[ 7.334721] dracut Warning: *** to mount the filesystem(s), when you leave the shell.
[ 7.339653] dracut Warning:
|
If I just leave the shell, it continues normal booting.
I tried to google this error message, but it seems that I am the only such lucky person in the world.
How could I fix this? Can I avoid to be dropped to the shell and simply go further? Please, help ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Fitzcarraldo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/32674073548b9c27b587f8.jpg)
Joined: 30 Aug 2008 Posts: 2056 Location: United Kingdom
|
Posted: Fri Jan 25, 2019 11:27 pm Post subject: |
|
|
Code: | Warning: _drv=e2fsck fsck_drv_com returned with 127 |
Looks like it finds some fsck error(s) and wants you to run fsck interactively - see dracut error on boot [solved]:
Guest leon244 wrote: | Ian, thank you. You were correct. The next time I booted and it dropped me into a shell I ran e2fsck on the named partition and did the repairs it wanted. When I rebooted the error message was gone. |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.
My blog |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Satarsa n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Sep 2005 Posts: 70 Location: Russia, St.-Petersburg
|
Posted: Sat Jan 26, 2019 12:35 am Post subject: |
|
|
Thanks for the answer, but it did not help.
Actually I noticed that in the shell it gives more info:
Code: |
/lib/fs-lib.sh: line 109: _drv=e2fsck fsck_drv_com: command not found
|
/usr/lib64/dracut/modules.d/99fs-lib/fs-lib.sh:
Code: |
# common code for checkers that follow usual subset of options and return codes
fsck_drv_com() {
local _ret
local _out
if ! strglobin "$_fop" "-[ynap]"; then
_fop="-a ${_fop}"
fi
info "issuing $_drv $_fop $_dev"
# we enforce non-interactive run, so $() is fine
_out=$($_drv $_fop "$_dev")
_ret=$?
fsck_tail
return $_ret
}
|
Line 109 is that one which starts with _out. Plus this comment
Code: |
# we enforce non-interactive run, so $() is fine
|
looks suspicious.
It looks like a bug or typo in those dracut script, like it does not evaluate the variable $_drv, just running _drv, or there is a problem in those magic $($_...).
I have no idea how to fix it, shell is not my favorite language ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Satarsa n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Sep 2005 Posts: 70 Location: Russia, St.-Petersburg
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mDup Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Apr 2006 Posts: 212
|
Posted: Sun Feb 03, 2019 7:16 pm Post subject: |
|
|
Fitzcarraldo wrote: | Code: | Warning: _drv=e2fsck fsck_drv_com returned with 127 |
Looks like it finds some fsck error(s) and wants you to run fsck interactively - see dracut error on boot [solved]:
Guest leon244 wrote: | Ian, thank you. You were correct. The next time I booted and it dropped me into a shell I ran e2fsck on the named partition and did the repairs it wanted. When I rebooted the error message was gone. |
|
same problem here, any tmp preferred solution ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Satarsa n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Sep 2005 Posts: 70 Location: Russia, St.-Petersburg
|
Posted: Sun Feb 03, 2019 7:50 pm Post subject: |
|
|
mDup wrote: | same problem here, any tmp preferred solution ? |
The problem is with bash-5. That patch from the bug report seems to work, I hope it will be submitted to the portage tree soon. Or you can downgrade bash to version 4, it will solve the problem. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mDup Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Apr 2006 Posts: 212
|
Posted: Sun Feb 03, 2019 8:46 pm Post subject: |
|
|
Satarsa wrote: | mDup wrote: | same problem here, any tmp preferred solution ? |
The problem is with bash-5. That patch from the bug report seems to work, I hope it will be submitted to the portage tree soon. Or you can downgrade bash to version 4, it will solve the problem. |
I used patch from Comment 9 in gentoo which seems clumsy. But it works
The debian bug #920563 verbatim patch I cannot find.
I see the oneline change but don't know exactly where to put it. I prefer a real patch file to apply.
Which of both patch you refer to? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Satarsa n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 21 Sep 2005 Posts: 70 Location: Russia, St.-Petersburg
|
Posted: Sun Feb 03, 2019 9:59 pm Post subject: |
|
|
mDup wrote: | Which of both patch you refer to? |
I put this line
Code: | [ -f /bin/bash ] && [ "$BASH" = "/bin/sh" ] && exec /bin/bash /init |
in /usr/lib/dracut/modules.d/99base/init.sh just after the first line, ie:
Code: |
#!/bin/sh
[ -f /bin/bash ] && [ "$BASH" = "/bin/sh" ] && exec /bin/bash /init
|
rebuilt the kernel (I use efi-stub with internal initramfs), and then it works as expected.
As I understand, the problem is that bash version 5 started as /bin/sh behaves according to the POSIX standard, but dracut relies on the bash-specific features, and that line just restarts bash as /bin/bash instead of /bin/sh. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
f4u5t n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Jul 2008 Posts: 45
|
Posted: Wed Feb 13, 2019 2:34 am Post subject: |
|
|
Satarsa wrote: | mDup wrote: | Which of both patch you refer to? |
I put this line
Code: | [ -f /bin/bash ] && [ "$BASH" = "/bin/sh" ] && exec /bin/bash /init |
in /usr/lib/dracut/modules.d/99base/init.sh just after the first line, ie:
Code: |
#!/bin/sh
[ -f /bin/bash ] && [ "$BASH" = "/bin/sh" ] && exec /bin/bash /init
|
|
A more gentoo-like way to accomplish this is to create a file /etc/portage/patches/sys-kernel/dracut/dracut-requires-bash.patch with contents:
Code: |
diff -urN dracut-049.dist/modules.d/99base/init.sh dracut-049/modules.d/99base/init.sh
--- dracut-049.dist/modules.d/99base/init.sh 2018-10-08 06:38:33.000000000 -0700
+++ dracut-049/modules.d/99base/init.sh 2019-02-12 16:44:10.990128149 -0800
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Licensed under the GPLv2
#
|
This will work even if dracut gets re-emerged. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|