Det här är G o o g l es bara-text-cache av http://caradhras.ccslab.aueb.gr/guide.html från 3 apr 2008 22:48:47 GMT.
G o o g l e:s cacheminne är den ögonblicksbild vi tog av sidan när vi var ute på webben.
Sidan kan ha ändrats sedan dess. Klicka här för den aktuella sidan utan markering.
Klicka här för den fullt cachade sidan, inklusive bilder.
Använd denna kod om du vill länka eller skapa ett bokmärke till den här sidan: http://www.google.com/search?q=cache:iv8XjTKM6EYJ:caradhras.ccslab.aueb.gr/guide.html+http://caradhras.ccslab.aueb.gr/&hl=sv&client=firefox-a&gl=se&strip=1


Google har ingen anknytning till författarna av denna sida och är inte ansvarigt för sidans innehåll.
Dessa termer syns endast i länkar som pekar på denna sida: http caradhras ccslab aueb gr

..:: Printable version ::..

Contents.

  1. Basic Knowledge.
  2. Preparation - Stuff Needed.
  3. Prepare the O2 father.
  4. Prepare and setup the O2.
  5. So far... so good.
  6. Debian Installation Process.
  7. Booting with a local root fs.

Preface.

In this page you will find some general information about SGI O2, the MIPS Arch and the R5000, R10000 processors. Furthermore, you will find a list of all the things you need to get your O2 up and running Debian.

Much of what you will see here was based on various sources from the web. For a brief list of related sites visit the Links page.

All we did was combine information from around the web and create this, kinda for-dummies how-to. Hope it helps.

Basic Knowledge.

The O2 is Silicon Graphics's successor of the Indy workstation. It comes in several versions with R5000, RM7000, R10000 or R12000 processors.

The O2 Workstation is based on the CRIME, MACE, VICE, and GBE ASICs. The CRIME ASIC is the main system ASIC which interfaces the MIPS cpu, memory system and the I/O system in the MACE ASIC. The CRIME ASIC also contains the 3D gfx rendering engine which renders to main system memory; part of which is used as the frame buffer which is DMA'ed to a video connector using the GBE ASIC. A MACE chip is used to provide legacy device support (serial, parallel, video, RTC...). The VICE ASIC is used to process video streams and images stored in memory.

Currently only R5000 based IP32 (O2) systems are somewhat supported(?) by Linux. Framebuffer works, but to get a usable X you need a small set of patches. Experimental patches for audio exist and did work for a while, until the kernel was made 64-bit only for IP32(after 2.6.8.1). SCSI works ok, and booting from a harddrive works using arcboot(small loader for SGI's) or directly from ARCS using a kernel written into the hdd's SGI disklabel.

Moreover some experimental work has been done on the VICE engine. Experimental patches for using VICE can be found at: http://www.total-knowledge.com/progs/mips/vice/

The combination of R1x000 speculative execution feature and lack of hardware cache coherency in IP32, causes problems that need special workarounds inside the kernel. The kernel portion has not been achieved yet, but there are some R10000 experimental patches for 2.5.x and 2.6.1 MIPS - CVS versions and pre-compiled kernels to use if you have iron nerves and plenty of free time (and beers).

All SGI well known models(Indy, Indigo, Indigo2, O2, Onyx,...) come up with a CD-ROM drive. But:

So, it may be difficult to make Linux bootable CDs for SGI machines. Not to mention the fact that even if you had a cd, R5000, RM7000, R10000 and R12000 processors and the O2 model aren't supported yet from the vanilla kernel releases.

Preparation - Stuff Needed.

So how can we rock with this baby? Simple! (is it really?) We will use a net boot technique with dhcp and tftp in order to pass a patched, pre-compiled 64-bit or 32-bit working kernel to the O2 from another machine. In sequence, we will use an NFS-exported fs that will hold the base system, in order to start the installation process. Afterwards, things get much easier. Finally, you will need the base Debian packages.

Before starting, we need another workstation with tftp, dhcp and nfs services up and running. In our case we used an i386 P-II@400Mhz with Debian GNU/Linux 3.1 "Sarge" installed. For this step you may use any distro/arch you want as long as dhcpd, tftpd, rpc.mountd and rcp.nfsd are supported (don't even think about using M$ winblows for this l33t stuff). Finally make sure that the O2 and the workstation (We'll call it the O2 father) are connected through a crossover cable or via a switch/hub.

To wrap it up, you will need the following:

  1. A patched, pre-compiled kernel for IP32.
    You can get one in the Pre-compiled kernel binaries. section of the 'Files' page.
  2. Something to use instead of the installation CD-ROM.
    Download:

    /dists/stable/main/disks-mips/current/root.tar.gz

    from your preferred Debian mirror.
  3. A set of base packages (that will be used to install the base system). These files are found in basedebs.tar.
    Download:

    /dists/stable/main/disks-mips/base-images-current/basedebs.tar

    from your preferred Debian mirror.
  4. A PC that will serve as the O2 father, in order to netboot the O2. The O2 father must run the following services:
    1. DHCP
    2. TFTP
    3. NFS Server

Prepare the O2 father.

In order to get started you need to prepare the O2 father. This means:

  1. Set up the DHCP server.
  2. Set up the TFTP daemon.
  3. Set up the NFS Server.

We will deal with these topics right away.

Setting up the DHCP server.

The dhcpd service is used to respond to the bootp protocol that the O2's PROM will use for booting. We have the minio2 and O2 father pluged in our network (lab) through a switch. If you already have a dhcp server in your network go to dhcp.conf section and ignore the following steps. If you haven't used dhcpd before just use debian's apt tool in order to fetch and install dhcpd with the basic startup config file automatically:

apt-get install dhcp3-server

The chunk of our /etc/dhcp3/dhcpd.conf file below shows our situation. We are using the 195.251.252.96 subnet with a 255.255.255.224 mask.

host minio2 {

hardware ethernet 08:00:69:05:a7:ce;
fixed-address 195.251.252.107;

}

The O2 is set to use 195.251.252.107 and the O2 father has 195.251.254.119. You can also use any private range (i.e. 10.x.y.z or 192.168.x.y).

Basically, all you need to do is instruct the DHCP server to always provide the same IP for the O2. You do this by following the above example. The identity of the O2 is controlled by its MAC address. In order to get the O2's MAC address, do a:

printenv

If you are already using another host as DHCP server for your LAN, then take extra care. The O2 will get offers from both servers and this may mess things up. If this is the case, then we recommend one of the following:

Furthermore, you are strongly encouraged to comment out the 'authoritative' statement in your dhcpd.conf. Finally you may also wish to add the following lines:

option domain-name "your domain goes here";
option domain-name-servers "NS1 IP address" "NS2 IP address";

Set up the TFTP daemon.

Tftpd service is used to serve a file (an appropriate kernel in most cases) to the bootp protocol that the O2's PROM will use for booting. If you already have a tftpd server in your network ignore the following steps. If you haven't used tftpd before just use debian apt tool in order to get and install tftpd:

apt-get install tftpd

After the installation, tftpd is ready. It doesn't need any special config or treatment. Just make sure that you have something like the following into /etc/inetd.conf file.

#:BOOT: Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot

Afterwards, restart inetd:

/etc/init.d/inetd restart

As you may have already noticed from inetd.conf /tftpboot will be used as the serving directory (the one that holds the kernel, not only one if you have time to experiment with it). So download an appropriate kernel and put into the /tftpboot dir

mkdir /tftpboot cp "your kernel" /tftpboot

Setting up the NFS Server.

Setting up NFS mountd on the workstation(O2 father).

In order to mount a root filesystem on your O2, you need to set up mountd on your workstation.
The services rpc.nfsd and rpc.mountd should be started and your kernel should have NFS server support enabled:

/usr/bin/rpc.mountd
/usr/bin/rpc.nfsd
rpcinfo -p

(you should be able to see now if portmap and mountd are running).

The line bellow should be also added to /etc/hosts.allow:

mountd:ALL

(or we can give access only to 195.251.252.107)

In /etc/exports, add:

/export 195.251.252.107(rw,no_root_squash)

That will export the /export directory to the O2 if the O2's IP is set to 195.251.252.107 and treat /export on the O2 as the root filesystem (make sure to create /export or whatever).

If you want to make sure your system has mountd up and running, connect to your rootfs by typing:

mount localhost:/export /mnt/test

(also make sure that /mnt/test is a valid directory and add 127.0.0.1 on /etc/exports) Then cd into /mnt/test. If you can see the contents of /export you are ok.

Extract the contents of root.tar.gz into /export/<O2's IP address>:

cp root.tar.gz /export
cd /export
tar zxf root.tar.gz
mv debian-mips-root 195.251.252.107

This will create a /export/debian-mips-root directory.
This must be renamed to /exports/<O2's IP address>
root.tar.gz, is an image of the Debian installation CDROM. The contents of this file, now in '/export/<O2's IP address>' will serve as the first O2's root filesystem.
Once mounted, the Debian Installation will be launched.

Finally, you will need to copy basedebs.tar to '/export/<O2's IP address>' in order to make it accessible later on, when you will need it.

cp basedebs.tar /export/<O2's IP address>

Prepare and setup the O2.

After you prepare the O2 father, you are ready to boot your O2 and install your new OS. There are a few things you must do before booting your O2.

O2 PROM setup.

If you are reading this guide you probably don't have any other OS on you O2, so I suppose you have IRIX installed. SGI ships her models with a very fancy start up environment but unfortunately it supports automated installation for IRIX only. In order to boot your system via the BOOTP protocol follow these steps (make sure you have your monitor, keyboard and mouse plugged in - we always forget something :)):

You can give a fixed ip address to your O2 and *not* use dhcp request by setting netaddr value (setenv netaddr 195.251.252.107). You can also do many things with command mode but this is not SGI's PROM tutorial :).

Boot the O2.

You are now ready to give life again to this marvellous toy. Once again:

Where /tftpboot/"your kernel" is the absolute path to the kernel file.
This is where you start praying... You should see the following from the O2:

Setting $netaddr to 195.251.252.107(from server)
Obtaining from server
(some numbers)...,"entry point 0x80200000"

and then the Frame Buffer will come up with the Tux logo.
Bingo!

So far... so good.

What have we done so far:

  1. Setting $netaddr to 195.251.252.107(from server)

    This means that dhcp server worked and gave your O2 an IP address.
    If you did't manage to get at least this message consider reading dhcpd.conf really good :). Check if the daemon is running on O2 father and try to connect to another pc to check if it gets an ip address (if you are using dhcp v2 don't forget to unset the netaddr env from PROM). Also ckeck /ver/log/daemon.log to see what happened with dhcpd.
  2. Obtaining from server

    As you wait here the kernel is "travelling" from the O2 father to the O2 through a tftp connection.
    If you get stuck here longer than a minute your tftpd didn't serve the kernel. Once again check /var/log/daemon.log and

    echo "1" > /proc/sys/net/ipv4/ip_no_pmtu_disc

    (on the O2 father) if you didn't before. Finally try from another pc getting the kernel file using tftp in order to see if everything is ok with the tftp daemon on the O2 father.
  3. entry point 0x80200000

    Congratulations! You just managed to netboot your O2. If you see a kernel loading everything is ok. If you get a message like:

    Coming up soon

    consider trying with a different pre-compiled kernel because your O2 couldn't execute this one.

If all has gone well, the O2 will mount the nfs exported root fs from the O2 father. The Debian setup menu will pop-up...
If the kernel panics trying to to mount / then something has gone wrong with NFS on the O2 father.
If this happens check the section Setting up the NFS Server.

Debian Installation Process.

This should be quite familiar, once it starts.
There are a few things you should take care of though. This things are:

  1. Partition a hard disk.
  2. Install Kernel and Driver Modules.
  3. Configure the Network.
  4. Install the Base System.

When the time comes to partition a hard drive, the installer will call the fdisk utility.
You will have to create a 'Volume Header' partition and an 'SGI volume'.
For more information check the Partitioning your drives. section of the SGI Disk Labels, dvhtool and the arcboot loader. page.

When you are prompted to 'Install Kernel and Driver Modules', DO NOT do it.
The setup image (root.tar.gz) you are using is designed for IP22 machines. It has no kernel suitable for your O2. If you select this option the setup process will break and you will have to start all over.

Repeat: DO NOT 'Install Kernel and Driver Modules'... YOU HAVE BEEN WARNED!

It is also advisable to avoid 'Configure the Network' as this may cause similar trouble.

If you have not 'Installed Kernel and Driver Modules' (because you had been warned), the time will come to 'Install the Base System'. Remember 'basedebs.tar'? It is time to make good use of it.
You can install, using basedebs.tar over NFS, but this will have network overhead. However, now you have a mke2fs'ed partition, remember? This has been mounted by the installer on '/target'. Why not copy basedebs.tar to the local fs and install from there?
Hit alt+F2 to activate a console and do a:

cp /basedebs.tar /target

This will fetch basedebs.tar to the local hdd.
Back to console 1 (alt+F1) and select 'mounted' to 'Install the Base System'. It will ask for a location with 'basedebs.tar'. Select '/target'. The installer will start extracting base files and installing them on your hdd.
You can watch the progress on console 3 (alt+F3). Do not be alerted by the warnings. This is absolutely normal.
When this finishes, 'Reboot the System'.

Booting with a local root fs.

If you've had enough with the NFS - exported root fs, time to relax.
Once the previous has been completed, you may use your hdd for /
Before booting do the following on the O2's console:

setenv OSLoadPartition /dev/sda1
setenv OSLoadOptions root=/dev/sda1
bootp():/tftpboot/"your kernel"

/dev/sda1 is the partition of your drive where your root fs resides. It depends on your partitioning of your drives. Set it accordingly.

Your O2 will, once again, fetch the kernel via tftp.
Only this time it will mount / on the local drive.
The Tux logo will show up and after a few seconds, 'base-config' will be launched.

That's it. You know what to do next!
When you are prompted to configure apt, we recommend using http ot ftp from your favorite Debian Mirror. However, notice that not all Debian Mirrors contain the MIPS packages. Therefore, you must select an appropriate mirror.
Yor NFS-exported fs (the one you used to install) contains the base packages. If you choose to install from there, select NFS and enter the path to the O2 father.

If you wish to stop fetching the kernel via tftp, you may install the kernel in the hdd's 'Volume Header', or use a LILO-like (sort of) loader, which is called arcboot.
If this is the case, visit the SGI Disk Labels, dvhtool and the arcboot loader. page.

Last Updated on: Monday, 07-Jan-2008 19:53:53 EET