Linux, musical road-dogging, and daily life by Paul W. Frields
Sneaky Pete, no. 71.

Sneaky Pete, no. 71.

A few months ago I discovered a neat trick you can play in Anaconda, the Fedora installer, and thought I would spend time writing it up and passing it on. Imagine you have a USB hard disk with the release tree available. It doesn’t matter what release, but let’s assume it’s something new like Fedora 11 or Rawhide. You don’t have a DVD or CD images available, but you want to run an installation from the USB hard disk.

  1. In the release tree you still have a boot.iso file, which is basically the same as the netinst disk that lets you use alternate installation methods. Write this to a CD, or use the livecd-iso-to-disk utility in the livecd-tools package to write it to a USB stick. (You knew that you could do that, right?)
  2. Boot from the CD or USB stick, and choose the Hard Disk installation method. Go through all the normal Anaconda steps, until you reach the repository configuration screen.
  3. Hit Ctrl+Alt+F2 to switch to the virtual terminal with a command shell. At this point, your hard disk is mounted at /mnt/source.
  4. Make note of where your install tree is. Let’s say that the os/ directory where you’d normally find the whole release tree for the specific release and architecture is under the f11 directory. In other words, if you cd /mnt/source/f11, and then run ls, you should see the files for the GPL, the release notes and readme files, the Packages directory, and so forth. Most importantly, you should see the repodata directory here. In other words, it should look something like this.
  5. Change directory to that directory described above, and run httpd. Yes, there’s a minimal web server available through the boot environment.
  6. Now you can disable any existing repositories, and make a new repository describing the USB hard disk folder. Define it as HTTP with the address // and uncheck the Mirror list option if needed. Remember, since the web server is running directly in the /mnt/source/f11 folder, the webserver’s root is the same as the release tree directory and the repository metadata will load when you enable this repository.
  7. Continue the installation as needed. If you have several repositories, like the original release tree and the updates, you can enable both of them and install with updates.

I’ve done this numerous times, because I have a useful little 80 GB USB hard disk that I don’t want to fill up with extra CD and DVD images, when I can just use the existing “Everything” repo and the updates for that release instead. Have fun!


  1. Please don’t use livecd-iso-to-disk on boot.iso 🙂 There are things that it doesn’t really take into consideration that can lead to really bizarre problems later on

    In F12, you can just dd the boot.iso to a stick since we’re isohyrbid’ing the boot.iso

    1. @Jeremy: You can’t even use it once? I didn’t build with persistence or a /home image — I used this process expressly for one-time use, so I wouldn’t have to waste a CD and throw more plastic and aluminum into the landfill later.

  2. Pingback: The Grand Fallacy » UTOSC 2009, Day 3.

Comments are closed.