RedHat Enterprise Linux – Hyper V – Kickstart

Rhel Hyper V configurationRunning a RHEL machine on a Windows Hyper H host its own charm. But to redo an installation with a kickstart file brings you back into the year 1995, when floppy disks where still present everywhere.

The machine is based on a Hyper V default configuration.

To get the kickstart boot a virtual floppy need to be created:

hyperv-fd0

Than this “floppy” has to be mounted on a virtual machine running any kind of OS. I used a RHEL 5.9 test machine logged in as root.

Now the “floppy” needs to be formatted:

# mkfs.vfat /dev/fd0

Now you will see 1.44 MB formatted legacy device and this has to be  mounted to the OS:

# mount /dev/fd0 /mnt

Now the ks.cfg file con be transferred to or created on  the “floppy”.

How to cerate a kickstart file: Goolge helps

To start the machine, mount your OS ISO (Rhel 5.9 in my case) and the Kickstart Floppy and  boot.

Now the default screen appears enter the folloeing command:

linux ks=floppy

Now the installation process starts.

One remark:

even though the hard disk is a IDE emulated device RHEL 5.9 sees it as an /dev/sdX device. In the shown config the HDD block lookslike:

##-------------- Hyper V path version-----------------------------------------
### Bootloader location & options
bootloader --location=mbr --driveorder=sda
### Setting up the standard OS partitions - assuming 80 GB OS disk ON SINGLE PATH
### Clear pre-existing partition table
clearpart --drives=sda --all --initlabel
### Setting up the boot partition (must be "native" - no LVM here)
part /boot --fstype ext3 --size=100 --ondisk=hda --asprimary
### Setting up all other partitions with LVM
part pv.0 --size=100 --ondisk=sda --grow --asprimary
##-------------- Hyper V path version-----------------------------------------

 

Leave a Reply

Your email address will not be published. Required fields are marked *