Re: Trouble Booting Custom Kernel with QEMU: dracut-initqueue timeout waiting for /dev/sysvg/root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry for the delay.

On 8/31/23 15:44, Zdenek Kabelac wrote:
> Dne 31. 08. 23 v 0:40 Vishal Chourasia napsal(a):
>> On 8/30/23 20:01, Zdenek Kabelac wrote:
>>> Dne 30. 08. 23 v 8:40 Vishal Chourasia napsal(a):
>>>> Hi All,
>>>>
>> # cat /proc/cmdline
>> BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.4.7-200.fc38.x86_64
>> root=/dev/mapper/sysvg-root ro console=tty1 console=ttyS0,115200n8
>> rd.lvm.lv=sysvg/root
>>
>> I have tried passing "root=/dev/mapper/sysvg-root rd.lvm.lv=sysvg/root"
>> with the -append option and it hasn't worked either.
>>>
>>> dracut that needs to include lvm2 code and be able to activate such LV
>>> prior switch to rootfs  (having somewhere inside  lvchange -ay
>>> vgname/lvrootname)
>> 1. How may I verify that dracut has included lvm2 code or not?
>> 2. Which file in the dracut would contain
>>     `lvchange -ay vgname/lvrootname` code?
> 
> Hi
> 
> If you are making ramdisk image from the system - dracut should
> autodetect such case and build the image with lvm2 support inside
> (unless you've instructed in dracut.conf to not doing so).
> 
> You can check if you dracut ramdisk image contains /usr/sbin/lvm
Yes. /usr/sbin/lvm is present

After unarchiving the initrd.img

$ find . -name lvm
./usr/sbin/lvm
./etc/lvm

> and also if dirs  in /usr/lib/dracut/hooks do have lvm2 scripts inside

λ ls usr/lib/dracut/hooks
cleanup  cmdline  emergency  initqueue  mount  netroot  pre-mount  pre-pivot  pre-shutdown  pre-trigger  pre-udev  shutdown  shutdown-emergency

λ grep -r -i lvm *
cmdline/30-parse-lvm.sh:if [ -e /etc/lvm/lvm.conf ] && ! getargbool 1 rd.lvm.conf -d -n rd_NO_LVMCONF; then
cmdline/30-parse-lvm.sh:    rm -f -- /etc/lvm/lvm.conf
cmdline/30-parse-lvm.sh:LV_DEVS="$(getargs rd.lvm.vg -d rd_LVM_VG=) $(getargs rd.lvm.lv -d rd_LVM_LV=)"
cmdline/30-parse-lvm.sh:if ! getargbool 1 rd.lvm -d -n rd_NO_LVM \
cmdline/30-parse-lvm.sh:    info "rd.lvm=0: removing LVM activation"
cmdline/30-parse-lvm.sh:    rm -f -- /etc/udev/rules.d/64-lvm*.rules

This seems scripts under cmdline directory parse lvm related parameters
 present in the cmdline

Were you looking for lvm related scripts under pre-mount or mount directories?

> as well as /etc/lvm/lvm.conf.

filtering lines that do not start with '#'

$ grep -v '^[[:space:]]*#\|^$' etc/lvm/lvm.conf
config {
}
devices {
}
allocation {
}
log {
}
backup {
}
shell {
}
global {
}
activation {
}
dmeventd {
}

$ grep -v '^[[:space:]]*#\|^$' etc/lvm/lvmlocal.conf
local {
}
> 
> Not really sure how are you trying to build this yourself since the
> Fedora anaconda installer should be doing all of this for you
> automatically - so how did you got to the point you don't get this from
> your installation time ?

I have a VM booted with qemu-system-x86_64 and I am building kernel and initrd
on the host. I am looking to boot the VM with -kernel and -initrd options
> 
> Regards
> 
> Zdenek
> 

Thanks

vishal.c

_______________________________________________
linux-lvm mailing list
linux-lvm@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux