Saturday, March 30, 2013

Install an OS from a DVD iso without booting

While experimenting with LTSP on Fedora18, I realized that I would have to have a supported environment in order to be able to understand the failure on Fedora. I had an iso file of Scientific Linux 6.3 and decided to use that.

Since ltsp-build-client installs an OS in a chroot environment while the system is operational, I decided to see if I could use a LTSP script to install the Scientific Linux on a free partition.

A python program, chroot-creator, seemed a likely prospect.
  1. Commented a few lines in chroot-creator meant specifically for LTSP clients. 
  2. Chose a suitable kickstart file 
  3. Loop mounted the iso image and used it as the yum repository
  4. Started installation on on the free partition which failed.
Installation was not possible as the partition needed to be mounted and the chroot-creator installs the OS in a directory which should not be existing. So, the installation was successfully done in a directory 'Install' under the mount point.

After the installation:
  1. In Install:
    # mv * ..
  2. Modify fstab file for Scientific Linux
  3. Run grub2-mkconfig. It should find and include the Scientific Linux partition.
  4. Chroot to the SL partition
  5. Change password for root. Create additional users if needed.
Scientific Linux should now be a usable boot option.

This process should work with any distribution which is compatible with yum on Fedora.

Note: the experimental version of LTSP scripts now uses mock and chroot-creator program is not included.

No comments:

Post a Comment