From Fedora Project Wiki

(Created page with '{{QA/Test_Case |description=Boot from NBD root fs with dracut |actions= IN PROGRESS # Start here ... # Next do this ... # Finally click that |results= The following must be true ...')
 
No edit summary
Line 2: Line 2:
|description=Boot from NBD root fs with dracut
|description=Boot from NBD root fs with dracut
|actions=
|actions=
IN PROGRESS
 
# Start here ...
Prepare NBD server and a root fs containing the OS version we want to boot.
# Next do this ...
# Install needed packages
# Finally click that
yum install nbd anaconda anaconda-runtime
# Prepare a disk image (can be a file, disk partition, LVM volume):
dd if=/dev/zero of=/tmp/nbd.img bs=1M count=5120
# Create a file system on the image and mount it so we can install onto it
mkfs.ext3 /tmp/nbd.img
mkdir -p /mnt/nbdroot
mount -o loop /tmp/nbd.img /mnt/nbdroot
# Install the OS under /mnt/nbdroot using anaconda
anaconda --text --rootpath=/mnt/nbdroot --method=http://fedora.nano-box.net/linux/releases/11/Fedora/i386/os/
 
Note: because of {{bz|519665}} you may want to try using yum instead. You should modify your yum repos to explicitly list architecture and release version instead of meta variables:
yum groupinstall @base --root
 
# Export the image with NBD (2345 is the TCP port)
nbd-server 2345 /tmp/nbd.img
 
 
Prepare the test system to use the exported NBD image. You need to boot the kernel and initrd.img generated from Dracut with the correct parameters. You can use DHCP/PXE or local /boot disk on the test system. This example uses local /boot disk.
# The test system is pre-installed and /boot is on the local disk
# You need to use dracut to generate initrd.img and get the kernel image as well
# Place the vmlinuz and initrd.img files under /boot and configure grub.conf. It should look like:
 
# Boot the test system
 
|results=
|results=
The following must be true to consider this a successful test run. Be brief ... but explicit.  
The following must be true to consider this a successful test run.
# Step #1 completes without error
# The system will boot from the kernel+initrd pair
# The system boots into runlevel 5
# init will bring up the network interface and mount the NBD image
# Program completes wth exit code 0
# The init process will successfully switch to the new root and the system will boot into default runlevel
}}
}}

Revision as of 11:03, 27 August 2009

Description

Boot from NBD root fs with dracut


How to test

Prepare NBD server and a root fs containing the OS version we want to boot.

  1. Install needed packages
yum install nbd anaconda anaconda-runtime
  1. Prepare a disk image (can be a file, disk partition, LVM volume):
dd if=/dev/zero of=/tmp/nbd.img bs=1M count=5120
  1. Create a file system on the image and mount it so we can install onto it
mkfs.ext3 /tmp/nbd.img
mkdir -p /mnt/nbdroot
mount -o loop /tmp/nbd.img /mnt/nbdroot
  1. Install the OS under /mnt/nbdroot using anaconda
anaconda --text --rootpath=/mnt/nbdroot --method=http://fedora.nano-box.net/linux/releases/11/Fedora/i386/os/

Note: because of RHBZ #519665 you may want to try using yum instead. You should modify your yum repos to explicitly list architecture and release version instead of meta variables:

yum groupinstall @base --root
  1. Export the image with NBD (2345 is the TCP port)
nbd-server 2345 /tmp/nbd.img


Prepare the test system to use the exported NBD image. You need to boot the kernel and initrd.img generated from Dracut with the correct parameters. You can use DHCP/PXE or local /boot disk on the test system. This example uses local /boot disk.

  1. The test system is pre-installed and /boot is on the local disk
  2. You need to use dracut to generate initrd.img and get the kernel image as well
  3. Place the vmlinuz and initrd.img files under /boot and configure grub.conf. It should look like:
  1. Boot the test system

Expected Results

The following must be true to consider this a successful test run.

  1. The system will boot from the kernel+initrd pair
  2. init will bring up the network interface and mount the NBD image
  3. The init process will successfully switch to the new root and the system will boot into default runlevel