Headless Remote Fedora Linux Installation

From IdentityVectorSolutionsWiki
Revision as of 23:13, 22 November 2008 by Phil (talk | contribs) (New page: ==Background== Installing new operating systems on remote systems is a pain. Upgrading them is not much better. These instructions were used to do a re-install Fedora 9 onto a system tha...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Background

Installing new operating systems on remote systems is a pain. Upgrading them is not much better. These instructions were used to do a re-install Fedora 9 onto a system that was running a previous Fedora Core install.

Terms

  • Server = An http server that you can control the content on
  • Target System = The system you are installing/upgrading
  • Control System = The system that you are using to interact with the target

Server

  • Unpack Fedora 9 distribution DVD contents into a web-accessible directory. We'll call this /var/www/html/example.com/fedora9, which is notionally accessible via http://www.example.com/fedora9.
  • Create a kickstart file called /var/www/html/fedora9/f9.ks. It should contain the following:
install
url --url http://www.example.com/fedora9/
lang en_US.UTF-8
keyboard us
network --bootproto=dhcp --device=eth0
interactive
vnc

Target System

  • From the server location, copy isolinux/vmlinuz and isolinux/initrd.img to the target system, into /boot/fedora9/. This can be done with:
[root@target]# mkdir /boot/fedora9
[root@target]# cd -
[root@target]# wget http://www.example.com/fedora9/isolinux/vmlinuz
[root@target]# wget http://www.example.com/fedora9/isolinux/initrd.img
  • Edit /boot/grub/grub.conf to include the following:
title Install F9
  root (hd0,0)
  kernel /fedora9/vmlinuz ks=http://www.example.com/fedora9/f9.ks vncconnect=CONTROL_SYSTEM_ADDRESS ramdisk_size=81920
  initrd /fedora9/yarrow.img
  • Replace CONTROL_SYSTEM_ADDRESS above with the hostname/IP address of the control system. This can also be hostname:port.

Control System

  • Download a VNC server. I used Chicken of the VNC for OS X
  • Run the app in "Listen" or "Server" mode

Installation

  • Reboot the target system
  • If all is done correctly, the X session will start in a window on the Control System and you can proceed to install the system as if you were sitting there in person

Variations

  • Use iptables and other fun voodoo to do this over the internet
  • Use scripts to create a safe fallback to operational mode if the install is borked
  • Other neat stuff