replacing initramfs-tools with dracut

This was sent to me:

hostonly="yes"
kernel_cmdline="rootovl"
filesystems+=overlay
sudo dracut /boot/nonp.img

Here is the boot entry I added to grub.cfg, which is just the regular boot entry with a different initrd.

menuentry 'Debian GNU/Linux Non-Persistent Live Mode' --class debian
--class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-simple-845ea599-84cb-40c4-b556-f999fa4d389a' {

load_video

insmod gzio

if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi

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
e04cb268-48ff-46ef-8335-e7a954f6a9bd

else

  search --no-floppy --fs-uuid --set=root
e04cb268-48ff-46ef-8335-e7a954f6a9bd

fi

echo 'Loading Linux 5.10.0-8-amd64 ...'

linux /vmlinuz-5.10.0-8-amd64 root=/dev/mapper/magian--vg-root ro  quiet ro
rd.live.image

echo 'Loading initial ramdisk ...'

initrd /nonp.img #MY NEW IMAGE CREATED WITH sudo dracut /boot/nonp.img
--force

}

Untested.

1 Like