Installing Fedora Core 2 from a hard drive

As posted on the ILUG mailing list.

Hi,

I don’t normally do this, but I had to solve a problem that’s possible for some to encounter. Any and all of the below can be contradicted or improved upon. Feel free.

I downloaded Fedora Core 2 last week with the intention of installing it on a desktop system I use here for experimentation. The system already runs Fedora Core 1. Here is what I did to install FC1:

  • Downloaded isos and put them onto a hard drive partition of the target system.
  • Mounted the first iso using the loop device:
  • # mount -o loop /opt/isos/yarrow-i386-disc1.iso /mnt/FC1.1

  • Put a floppy into the drive and created a boot disk:
  • # dd if=/mnt/FC1.1/images/bootdisk.img of=/dev/fd0

  • Rebooted the system and when asked, I chose to install from isos on the hard drive. Side note: you specify the hardware partition, in my case /dev/hda9. The directory you say where the isos are to be found is relative to the mount point of that partition and not an absolute path. In my case, after saying what partition the isos were on, I had to say they were in “/isos” and not “/opt/isos“.
  • This is a suitable way for me to install for a number of reasons:

  • I have access to high bandwidth and can download isos somewhat easily.
  • I don’t have access to a CD burner.
  • For as long as I have enough disk-space, I can continue to download isos and install many different distros — and chop and change among them. Once the disk space starts to get full, I can delete the less recent isos.
  • So, when Fedora Core 2 was announced, I decided the above would be an effective way to see what it’s like. However, and this is the point of this story, I encountered a few problems. I also solved them:

  • As before, I downloaded the isos into the /opt/isos directory.
  • I mounted the first iso as above:
  • # mount -o loop /opt/isos/FC2-i386-disc1.iso /mnt/FC2.1

  • I put a floppy into the drive and went to create a boot disk:
  • # dd if=/mnt/FC2.1/images/diskboot.img of=/dev/fd0

    And here is where I encountered my first problem. The listing of the images directory is:

    [root@localhost images]# ls -Fl
    total 10202
    -rw-r--r--  2 root root 4151296 May 13 10:24 boot.iso
    -rw-r--r--  2 root root 6291456 May 13 10:24 diskboot.img
    drwxr-xr-x  2 root root    2048 May 13 10:27 pxeboot/
    -rw-r--r--  2 root root     655 May 13 10:23 README
    -r--r--r--  1 root root     881 May 13 10:39 TRANS.TBL

    Yes indeed. diskboot.img is 6MiB big. 4 floppies worth. Reading the README, it appears the only options are to burn the boot.iso onto a CD or to put the badly named diskboot.img onto a memory key-ring-thingy. Neither is suitable as I don’t have the former and I didn’t want to go messing around with the latter, risking my valuable data.

    After some mucking around, here’s what I came up with:

  • I mounted the diskboot.img file using the loop device:
  • # mount -o loop /mnt/FC2.1/images/diskboot.img /mnt/image

  • I copied the contents into a subdirectory of /boot:
  • # mkdir /boot/FC2install
    # cp -rv /mnt/image/* /boot/FC2install

  • I edited the file /boot/grub/grub.conf to include a new entry. Essentially, it was a copied and hacked version of the default entry:
  • title Fedora Core 2 install
    	root (hd0,0)
    	kernel /FC2install/vmlinuz
    	initrd /FC2install/initrd.img

    I don’t know whether grub expects configuration lines to be preceded by a tab (^I) or if that’s a convention, but what you see above is verbatim what I added to the file.

  • I rebooted the system and when the grub menu was presented, I chose “Fedora Core 2 install”.
  • Things looked good until I realised that I wasn’t being asked how I wanted to install — No option to go “text”, how do I “kickstart”, what about my “lowres” monitor? I halted the installation and sat back to think.
  • Looking in the file /boot/FC2install/syslinux.cfg you can see what options are passed to the kernel in order to perform the different options. I realised that grub just runs the kernel command that you put into the entry. I toyed with trying to figure out how to get the options presented to you as though the system was booting from an installation floppy or a CD. Then I realised that I couldn’t be bothered. I stuck with the above grub entry which is the default, but if you prefer the “text”, “lowres” or “ks” options, or whatever, you can use /boot/FC2install/syslinux.cfg to determine what options to specify. Anyway, I started again…

  • I was asked the standard questions about installation session language and keyboard.
  • I specified that I wanted to install from the hard drive partition /dev/hda9 and that the isos were to be found in the directory /isos.
  • I was presented with a message telling me that the isos it found were not Fedora Code 2 isos and what the hell was I talking about?! Sitting back time again.
  • Looking at the installation log that’s accessible (during the
    installation session) by pressing ALT-F3, I saw that the installer
    mounted each of the isos in that directory and did some checking. The
    contents of /opt/isos were:

    [root@localhost isos]# ls -l
    total 4801492
    -rw-------  1 root  root   667529216 May 21 14:52 FC2-i386-disc1.iso
    -rw-------  1 root  root   665802752 May 21 18:55 FC2-i386-disc2.iso
    -rw-------  1 root  root   669016064 May 26 15:13 FC2-i386-disc3.iso
    -rw-------  1 root  root   203737088 May 26 17:07 FC2-i386-disc4.iso
    -rw-------  1 root  root   732463104 Apr 22 18:30 freeduc-cd-1.4.1.iso
    -rwx------  1 root  root   660340736 Apr 22 18:31 yarrow-i386-disc1.iso
    -rwx------  1 root  root   667516928 Apr 22 18:32 yarrow-i386-disc2.iso
    -rwx------  1 root  root   645464064 Apr 22 18:32 yarrow-i386-disc3.iso

    First, the installer mounted the freeduc iso, wasn’t happy with it and then mounted yarrow-i386-disc1.iso. It seemed to be happy with this one. It looked for a file called updates.img, and then a file stage2.img. Here’s where it complained. The installer was happy that the iso was a Fedora Cora iso, but when it look in this file it noticed it wasn’t an FC2 iso. Easily resolved.

  • I created the directory /opt/isos/FC1 and put all the yarrow*.iso files into it.
  • I rebooted the system again, chose the “Fedora Core 2 install” grub option, answered the first questions and told the installer that the isos were to be found on /dev/hda9 in /isos.
  • The installation continued without a hitch.
  • A lot of what I did was hunch work and I can’t explain it thoroughly. I’m especially confused as to why the sequence of mounting isos took the freeduc iso first, then the yarrow isos, and presumably then the FC2 isos if it got that far.

    However, if anyone is presented with a similar scenario: no CD burner, no memory key-ring-thingy and a boot disk image that’s too large to fit onto a floppy, the above might help.

    G’luck.

    7 Responses to “Installing Fedora Core 2 from a hard drive”

    1. Henrik Vendelbo says:

      diskboot.img not bootdisk.img
      and
      kernel /boot/FC2install/vmlinuz
      initrd /boot/FC2install/initrd.img

      otherwise great great stuff

    2. Éibhear says:

      Hi Henrik,

      With diskboot.img you’re right. Unfortunately, your corrections for the grub entry are not correct.

      As grub is a tool intended to be independent of the operating system it supports, it has its own means of identifying the disk partitions. The entry I provided is:

      title Fedora Core 2 install
      root (hd0,0)
      kernel /FC2install/vmlinuz
      initrd /FC2install/initrd.img

      This says that the root disk (for grub’s purposes) is the first partition (0) on the first disk (hd0), as grub counts from zero. This is the partion where the following specified files are to be found. Then, it says that the kernel and initrd files are to be found in the /FC2install directory on that partition. Remember that the /boot directory is the mount point for the first partition on the first disk, and is not a directory in that partition.

      Éibhear

    3. Corey says:

      Excellent!! I’m doing the exact same process with Fedora Core 4. I’m going to set it all up on my HDB with 10 GB, and hopefully use my same old swap partition in HDA (even though it’s recommended not too). 28 minutes until all HDs are downloaded :D. I have 6 boot disks (I should’ve read this tutorial before I made the disks lol), and I can’t wait until I start installing :D.

      Right now I have Debian (SID) and SuSE (Personal). I will shortly have Fedora (Core 4), then Slackware (??), and then Ubuntu (??), MANDRIVA, GENTOO, FREEBSD, AAAHHHHH!! It feels like Christmas :), I’m so excited.

      I kind of like not having my CD-RW not working :). And thank you for the great article, it helped me grasp some important concepts like the floppy boot from the HD with GRUB and FC ISO loading errors. You should write a journal and then sell it as a book :)

      Have a nice day :)

    4. Corey says:

      Oh jesus, I’m only on the 2nd disk on the downloading, NNOO!! I looked at the 4 on FC4 and I thought I was on the fourth disk :(, there’s too much evil in this world.

    5. Corey says:

      Hey it’s me again! I’ve been reading your blogs, and I really like them, and I was wondering if you can send me…the theme of this blog pplllz, I just setup WordPress on my computer and I want the same theme as yours :(.

      My email is: hollaway@gmail.com
      I know you’re probably really busy but this would mean a lot to me :)

      I’m sorry I’m using this comment as a communication thing, but I couldn’t find your email anywhere :(

    6. [...] As shown here: FC2 from HD by Éibhear. [...]

    7. hi,
      I did install Fedora Core 8 using FTP. i think it’s quite easy to install if you have limitations of DVD drive.
      what i did is described below step by setp,

      =======
      1) Create a directory named “dvd” in ftp root.

      mkdir /var/ftp/dvd

      2) Mount Fedora-Core-8.iso

      mount -o loop -t iso9660 Fedora-Core-8.iso /var/ftp/dvd

      3) Change path to your currently mounted location.

      cd /var/ftp/dvd
      here will be a folder named “images” . it contains “boot.iso” and “boot.img” that are used to boot and install fedora from scratch.

      4) Copy “boot.iso” to some where out from this locaton. i did copy to my home folder.

      cp image/boot.iso /tmp/

      5) Create a boot able disk by burning this “boot.iso” on it.

      cdrecord -dao -dev=/dev/cdrom /tmp/boot.iso

      Now we are ready to boot from cd room and to continue our Fedora Core 8 Installation.

      6) Boot From CD Rom and select ” install or upgrade” option
      7) Select ” Language and Keyboard ” options
      8) Make your LAN settings
      9) Select your Installation Method ” FTP”
      10) Enter server address and it’s directory.
      in my case it was,
      FTP = “ftp://my-ftp-ip-address”
      folder = “/dvd”
      11) it will connect to ftp server and will provide you the traditional GUI installation interface .
      12) Enjoy installing Fedora core 8 Using FTP.

    Leave a Reply