From Fedora Project Wiki

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

This test case is intended to validate dracut's ability to locate the root device when booting with root=/dev/device. Note, this test case may require a fresh installation to prepare the system.


How to test

  1. Start with a system where the root device that does not exist on an encrypted partition, a logical volume, or a RAID device. You may determine your current root device by inspecting the boot arguments provided to your system in /proc/cmdline. If uncertain, you may install a system following the instructions in QA:Testcases_anaconda_ext4_rootfs_on_disk_partition or QA:Testcases_anaconda_ext3_rootfs_on_disk_partition
  2. After install, confirm that your system is using a dracut-enabled initial ramdisk. If the kernel rpm provides a ramdisk image you likely have a host-built dracut initial ramdisk. The following example shows a system with a host-built dracut-enabled initial ramdisk.
     # rpm -ql kernel-$(uname -r) | grep "/boot/initrd.*\.img"
     /boot/initrd-2.6.31-0.174.rc7.git2.fc12.i686.img
     /boot/initrd-generic-2.6.31-0.174.rc7.git2.fc12.i686.img
  3. If no dracut-enabled initial ramdisk is found on your system, follow instructions at QA:Testcase Dracut switch to locally built ramdisk
  4. Create a new boot entry to use for this test.
      # grubby --make-default --title "dracut-test" \
      --add-kernel /boot/vmlinuz-$(uname -r) \
      --initrd /boot/initrd-generic-$(uname -r).img \
      --copy-default
  5. Determine the UUID used to reference your root (/) filesystem from the file /etc/fstab. Using the example below, the UUID desired is the second line (UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1).
     # cat /etc/fstab
     UUID=b18b0301-5dba-4665-b379-b8d838e24cee /boot                   ext3    defaults        1 2
     UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1 /                       ext3    defaults        1 1
     UUID=83c52ae6-f052-4812-9f9d-a8963e0d925f swap                    swap    defaults        0 0
     tmpfs                   /dev/shm                tmpfs   defaults        0 0
     devpts                  /dev/pts                devpts  defaults        0 0
     sysfs                   /sys                    sysfs   defaults        0 0
     proc                    /proc                   proc    defaults        0 0
  6. Using the UUID, determine the block device using the command blkid -l -t UUID=. For example:
     # blkid -l -t UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1
     /dev/vda2: UUID="6cad5605-1484-47a5-ae77-ba50b0556ee1" TYPE="ext3" SEC_TYPE="ext2" 
  7. Now edit /etc/grub.conf, locate the boot entry created earlier titled dracut-test, and change root=UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1 to match the block device noted above. In this example, use root=/dev/vda2
  8. Now reboot the system

Expected Results

  1. The system boots normally.