next up previous contents
Next: 3. Configuration Up: Sidious Linux 10.04 Previous: 1. Release Notes   Contents

2. Installation

Obtain a CD. The CD is bootable, but if your BIOS will not boot the CDROM drive, you can also use the boot-assist floppy by inserting both at the same time and resetting the computer. The floppy will even search for a PCMCIA CDROM, so if you have a laptop with no CDROM, you should be able borrow/use a PCMCIA CDROM drive and use the floppy.


Subsections


2.1 Testing whether Your Hardware is Supported

Testing whether Sidious Linux supports your hardware is easy, since everything is either auto-detected . . . or not supported. You can test everything by booting (and running from) the CD, or by net-booting. This never involves your computer's hard drive. You should test that each of the following are supported:

Graphics
To try X-Windows, press Ctrl-Alt-Delete. After a few flashes of the screen, you should see an X-Windows desktop if your graphics card is supported.

Sound
Try playing the sample audio file:


  mpg123 /Samples/buggles.mp3  # OR
  xmms &
   (Right click on the song title in the main window to get an option
    to turn off the annoying "autoscroll")

If your sound card is not a PCI sound card, you can try to force detection of ISA sound cards by running soundstart, but be warned that this locks up some computers. It's better to get a (cheap) PCI sound card for your machine.

Video
To see if video extensions are working (or to see if your CPU is fast enough to do video without them) try the sample movie:

  aviplay /Samples/405.avi
Network
Try running mozilla and accessing a Web site (use lynx if your graphics card was not supported.) If you need to enter a static IP address, you can even do this while booted from the CD. Run reconfig, under Host Setup -> Static IP enter the appropriate values and say yes to Save changes (even though it will fail, because the CD-ROM is read-only). Then re-run /etc/rc.d/rc.inet to re-initialize the network, or plug in your PCMCIA network card.

2.2 Running Sidious Linux from a Sidious NFS-root server

To run Sidious Linux from the network, you need a supported Ethernet card. The recommended card is the 3COM Etherlink III. An intel EtherExpress PRO or DEC tulip should work also (with a different boot floppy.)

Obtain a boot floppy. You can make your own by dumping an etherboot image from the CDROM to an unformatted floppy using dd on Unix or rawrite or DiskWrite from DOS or Windows. Whenever you boot from this floppy, your machine should boot Linux from the Sidious NFS-root server. Floppy images are available in the /tftpboot/ directory. The file ``etherboot-507-intel-3com.fd0'' handles most intel and 3com network cards.

For full network privileges at CFHT, your MAC address must be added to the DHCP configuration, and your PC must be in the netgroups that have permission to access home directories. The default configuration is enough to use your computer as an X-Terminal if you are connected to the CFHT network.

2.3 Installing Sidious on a Desktop or Laptop

Use one of the methods above to boot into Sidious (the easiest is usually to boot the CD.)

  1. Run fdisk on your hard drive ( cfdisk is also available, and provides an easier interface.) The first IDE hard drive would be:

    
         fdisk /dev/hda
    

    And choose a partition for Linux. Set the type (` t' command) to 83 (Linux). Then use the ` w' command to rewrite your partition table. If you have no space for Linux, you must either install another drive, shrink your Windows partition using a program like FIPS, or overwrite a Windows partition. (Such procedures are outside the scope of these instructions.)

  2. Reformat the partition. (replace ` N' with the number of the partition you allocated for Linux.) All data on this partition will be lost!

    
         mkfs.xfs /dev/hdaN
    

    If mkfs.xfs refuses to format the partition, read what it says and follow the directions.

  3. (Optional) If you are sure that your harddrive and CDROM both work reliably in DMA mode, before copying files, run the following command and installation will go a lot faster:

    
    [root@cdboot:~/] # dma on
    Turning DMA on for all IDE drives
    [root@cdboot:~/] # _
    

    If DMA appears to cause no problems on your machine (which is usually the case), after installation you will want to use reconfig to make this the default when rebooting from the harddrive. (In general, you should run reconfig after rebooting to customize all settings anyway.) Un-selecting ``Advanced Configuration Options'' on the first page of ``reconfig'' also forces DMA, so if you have problems with DMA on your machine, you must select ``[*] Advanced Configuration Options''.

  4. From the CDROM (which should be the root directory when booted from the CD) use the installation script to copy the files:

    
         cd /
         ./install-sidious /dev/hdaN
    

    The install-sidious script just runs rsync-sidious, which you can use later to upgrade the system. The default installation will take a little over 1 GB of disk space. For a smaller installation, you can pass rsync-sidious options to install-sidious. For example:

    
         cd /
         ./install-sidious --base --nodoc --notex /dev/hdaN
    

    would install with no C compiler, no documentation, and no LaTeX. Run rsync-sidious without any options to see more information. Later, you can run rsync-sidious with different options to add packages. (Don't use install-sidious for anything but the first installation.)

  5. Use chroot to temporarily change to the new root directory and finalize the installation.

    
         mount LABEL=SidiousRoot /mnt
         chroot /mnt
         mount -t devfs devfs /dev
    

    From now on, commands and files relative to "/" are those on the hard drive, and not the CDROM (until you log out of the shell.)

  6. See the section on Windows, [*] if you need dual-boot. This can also be done later.

  7. Finally, type lilo. There should be no errors or warnings, If there are other errors, it means the Linux boot loader may not have been successfully installed. Carefully check the contents of /etc/lilo.conf and try again. Information on lilo and its configuration file are available by typing ``man lilo'' and ``man lilo.conf''. Reboot after lilo is successful.

    
        # lilo
        Added sidious *
        # reboot
    

    Do not reboot if lilo had any errors. If any occur, it does not update the boot sector.

  8. Eject the CDROM and enjoy Sidious Linux!

2.3.1 Boot Troubleshooting

The defaults settings in the file /etc/lilo.conf will install a boot loader in the master boot record (MBR) of your first harddrive (/dev/hda). Since Windows does not use the MBR, its bootloader will be left in a partition if Windows is also present. It can then be ``chain-loaded'' by the example ``other='' entry in /etc/lilo.conf.

Some computer BIOS versions do not seem to recognize the boot-sector created by running the default ``lilo'' with Sidious. If ``lilo'' appeared to work, but then when you eject the CDROM a message such as ``No operating system'' or other general boot failure occurs, there is a workaround:

  1. Boot from the CDROM one more time.
  2. Mount the harddrive and ``chroot'' into that installation.
    
         cdboot# mount LABEL=SidiousRoot /mnt
         cdboot# chroot /mnt
         cdboot# mount -t devfs devfs /dev
    
  3. Edit the file /etc/lilo.conf with an editor such as xemacs
    
         cdboot# xemacs /etc/lilo.conf
    
    Search for the line:
    
    install=/boot/boot-menu.b
    
    and delete the characters ``-menu'' so that it reads
    
    install=/boot/boot.b
    
    Save the file.
  4. Run an older version of lilo, ``lilo21''.
    
         cdboot# lilo21
    Added sidious *
         cdboot# reboot
    
  5. Eject the CDROM.

This alternate version of lilo is known to be necessary for HP-DE100C entertainment centers. Other computer BIOS versions may also have a problem with the default boot-menu.b lilo.

2.4 Installing on root-raid1 (Software RAID)

To install Sidious on hardware RAID, the appropriate raid driver (aacraid, 3w-xxxx, ...) must be loaded and then installation is the same as on a normal IDE drive, except the device names are /dev/sd*.

To install Sidious on IDE drives with software RAID1 (mirroring), follow this procedure. First, there are several things to note:

This example shows how to stripe two 200 GB disks together to create an 8 GB RAID-1 root, and  380 GB RAID-0 scratch space plus some swap. The disks are both IDE master, /dev/hda and /dev/hdc.

  1. First, partition the individual disks. Partition 1 and 2 (8GB and 190GB) should both be set to type 0xfd (Linux raid autodetect) and partition 3 should be type 0x82 (Linux swap.)

    
    Disk /dev/hda: 255 heads, 63 sectors, 24792 cylinders
    Units = cylinders of 16065 * 512 bytes
    
       Device Boot    Start       End    Blocks   Id  System
    /dev/hda1             1      1000   8032468+  fd  Linux raid autodetect
    /dev/hda2          1001     24500 188763750   fd  Linux raid autodetect
    /dev/hda3         24501     24792   2345490   82  Linux swap
    

    Format /dev/hdc in exactly the same way.

  2. To possibly improve the performance of the machine while setting up the RAID, turn on DMA and create the swap now.

    
    [root@cdboot:~/] # dma on
    [root@cdboot:~/] # mkswap /dev/hda3
    [root@cdboot:~/] # mkswap /dev/hdc3
    [root@cdboot:~/] # swapon /dev/hda3
    [root@cdboot:~/] # swapon /dev/hdc3
    

  3. Now run ``reconfig.'' Running it from the CD will make it impossible to permanently save the changes, so keep in mind that in a later step you will need to manually copy the sidious.config that this is going to generate to the RAID.

    UNcheck the ``Advanced options'' so that DMA and other things are set to the default high-performance state.

    Go to the ``Encapsulated files, raidtab'' option. For the current example, the raidtab looks like this:

    
    # Root filesystem, RAID-1 on /dev/hda1 and /dev/hdc1
    raiddev /dev/md0
            raid-level      1
            nr-raid-disks   2
            nr-spare-disks  0
            chunk-size      32
            persistent-superblock 1
            device          /dev/hda1
            raid-disk       0
            device          /dev/hdc1
            raid-disk       1
    # /local/data/, RAID-0 on /dev/hda2 and /dev/hdc2
    raiddev /dev/md1
            raid-level      0
            nr-raid-disks   2
            nr-spare-disks  0
            chunk-size      32
            persistent-superblock 1
            device          /dev/hda2
            raid-disk       0
            device          /dev/hdc2
            raid-disk       1
    \end{verbose}
    
      If you wanted a /local/data of half the size, with mirrored RAID-1
      just like the root, simply change raid-level to ``1'' in the /dev/md1
      entry.  You could also choose to make /dev/hda1 + hdc1 larger and
      not have a second raiddev entry.
    
      Next go to ``Encapsulated files, fstab'' and add an entry so /local/data
      is mounted at boot:
    
    \begin{verbatim}
    /dev/md1 /local/data auto defaults 0 0
    

    Exit ``reconfig'' for now, say ``Yes'' to save changes (and expect it to fail and save a copy in /var/sidious.config instead) and say ``Yes'' to apply changes.

  4. After applying changes, a raidtab now exists. The next step is to create the RAID. The CD boots with the modular kernel, and RAID support must be loaded first.

    
    [root@cdboot:~/] # modprobe raid1
    [root@cdboot:~/] # modprobe raid0
    [root@cdboot:~/] # mkraid /dev/md0
    [root@cdboot:~/] # mkraid /dev/md1
    [root@cdboot:~/] # cat /proc/mdstat
    

    /proc/mdstat should show that any RAID-1's are now performing a ``resync''. Some people perfer to wait until that is finished before beginning with the installation. In theory, it should not matter.

  5. Create an XFS filesystem and install Sidious Linux with the usual installer script:

    
    [root@cdboot:~/] # mkfs.xfs /dev/md0
    [root@cdboot:~/] # mkfs.xfs /dev/md1
    [root@cdboot:~/] # cd /
    [root@cdboot:/] # ./install-sidious /dev/md0
    

  6. After all the files are copied to /dev/md0, some changes must be made to /etc/lilo.conf to select the correct kernel, root, and boot sector. The CD kernel cannot boot a root-raid directly because RAID support is compiled as modules. Switch to the server kernel for root-raid systems. It has support for raid0,1,5 compiled in.

    
    [root@cdboot:/] # mount /dev/md0 /mnt
    [root@cdboot:/] # cp -fa /var/sidious.config /mnt/etc/sidious.config
    [root@cdboot:/] # chroot /mnt
    [root@cdboot:/] # mount -t devfs devfs /dev
    [root@cdboot:/] # zile /etc/lilo.conf
    
      ... Change default = to "default = sidious-md0" and uncomment the entry
      like this:
    
    image = /boot/kernel-2.4.26-smp4
      label = sidious-smp
      root = /dev/md0
      append = "init=/etc/initrc"
    
    [root@cdboot:/] # lilo
    [root@cdboot:/] # exit
    [root@cdboot:/] # umount /mnt/dev
    [root@cdboot:/] # umount /mnt
    [root@cdboot:/] # reboot
    

The extra steps after running lilo help ensure that the RAID is cleanly shut down. If not, a ``resync'' will have to start all over when the disk is mounted again.

If the partition tables are identical, you may also copy the first 512 byte of /dev/hda to /dev/hdc. Doing so will make it possible to still boot if /dev/hda dies completely. If the BIOS cannot boot from /dev/hdc, you might have to unplug /dev/hda so /dev/hdc becomes the first harddrive. CAUTION: Don't copy the boot sector if you partitioned the disks slightly differently!

2.5 Installing Sidious on an embedded system, such as the I-Opener

You need access to the Sidious8 source tree to build a pre-configured self-installing binary to write to the flash disk. Standard images have been prepared for I-Openers and can be re-configured after booting.

The easiest way to get Sidious8 onto a flash disk may depend on the particular device.


next up previous contents
Next: 3. Configuration Up: Sidious Linux 10.04 Previous: 1. Release Notes   Contents
root
2006-05-11