From Fedora Project Wiki

(Package specific category)
(fix <pre> tags)
 
Line 2: Line 2:
|description=This test case is intended to validate [[Features/Dracut|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.
|description=This test case is intended to validate [[Features/Dracut|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.
|actions=
|actions=
# 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 {{filename|/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]]
<ol>
# After install, confirm that your system is using a dracut-enabled initial ramdisk.  If the {{filename|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.
<li>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 {{filename|/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]]
#: <pre>
</li>
#: # rpm -ql kernel-$(uname -r) | grep "/boot/initrd.*\.img"
<li>After install, confirm that your system is using a dracut-enabled initial ramdisk.  If the {{filename|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.
#: /boot/initrd-2.6.31-0.174.rc7.git2.fc12.i686.img
<pre>
#: /boot/initrd-generic-2.6.31-0.174.rc7.git2.fc12.i686.img</pre>
# rpm -ql kernel-$(uname -r) | grep "/boot/initrd.*\.img"
# If no dracut-enabled initial ramdisk is found on your system, follow instructions at [[QA:Testcase Dracut switch to locally built ramdisk]]
/boot/initrd-2.6.31-0.174.rc7.git2.fc12.i686.img
# Create a new boot entry to use for this test.
/boot/initrd-generic-2.6.31-0.174.rc7.git2.fc12.i686.img</pre>
#: <pre>
</li>
#: # grubby --make-default --title "dracut-test" \
<li>If no dracut-enabled initial ramdisk is found on your system, follow instructions at [[QA:Testcase Dracut switch to locally built ramdisk]]
#:  --add-kernel /boot/vmlinuz-$(uname -r) \
</li>
#:  --initrd /boot/initrd-generic-$(uname -r).img \
<li>Create a new boot entry to use for this test.
#:  --copy-default</pre>
<pre>
# Determine the UUID used to reference your root (''/'') filesystem from the file {{filename|/etc/fstab}}.  Using the example below, the UUID desired is the second line (''UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1'').
  # grubby --make-default --title "dracut-test" \
#: <pre>
  --add-kernel /boot/vmlinuz-$(uname -r) \
#: # cat /etc/fstab
  --initrd /boot/initrd-generic-$(uname -r).img \
#: UUID=b18b0301-5dba-4665-b379-b8d838e24cee /boot                  ext3    defaults        1 2
  --copy-default</pre>
#: UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1 /                      ext3    defaults        1 1
</li>
#: UUID=83c52ae6-f052-4812-9f9d-a8963e0d925f swap                    swap    defaults        0 0
<li> Determine the UUID used to reference your root (''/'') filesystem from the file {{filename|/etc/fstab}}.  Using the example below, the UUID desired is the second line (''UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1'').
#: tmpfs                  /dev/shm                tmpfs  defaults        0 0
<pre>
#: devpts                  /dev/pts                devpts  defaults        0 0
# cat /etc/fstab
#: sysfs                  /sys                    sysfs  defaults        0 0
UUID=b18b0301-5dba-4665-b379-b8d838e24cee /boot                  ext3    defaults        1 2
#: proc                    /proc                  proc    defaults        0 0</pre>
UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1 /                      ext3    defaults        1 1
# Using the UUID, determine the block device using the command {{command|blkid -l -t UUID{{=}}}}.  For example:
UUID=83c52ae6-f052-4812-9f9d-a8963e0d925f swap                    swap    defaults        0 0
#: <pre>
tmpfs                  /dev/shm                tmpfs  defaults        0 0
#: # blkid -l -t UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1
devpts                  /dev/pts                devpts  defaults        0 0
#: /dev/vda2: UUID="6cad5605-1484-47a5-ae77-ba50b0556ee1" TYPE="ext3" SEC_TYPE="ext2" </pre>
sysfs                  /sys                    sysfs  defaults        0 0
# Now edit {{filename|/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''
proc                    /proc                  proc    defaults        0 0</pre>
# Now reboot the system
</li>
<li>Using the UUID, determine the block device using the command {{command|blkid -l -t UUID{{=}}}}.  For example:
<pre>
# blkid -l -t UUID=6cad5605-1484-47a5-ae77-ba50b0556ee1
/dev/vda2: UUID="6cad5605-1484-47a5-ae77-ba50b0556ee1" TYPE="ext3" SEC_TYPE="ext2" </pre>
</li>
<li>Now edit {{filename|/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''
</li>
<li>Now reboot the system</li>
</ol>
|results=
|results=
# The system boots normally.
# The system boots normally.

Latest revision as of 19:45, 19 June 2011

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.