Simon Matter
2018-Jul-31 06:22 UTC
[CentOS] Issues booting centos7 [dracut is failing to enable centos/root, centos/swap LVs]
> Yannis Milios wrote: >>> But, what happens if you let the kernel post install scripts do the >>> work or setting up the initrd things? >> >> Initially, I just rebooted from LiveCD and left Grub,kernel and dracut >> do >> their job with the defaults, but unfortunately, boot process stops at >> initrd (dracut) stage with the following error: >> >> [ 197.768159] localhost.localdomain dracut-initqueue[252]: Warning: >> Could >> >>> not boot. [ 197.821409] localhost.localdomain systemd[1]: Received >>> SIGRTMIN+20 from >>> PID 254 (plymouthd). >>> [ 197.822328] localhost.localdomain dracut-initqueue[252]: Warning: >>> /dev/centos/root does not exist >>> [ 197.823044] localhost.localdomain dracut-initqueue[252]: Warning: >>> /dev/centos/swap does not exist >>> [ 197.846807] localhost.localdomain systemd[1]: Starting Dracut >>> Emergency >>> Shell... >>> [ 197.870983] localhost.localdomain systemd[1]: Received SIGRTMIN+21 >>> from PID 254 (plymouthd). >>> >> >> >> Then, I'm dropped to dracut shell, where I boot the system by using the >> lvm commands as described to my first post. Once in O/S, I re-create >> initrd >> by using 'dracut -f -v -a lvm' command and reboot again the system. But >> still I get the same error during boot ... >> >> If you reinstall the latest kernel, does >> >>> it change anything? >>> >> >> This is actually the latest kernel (3.10.0-862.9.1.el7.x86_64) but I >> tried to boot with the second (older) kernel >> (vmlinuz-3.10.0-327.36.3.el7.x86_64), where I got exactly the same error >> during boot. >> >> Clearly, this is not a kernel issue, perhaps not even a dracut (initrd) >> issue, since everything was working fine, before resizing the PV/LV. I >> suspect that something went wrong during that step, but what? As I can >> successfully boot the system manually via dracut, normally everything >> should be ok? no? >> >> What can prevent dracut from activating the 2 LVs (centos/root and >> centos/swap) during initial boot phase ? >> > Suggestion: once it's up, rebuild the initramfs.And when you did so, did you remove the "rd.shell" from GRUB_CMDLINE_LINUX before? Regards, Simon
Yannis Milios
2018-Jul-31 07:40 UTC
[CentOS] Issues booting centos7 [dracut is failing to enable centos/root, centos/swap LVs]
And when you did so, did you remove the "rd.shell" from GRUB_CMDLINE_LINUX> before? > >Yes, basically that option was not there by default, I added it during the troubleshootig steps. Normally, rd.lvm.lv=centos/root and rd.lvm.lv=centos/swap are the kernel parameters which are parsed to dracut for enablig the two LVs, but somehow dracut does not. I've copied the log from dracut in here, can this be helpful to locate the problem? https://privatebin.net/?fdc4052c0c402884#gdB/QYR3IeR55SxUbjfrkZPQfJ7jMxiUxq5DWhTVbWc -- Sent from Gmail Mobile
Yannis Milios
2018-Jul-31 20:35 UTC
[CentOS] Issues booting centos7 [dracut is failing to enable centos/root, centos/swap LVs]
Finally, I was able to find a solution for this. I'm posting the result here, just in case that it's useful for someone else in the future ... The problem was not in initramfs (dracut), but on the fact that /dev/sda2 partition(PV), after I resized it, somehow got 2 partition table signatures. One was set as a "dos" partition with an offset "0x1fe" and second set as "LVM_member" with an offset "0x8e". This confused blkid in initramfs, during the initial boot stage, thinking that /dev/sda2 is *not* an LVM_member but rather a simple "dos" partition, hence refused to activate centos/root and centos/swap LVs which were required to boot the machine to the O/S. What's interesting is that neither fdisk or parted were showing this second signature, however there was a trace of it in the dracut report file (/run/initramfs/rdsosreport.txt), specifically the one below.. + blkid /dev/sr0: UUID="2016-10-28-12-18-36-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos" /dev/sda1: UUID="a620a180-3a8c-4b5f-ad30-804f131a7261" TYPE="xfs" /dev/sda2: PTTYPE="dos" + blkid -o udev ID_FS_UUID=2016-10-28-12-18-36-00 ID_FS_UUID_ENC=2016-10-28-12-18-36-00 ID_FS_LABEL=CentOS_7_x86_64 ID_FS_LABEL_ENC=CentOS\x207\x20x86_64 ID_FS_TYPE=iso9660 ID_PART_TABLE_TYPE=dos To fix the problem, I booted the system from a livecd and used "wipefs" utility to erase the problematic signature "dos" and leave only the correct one "LVM_member". The exact command was: 'wipefs -o 0x1fe -ff /dev/sda2' [root at localhost ~]# blkid /dev/sr0: UUID="2016-10-28-12-18-36-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos" /dev/sda1: UUID="a620a180-3a8c-4b5f-ad30-804f131a7261" TYPE="xfs" /dev/sda2: UUID="qBSpoz-i0Zq-AwlP-kviR-leui-L9NA-pcjAg1" TYPE="LVM2_member" /dev/mapper/centos-root: UUID="a48af6f8-13d0-4c5d-a772-463b0da63bb1" TYPE="xfs" /dev/mapper/centos-swap: UUID="7f1d19db-1719-4fe8-a816-0a038a70ecde" TYPE="swap"