Linux, musical road-dogging, and daily life by Paul W. Frields
 
Installing Fedora 16 with web self service.

Installing Fedora 16 with web self service.

My main workhorse station — my ThinkPad x220 — has been on Fedora 16 since before the Beta release. But today since I have a calendar free of meetings, I thought I would move my gigantic workstation to F16 as well. However, the workstation has a gigantic hard disk and contains a partial Fedora mirror. I didn’t want to move all that stuff to another station for purposes of installation, and I wanted to do a faster installation than the network would allow (even with a 10-15 Mbps and a relatively fast local Fedora mirror on the Internet at UVa or Virginia Tech), so I decided to see if I could use its own storage from which to do the installation.

Obviously it was very important for me in this situation to choose a Custom disk layout. I needed to make sure not to inadvertently wipe out the partition where my Fedora mirror material was stored. I carefully selected the appropriate options there.

Then came the hard part — having my station serve its own content to itself. I completed the installation steps up to the package selection. At this point the Anaconda installer only wants to see HTTP/HTTPS or FTP repositories for installation. So what I decided to do was to set up a minimal Apache web server to serve out content already on the hard disk to the installation program. I decided to only do an installation from the base repository for the original release, and then I’d yum update first thing after booting the new installation.

How’d I do that? Using the shell environment Anaconda provides for utility and debugging. If you hit Ctrl+Alt+F2 you can get the virtual console that holds a bash shell. Once there, you can either use rpm2cpio or manual copies to bring in the necessary content, since the installer environment is a highly stripped down Fedora installation. I did it somewhat manually, identifying a couple necessary libraries from apr and apr-util first by running ldd on the httpd binary, then bringing in httpd stuff and testing with the following command line until things worked:

httpd -e debug -X

As a result the package installation took about 3 minutes instead of 45 or more over the Internet connection (and well over an hour if I’d had to move all the mirror data around first).

I wouldn’t recommend this method unless you’re fairly comfortable with running Web servers already. And again, all of this is a highly unusual case where I was putting silly demands on the installer. But hopefully this is a nice illustration of why there’s always another way to skin a cat using Fedora. Or maybe it’s just a “stupid pet trick.” Either way, now that it’s memorialized I may be able to find this info next time I want to try this.

I’ll combine this with the information in a previous post to finish my installation shortly.

4 Comments

  1. Allen Halsey

    Very cool!

    I wish Anaconda accepted file:\\ URIs in addition to HTTP, FTP, and NFS.

    Could you have used this python command instead of httpd?

    python -m SimpleHTTPServer 8000

    Allen

    1. @Allen: Possibly, had I known it was there!

      @Mat?j: That works for loading the installer image, and for package content if you have ISO images stored, not an exploded tree. (The Anaconda repo=hd option is similarly restricted, I believe.)

Comments are closed.