How to install Fedora w/o physical access to target machine?

Phil Meyer pmeyer at themeyerfarm.com
Thu Jun 7 22:50:31 UTC 2007


Peter Lemenkov wrote:
> Hello All!
> I want to install Fedora (or CentOS - It doesn't matter actually) to
> the target computer to which I haven't physical access (only ssh
> access to LiveCD with tiny distro). After reading documentation from
> fedoraproject.org and centos.org I mentioned that all installation
> guides begins with "reboot and boot from media" which is inacceptable
> for me.
>
> Has anyone such experience? Are there any ways to install Fedora from
> within another Linux distro?
>

Yes this can be done.

It entails modifying grub.conf and then forcing the remote system to 
boot with a specially crafted grub entry as the default.

With ssh access it is possible to get vnc to the remote host to 'watch' 
or control the install/update depending upon how much automation of the 
process you wish to do.

For folks who do servers per day (even 1 or 2) it pays to have the 
install process fully automated.  The least you can do for your 
administration staff is to build all servers identically.

There are lots of folks who manage data centers in 'lights out' mode, 
which means they are not present, and in fact, no-one is present unless 
a hardware issue is involved.  Rebuilding systems and upgrading systems 
are always done with no-one on site.  New hardware is wracked and 
stacked by hardware vendors/localized hardware contractors and then 
installed from a PXE boot process, all automated.  All the hardware guy 
did was power the unit on and look for a puff of smoke.  No smoke?  Call 
the admin and get permission to leave.

I can show you the fundamentals of rebuilding a running Linux box into a 
different release, but this discussion is really more than that.

The CD/DVD of the distro you wish to install usually will have a vmlinux 
and initrd.img in the parent drectory (or similar recognizable files).

On Fedora releases they are:

/isolinux/vmlinuz
/isolinux/initrd.img

Copy these files to the target system:/boot directory.

edit /boot/grub/grub.conf to add an entry and make this new entry the 
default.

Reboot the remote box.

Here is a SAMPLE -- DO NOT USE THIS AS IS!!!
---
#
default=1
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
        root (hd1,0)
        kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/
        initrd /initrd-2.6.11-1.1369_FC4.img
title load
        root (hd1,0)
        kernel /vmlinuz text ramdisk_size=8192 
ks=http://10.7.22.217/gomer.cfg
        initrd /initrd.img

---

This will cause this server which is running FC4, to boot into a 
kickstart served by a web server.  I don't have the vnc kernel option in 
front of me, as the last time I did this the remote process was so well 
tested I had no fear of doing it blind. :)  You will surely want to 
watch it or control it, and that is done by adding a vnc kernel parameter.

There are other ways as well.

This can be done easiest via PXE boot, where the kickstart file is 
identified via DHCP to the client.

Setting up servers to PXE boot first is a hands on thing, and requires 
careful management of the PXE (dhcp/tftp) server so that when a server 
is rebooted during a normal operation it doesn't re-install itself. :)

Hope this gives you some ideas to google for.  There is allot of good 
info out there, and lots of folks smarter than I who do this kind of 
thing every day.

Good Luck!




More information about the fedora-list mailing list