Installing Fedora Core

From OLPC
Revision as of 14:10, 15 June 2006 by Blizzard (talk | contribs) (add note about selinux)
Jump to navigation Jump to search

Overview

This page describes how to install Fedora Core on the One Laptop hardware. As of the writing of this document, the test-A boards have been built and distributed to quite a few people. Fedora Core does run on the hardware, with some minor changes. We'll walk you through how to make those changes.

Requirements

Hardware

You will need a few pieces of hardware to install the software on the Laptop board.

  • 1 test-A or pre-test-A OLPC board
  • 1 USB hub
  • 1 USB flash drive
  • 1 USB hard drive
  • 1 USB ethernet adapter
  • 1 external VGA-compatible monitor for display
  • 1 USB keyboard
  • 1 USB mouse

Software

Right now, you need to use the Rawhide (unstable) version of Fedora Core to install on the laptop. We will be putting our kernel changes, dependency and software changes into FC Rawhide. So our current requirements for the software include:

  • A recent rawhide snapshot (we provide some known good snapshots)
  • A place to host that snapshot on the network
  • The serenity to accept that sometimes Rawhide is broken
  • A strong will to live


Download

  • Notes here about which versions to download

Getting Ready to Install

Setting up a bootable image

Insert your USB key into another Fedora machine and run the command dmesg. The output should look something like this:

usb-storage: waiting for device to settle before scanning
  Vendor: Kingston  Model: DataTraveler 2.0  Rev: 6.16
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 2004991 512-byte hdwr sectors (1027 MB)
sda: Write Protect is off
sda: Mode Sense: 45 00 00 08
sda: assuming drive cache: write through
SCSI device sda: 2004991 512-byte hdwr sectors (1027 MB)
sda: Write Protect is off
sda: Mode Sense: 45 00 00 08
sda: assuming drive cache: write through
 sda: sda1
sd 3:0:0:0: Attached scsi removable disk sda
sd 3:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete

Note the fact that this USB key has shown up as sda. You will need this in a moment.

Make sure the device is not mounted. You can do this with a simple mount command. If /dev/sda1 shows up in the output, it's mounted. You can unmonut it by running umount /dev/sda1. Like so:

[blizzard@mobile2 images]$ mount
/dev/hda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
/dev/sda1 on /media/Kingston type vfat (rw,noexec,nosuid,nodev,shortname=winnt,uid=500)
[blizzard@mobile2 images]$ sudo umount /dev/sda1
[blizzard@mobile2 images]$


Locate the Fedora rawhide tree. In that tree find the file

images/diskboot.img

This is the file that contains a bootable image that you can use to boot on the board and run the installer. You will need to copy it in a raw format to the USB key. You use this using the dd command to the raw device. Note that this is /dev/sda not /dev/sda1. This will destroy or replace any filesystems or data on this drive.

[root@mobile2 2006-06-08-0245]# dd if=images/diskboot.img of=/dev/sda
16384+0 records in
16384+0 records out
8388608 bytes (8.4 MB) copied, 1.88433 seconds, 4.5 MB/s
[root@mobile2 2006-06-08-0245]#

Boot on the laptop

Insert the USB flash drive into one of the USB ports that's directly connected to the laptop. Do not connect it through the USB hub.

Power on the laptop board. If the BIOS detects the USB key you will see a message in the upper left hand corner of the screen that says something like:

Press F1 for Setup INITIALIZING BOOT USB DEVICE - DataTraveler 2.0  
USB Storage Class Device [xxxxxxxx/xxxx/xxxx]

or

Press F1 for Setup INITIALIZING BOOT USB DEVICE - WD1600BB-00RDA0
USB BOOTABLE HDD DEVICE [xxxxxxxx/xxxx/xxxx]

You should see the Linux kernel being loaded and then the installer being loaded. If you don't, try the USB key in a different port or disconnecting the hub. The BIOS and USB are very flaky right now because this is a temporary BIOS until LinuxBIOS comes up on the boards. In fact, you might have to disconnect the USB hub while the kernel and initrd are loaded off the USB key and then connect it quickly once the kernel has started booting.

Installing

Congratulations! Now you've made it to the Linux installer boot screen. From here you should type

linux selinux=0 text

and hit return to enter the text mode installer. The graphical installer will not run on this machine because it does not have enough memory. We disable selinux during this install because for some reason it turns a 40 minute install into a 4 hour ordeal. We aren't sure why. Please note the above instructions that say that you might have to plug the USB hub in after the initrd has been loaded and the kernel starts up due to problems with the USB stack and the BIOS.

You may also have to remove the USB plug for the keyboard and plug it back in again once the kernel has started. Once again, USB and BIOS bugs. Just don't be alarmed if your keyboard suddenly doesn't work.

From here you need to pick your install type. We've been using HTTP installs and we have D-Link USB ethernet devices that require that we pick the asix driver. We're going to assume you know how to set up a web server or nfs server to install from and you know how to set your network settings so that it can find it.

When you're setting up a partition table I suggest that you use the smallest configuration possible. This means no logical volume groups. Just three partitions:

/dev/sda1 /boot (about 128MB)
/dev/sda2 swap (about 500MB)
/dev/sda3 and / (everything else)

This makes it very easy to fix things later. Because we are going to have to fix things later.

Once you've partitioned you might have to restart to get the new partition table. Make sure you do restart instead of just trying to forge ahead.

Follow the installer prompts until you get to package selection. You should be able to install the packages you want, but be warned that picking a lot of packages will take a long time on this machine. We usually install a minimal system (unselect all the high level packages) and then install packages as we need.

Fixing post-install

  • After the install fix the bootdisk (rescue)
  • take apart the initrd
  • fix up the usb modules and sleep
  • put it all back together
  • make sure the initrd is rebuild

Common Errors

  • "invalid file system" on boot
  • kernel panic on boot