This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1031015 - dracut shell doesn't start
dracut shell doesn't start
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: dracut-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-11-15 08:33 EST by Jaroslav Škarvada
Modified: 2014-04-02 04:39 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-04-02 04:39:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jaroslav Škarvada 2013-11-15 08:33:01 EST
Description of problem:
I recently upgraded my machine to f20 and dracut shell doesn't work anymore.

Version-Release number of selected component (if applicable):

How reproducible:
Always, but only on the affected machine

Steps to Reproduce:
1. dracut --force
2. Boot with rd.break

Actual results:
Hang after dracut-pre-pivot: Warning: Break before switch_root

Expected results:
Dracut shell

Additional info:
rpm -qV dracut shows nothing, I didn't black list any modules. I tried the same on other machine and there it works correctly. The affected machine has filesystem on LVM in encrypted partition and I am asked for the password before the break. I am going to retry with rd.debug.
Comment 1 Harald Hoyer 2014-01-22 05:55:55 EST
Is this still a problem?
Comment 2 Jaroslav Škarvada 2014-02-26 06:12:12 EST
It still doesn't work for me.


# rpm -qV dracut

# dracut -v --force
Executing: /sbin/dracut -v --force
*** Including module: bash ***
*** Including module: i18n ***
*** Including module: ifcfg ***
*** Including module: drm ***
*** Including module: plymouth ***
*** Including module: crypt ***
*** Including module: dm ***
Skipping udev rule: 64-device-mapper.rules
Skipping udev rule: 60-persistent-storage-dm.rules
Skipping udev rule: 55-dm.rules
*** Including module: kernel-modules ***
*** Including module: lvm ***
Skipping udev rule: 64-device-mapper.rules
Skipping udev rule: 56-lvm.rules
Skipping udev rule: 60-persistent-storage-lvm.rules
*** Including module: resume ***
*** Including module: rootfs-block ***
*** Including module: terminfo ***
*** Including module: udev-rules ***
Skipping udev rule: 91-permissions.rules
*** Including module: systemd ***
*** Including module: usrmount ***
*** Including module: base ***
*** Including module: fs-lib ***
*** Including module: shutdown ***
*** Including modules done ***
*** Installing kernel module dependencies and firmware ***
*** Installing kernel module dependencies and firmware done ***
*** Resolving executable dependencies ***
*** Resolving executable dependencies done***
*** Pre-linking files ***
*** Pre-linking files done ***
*** Hardlinking files ***
*** Hardlinking files done ***
*** Stripping files ***
*** Stripping files done ***
*** Creating image file ***
*** Creating image file done ***

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora (3.13.3-201.fc20.x86_64) 20 (Heisenbug)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3512db8f-4023-4f48-9221-604fb07a73ea' {
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  eb5f3263-8b2c-4f42-ab54-57d3ad78c4d4
	  search --no-floppy --fs-uuid --set=root eb5f3263-8b2c-4f42-ab54-57d3ad78c4d4
	linux	/vmlinuz-3.13.3-201.fc20.x86_64 root=/dev/mapper/vg_dhcp30156-lv_root ro console=tty0 console=ttyS0,115200 LANG=cs_CZ.UTF-8
	initrd /initramfs-3.13.3-201.fc20.x86_64.img

# ll /boot/initramfs-3.13.3-201.fc20.x86_64.img
-rw-------. 1 root root 12249725 Feb 26 11:56 /boot/initramfs-3.13.3-201.fc20.x86_64.img

Timestamp match, so it gets regenerated.

# df | grep boot
/dev/sda1                           487652   115479  342477  26% /boot

I am using encrypted LVM which includes the root.

# lsblk 
NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                                             8:0    0 149,1G  0 disk  
├─sda1                                          8:1    0   500M  0 part  /boot
└─sda2                                          8:2    0 148,6G  0 part  
  └─luks-38babc64-c012-447d-b7ac-69c8877105a5 253:0    0 148,6G  0 crypt 
    ├─vg_dhcp30156-lv_root                    253:1    0    50G  0 lvm   /
    ├─vg_dhcp30156-lv_swap                    253:2    0   3,8G  0 lvm   [SWAP]
    └─vg_dhcp30156-lv_home                    253:3    0  94,7G  0 lvm   /home

When booting with the "rd.break" it asks me for the password then continues for a while and then hangs with the dracut-pre-pivot warning:
dracut-pre-pivot [546] Warning: Break before switch_root

But no shell, the system doesn't respond to keyboard, only CTRL + ALT + DEL works to reboot the machine.

Could you provide me information how to debug this?
Comment 3 Harald Hoyer 2014-02-26 08:29:59 EST
Does it work, if you add "plymouth.enable=0 rd.plymouth=0" ?
Comment 4 Jaroslav Škarvada 2014-02-27 05:32:48 EST
(In reply to Harald Hoyer from comment #3)
> Does it work, if you add "plymouth.enable=0 rd.plymouth=0" ?

No, it seems to be worse. I tried:
rd.break plymouth.enable=0 rd.plymouth=0
this didn't ask me for the LUKS password and I didn't see the "pre-pivot" message.

I have non-quiet boot and grub2 in text mode, i.e. there is the following line in my /etc/default/grub:

I tried to add quiet to the kernel command line, so I tried:
quiet rd.break
still no luck.

quiet rd.break plymouth.enable=0 rd.plymouth=0
I could only see:
"booting a command list"
and that was all.

I tried to swap rd.break and rd.sheel, but no luck.

Next, I am going to try to switch grub2 to the graphical mode.
Comment 5 Jaroslav Škarvada 2014-03-10 06:05:51 EDT
I figured it out, the following lines in /etc/default.d/grub are causing the problem:

GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200"

So I guess the dracut shell is shown on the serial console. I haven't verified it, because the serial line was not connected. I think this is bug in dracut, because kernel, systemd and grub has no problem with this "dual" configuration and if the serial line is disconnected everything is shown on tty0.
Comment 6 Harald Hoyer 2014-04-02 04:39:17 EDT
dracut uses /dev/console . Can't change anything here.

Note You need to log in before you can comment on or make changes to this bug.