Installing Fedora Linux on a Dell Optiplex 320

This is going to be a very long and pointless post for most of you, but for anyone trying to install Fedora on one of these machines, this will be priceless!

I just bought a couple Dell Optiplex 320 machines to use in my development Linux cluster. They are 64 bit Celeron D machines at a great price. Much to my dismay, I tried installing Fedora Core 5 onto them and was met with all sorts of problems. My first clue that there was a problem was a black screen during install. I did a little googling and decided to just try the install in text mode by running ‘linux text’ at the fedora install boot prompt. This got me a little farther (further?), but it crapped out again while trying to mount the hard drive.

At this point, I googled for “linux optiplex 320” and met with a sea of unhappy customers who have been fighting to get Linux installed on their Dell Optiplex 320 box.

Turns out there’s a whole host of problems, but 18 excruciating hours later, I’m up and running! Huge! I’ll share my notes with y’all and hopefully help someone in the process.

Editor’s note: The instructions in this post are by no means all my own – I am indebted to the countless random tidbits of information posted across the blogs, forums, mailing lists, etc.

As far as I can tell, there are 4 major problems with the Optiplex and Fedora:
1. The SATA hard drive is not recognized
2. The video driver is not supported
3. The Grub bootloader does not work
4. The LVM (default) filesystem does not work with Lilo (which you use in place of Grub)

I could be wrong about 4, but I certainly couldn’t get it working.

First off, it’s important to note that this machine requires Fedora 6. It will not work with earlier versions.

Installing Fedora 6

In order to get the SATA drives to be recognized and mount, you have to pass the command line argument pci=nomsi whenever you start linux.

The first thing I did was boot off the CD drive – note that the default boot sequence is hard drive first, so you’ll have to F12 or F2 to select the CD drive.

At the prompt, I typed `linux pci=nomsi` <enter>. This will start the installation process. For the most part, you can go through the install as normal.

I was unable to get the system to boot using LVM (the logical volume manager which is the default in Fedora). I chose to manually setup my partition and setup the following partitions: /boot 100MB, /swap 1024MB, / remaining. If you prefer to use separate partitions for /usr, /home, that’s up to you.

I also told the installed to not install grub, the bootloader. You’re going to overwrite it anyway, so you don’t need it.

Once the install completes, you will be prompted to remove your media and reboot. Unfortunately, this won’t really work 😦

Installing LILO, the Boot Loader

If you reboot now, you’ll hang immediately. Grub won’t work, so we have to install Lilo. Lilo no longer ships with Fedora, so you’ll have to boot to some sort of safe mode and download it separately. I removed the CD and replaced it with the Fedora Rescue CD, which comes with the installation set. Then I rebooted off of this CD. You may be able to do the same with Knoppix or Debian Etch, but the Fedora CD worked well for me. At the boot prompt, I typed `linux pci=nomsi rescue` and started rescue mode. After going through all the standard dialogues, you eventually get to a shell with your original filesystem mounted at /mnt/sysimage. You can make this your root by running `chroot /mnt/sysimage`.

Next up we download the Lilo binary. I got mine here:
http://lilo.go.dyndns.org/
and used the following specific file:
http://home.san.rr.com/johninsd/pub/linux/lilo/lilo-22.7.3.bin.static.tar.gz
I’ll post a mirror if anyone needs.

It was easy enough to get from the command line (assuming you have network access – you should! ) using `wget`. To save yourself some typing you could always just download it onto another machine on your network and scp it over. That is especially useful for the next step 😉

Untar the lilo package and copy ./sbin/lilo to /sbin/lilo (assuming you want it installed for future use – you probably do). Next, create a file called /etc/lilo.conf and type/paste the following:

boot=/dev/sda
map=/boot/System.map-2.6.18-1.2798.fc6
prompt
timeout=50
lba32
default=linux

image=/boot/vmlinuz-2.6.18-1.2798.fc6
label=linux
append=” pci=nomsi root=LABEL=/”
initrd=/boot/initrd-2.6.18-1.2798.fc6.img
read-only

You can obviously change your label & default to anything you want (I like “fc6” personally). Double check your versions of the kernel with `ls /boot` and make sure the name matches what you have in the conf file.

Run `lilo -v` from the command line. This will read in your /etc/lilo.conf file and write the changes to the master boot record (the first 446 bytes) of /dev/sda. If you had grub installed previously, it will be overwritten with lilo. (NB there isn’t much of a concept of “uninstalling” a bootloader – you generally just overwrite them. If you really want to uninstall it, you can just copy zeros bytes into the first 446 bytes like so: `dd if=/dev/zero of=/dev/sda bs=446 count=1`. Note that the partition table is stored between bytes 447 and 512, so you probably don’t want to wipe any of those bytes out).

When I followed these steps using the default disk partition, I got a Lilo warning, and upon booting I got a kernel panic. That’s why I recommend removing LVM and doing everything with straight up ext3.

Very tempting to reboot at this point, but I should mention that it _still_ won’t work 😦

Video Drivers

If you reboot now, you *should* get a lilo prompt with “linux” or “fc6” or whatever label you chose as one of your choices. If you had the “pci=nomsi” in your append statement in your lilo.conf, you won’t have to type it anymore. You should be able to boot most of the way now, but you’ll crap out with a black screen when loading KDE/Gnome/X.

If you have no interest in X (I don’t), you can just edit your /etc/inittab and set the default run level to 3 and you’ll be good to go. If you want to get X working, you’ll have to install updated drivers for your ATI Radeon card.

You probably can’t make the necessary changes before rebooting because you’re in the chroot’ed rescue jail.  So either boot to run level 3 (if you changed the inittab), or run ‘linux 3’ at the lilo prompt to just boot to a shell (runlevel 3).

First you have to add a new yum repository:
rpm -Uhv http://rpm.livna.org/livna-release-6.rpm

Then install the updated drivers:
yum install xorg-x11-drv-fglrx

Some people have noted that they had to edit their /etc/X11/xorg.conf file to set the driver to be “radeon” instead of “default” and others have mentioned changing “PCI:1:5:1” to “PCI:2:0:0”, but mine already was correct and worked with no change.

And that, ladies and gentlemen, should be it!

In a word: trivial!

Advertisements

29 Responses to Installing Fedora Linux on a Dell Optiplex 320

  1. I don’t know why this post starts with “this is going to be a very long and pointless post for most of you,” when pretty much all of your posts are long and pointless for most people. What makes this one longer and more boring than the rest?!!

  2. […] figure if I’m going to have a post walking you through the installation of Linux on a Dell, I should also have a writeup of how to install OS X on a […]

  3. LinuxConsultant says:

    vitasthefetus:

    This actually is helpful (short of the syntax issues that lilo has with the lilo.conf as it appears in the blog). Its nice someone else bothered to track these down, for those of us using Dell N series systems because they are good for loading Linux workstations on, this is a real PITA.

    Dont really care you didnt get anything from this, I DID. Sorta sucks when Dell’s N series (assumably for linux) doesnt work with the latest CentOS (downstream rebuild of RHEL), OR FC6 latest, makes building systems a real nightmare when you expect these to work. Then I guess I would only expect someone who knew why you would buy bunches of N series to begin with to even understand why someone else would post this.

    Short of asking that he double check the lilo.conf on the blog, its great i didnt have to dig through dell’s site to try and track the entire system down and break down what is going on. Since someone else already had to.

    Thanks a ton

  4. hoist2k says:

    What specifically is wrong with the lilo.conf? Please let me know and I’ll correct it as needed. –Ben

  5. LinuxConsultant says:

    The syntax issue was resolved by manually entering the data and spacing the append line a little more like so:

    append = ” pci=nomsi root=LABEL=/ ”

    Although i never typed every line by hand before I did that, so its possible it had paste issues i didn’t see that this just happened to resolve.

  6. LinuxConsultant, you seem to have misread my comment. I am not suggesting that the entry is not helpful for you and some other people, I am merely noting that most entries on this blog are long and pointless from the perspective of the general public, and this particular entry is neither longer nor more boring than all the rest. I, too, enjoy a spirited discussion of the vagaries of Linux as it pertains to obsolete refurbished Dell hardware, but let’s not kid ourselves — this isn’t like an astronaut shitting her pants for 12 hours en route to kill her boyfriend’s lover. Now *that’s* a story!

  7. Pandit says:

    Thanks for sharing a very good detail to get around the problem.

  8. Chris says:

    How about a bit more on WHY grub wont work.. I am almost SURE there is some config you could do to grub that would make it work..

  9. DarrenDG says:

    Did all the hard work for me and made my life that much easier. Just want to say thanks.

  10. Andrea says:

    Good work, guy. Useful for me and other five linux-addicted. Thank you.

  11. LinuxConsultant says:

    Actually these are brand new off the block dell hardware, hardly refurbished units. Upsetting that one of the biggest vendors offering linux on their system uses hardware so cutting edge on the N series, which in essense is meant for Linux or other OS’s than windows, doesnt work out of the box. Hoping RHEL/CentOS 5 will resolve these issues though anyway.

  12. Tom says:

    Whoo, thanks that saved me a lot of time 🙂 I have 20 320’s and FC6 and was thinking I was in for a long night before I found your post. Just one note: with a full yum update I didn’t need to install the video drivers separately.

  13. Twinchang says:

    Had anyone tried to use WOL (Wake-On-LAN) to wake up Optiplex 320?

    It seems that WOL only works if it was powered off under Windows. If it’s powered off under Linux (using ‘poweroff’ command), it can’t be waken up again.

    I’ve 40 of these Optiplex 320 machine. It’d be a big headache if I can’t wakeup them from LAN. Has anyone has idea or workaround?

  14. jOllY says:

    I have tried to install CentOS 5 by following the steps. It works but Fedora 6 rescue disk is needed for last steps and the /boot/ files are some different.
    However, I can’t get the video driver installed. Can anyone help on this?

  15. kelsey says:

    Has anyone tried using an PCI SATA card. A linux compatible one is less than $20 from newegg. I wonder would using something like this allow the Optiplex 320 to boot using grub?

  16. NeCoMuk says:

    [quote]
    # Twinchang Says:
    May 19th, 2007 at 9:19 am

    Had anyone tried to use WOL (Wake-On-LAN) to wake up Optiplex 320?

    It seems that WOL only works if it was powered off under Windows. If it’s powered off under Linux (using ‘poweroff’ command), it can’t be waken up again.

    I’ve 40 of these Optiplex 320 machine. It’d be a big headache if I can’t wakeup them from LAN. Has anyone has idea or workaround?
    [/quote]

    try under Linux as root:

    ethtooöl -s eth0 wol g

    this enables WOL to this NIC

  17. NeCoMuk says:

    ethtool -s eth0 wol g

    … thats better…..

  18. Kelsey says:

    Will the 320 take a pci SATA card? I want to try this to get around the GRUB issue. Will this work? I have 3 ordered and on the way. They won’t be here for 2 weeks, so what to have a heads up.

  19. Famox says:

    Hi All,
    I finally succeeded in installing “Fedora 7” by replacing “pci=nomsi” (used with kernels

  20. Famox says:

    Hi All,
    I finally succeeded in installing “Fedora 7” by replacing “pci=nomsi” by “acpi=off” (u can also add “apm=off”) , both in the installation stage and the lilo.conf file

  21. Waldo Point says:

    In order to install Redhat ES-44 on an Optiplex 320 I had to paas these:
    linux askmethod pci=nomsi acpi=off all-generic-ide. Then My lilo.conf file looks like this:
    boot=/dev/hda
    map=/boot/System.map-2.6.9-42.EL
    prompt
    timeout=50
    lba32
    default=linux
    read-only
    image=/boot/vmlinuz-2.6.9-42.EL
    label=linux
    append=”pci=nomsi acpi=off all-generic-ide”
    root=/dev/VolGroup00/LogVol00
    initrd=/boot/initrd-2.6.9-42.EL.img

    This install is a day killer 🙂
    HTH

    Waldo

  22. wei guoning says:

    Have used your metho ,i still can’t install linux on my machine .
    My linux is red_flag,and the machine is Dell Optiplex 320.
    Is there another way for me?

  23. Ricky says:

    Very helpful. Thanks a lot!

  24. Ahmed Kamal says:

    Thanks a lot for this article, it sure was helpful. One thing though, I really need to install RHEL4 (and not the newer fedoras). Using the tricks pci=nomsi+lilo, and installs and runs fine, BUT the USB keyboard does not type!!
    Did anyone test with RHEL4, or Centos4? I’m on 4.5 here.
    Please if anyone uses any trick to get that keyboard typing, please let us know!

  25. Dashamir Hoxha says:

    Installing XEN+Fedora7 on Dell Optiplex 320
    =================================

    The installation goes the same as described in the blog,
    however, for Fedora7, instead of using “pci=nomsi”, I passed to
    the kernel the options “acpi=off apm=off” whenever starting linux.
    I pressed TAB at the grub menu, in order to append these options.
    I also didn’t forget to setup manually the partitions and not to use LVM.

    After installation I booted with the rescue disc. Here again I pressed
    TAB and entered the options. In the rescue system, I downloded and
    installed lilo:

    # cd /
    # wget http://home.san.rr.com/johninsd/pub/linux/lilo/lilo-22.8.bin.static.tar.gz
    # tar xfz lilo-22.8.bin.static.tar.gz

    Then I downloaded and compiled mbootpack

    # wget http://www.tjd.phlegethon.org/software/mbootpack-0.5a.tar.gz
    # tar xfz mbootpack-0.5a.tar.gz
    # cd mbootpack-0.5a/
    # make
    # cp mbootpack ../boot/

    Then I prepared a single kernel image, following the instructions
    in http://www.wpkg.org/index.php/Running_Xen_with_LILO . I did it like this:

    # cd /boot
    # gzip -d -c xen.gz-2.6.20-2925.9.fc7 > xen-2.6.20-2925.9.fc7
    # zcat vmlinuz-2.6.20-2925.9.fc7xen > vmlinuz-2.6.20-2925.9.fc7xen-uncomp
    # mbootpack -o vmlinuz-2.6.20-2925.9.fc7xen-mbootpack \
    -m vmlinuz-2.6.20-2925.9.fc7xen-uncomp \
    -m initrd-2.6.20-2925.9.fc7xen.img \
    initrd-2.6.20-2925.9.fc7xen.img

    Then I built /etc/lilo.conf, which looks like this:

    —–
    boot=/dev/sda
    map=/boot/System.map-2.6.20-2925.9.fc7xen
    prompt
    timeout=50
    lba32
    default=linux

    image=/boot/vmlinuz-2.6.20-2925.9.fc7xen-mbootpack
    label=linux
    root=/dev/sda3
    append=”dom0_mem=128M — netloop.nloopbacks=16 root=LABEL=/”
    read-only
    —–

    Note that the image that is used is the image that is packed
    by mbootpack. Note also that the options that are passed to the
    linux kernel (in the ‘append’ line, after ‘–‘) do not include
    “acpi=off apm=off”.

    Finally, I checked the config file with ‘lilo -v’, installed it with
    ‘lilo’, and rebooted.

    Referencies:

    * https://wirelessness.wordpress.com/2007/02/07/installing-fedora-linux-on-a-dell-optiplex-320/
    * http://www.wpkg.org/index.php/Running_Xen_with_LILO

  26. Kelsey Hightower says:

    Does Fedora 7 work with these machines?

  27. […] have problem installing Fedora 7 on Dell Optiplex 320, then I follow article in Wirelessness and successfully installing it follow instruction of Dashamir […]

  28. akash says:

    Installing FC6 with Dell Optiplex 330
    ———————————————

    Grub works fine but there is no X. I had to add a line in /etc/X11/xorg.conf under the section Device

    BusID “PCI:0:2:0”

    and change the driver to vesa

    Works then.

    Although in some of the systems even though X server starts it still shows the command line prompt to login and we have to manually change it using CTRL + ALT + F7

    Thank you for a great article 🙂

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: