In this chapter we will get used to the LinuxPPC-2000 Q4
installation environment, partition the harddisk(s) and install
the operating system packages.
So, now we're actually getting somewhere! At least, so it
looks. This looks really cool, doesn't it? Press the right
mouse button on the background on the screen. What a cute
little menu! Notice that you can change the colors of the
screen with the Styles option. This is
the first installation program I've ever seen with changeable
colors :-) Note that you can move the windows on the screen
around by clicking and dragging on the blue top or right
borders. To bring a window to the front, try clicking on
it. Select xterm on the Blackbox
(background) menu. This will bring up a command line terminal
window which we will use to start some programs that can do
what the installation program can't.
Behold! There are even two (!) installation
programs. Unfortunately, they don't work. In the xterm
window, kill the installation programs. We have to do some more
hand-work.
The first thing to do is to partition the hard disk(s). Since
we have brutally killed the installation program, THERE IS
REALLY NO WAY TO DO THIS. I have framed you all the time. Just
shut down the machine and have a beer. Then visit some
friends.
Just kidding.
In the xterm window, issue the command
This will start the good old fdisk program. Note:
This
program will wipe away anything on the disks in the machine.
If there are something on the disks that you want to protect,
exit the program by hitting
Q and press
Enter. If you like a menu driven program, we'll start using
cfdisk in a minute. For an overview on the fdisk commands, hit
?. To view the present partition scheme,
hit
P. If there are lots of unknown AIX
information there, hit
D, and select 1,
D again and 2, and continue all the way up
to 5 to be sure all old AIX partitions are wiped away. Write the
changes to the disk by hitting
W, and quit
the program by hitting
Q. If there are no
AIX partitions on the disks, just quit with the
Q command. If you have more than one
harddisk in the machine, use the commands fdisk /dev/sdb for the
second harddisk, fdisk /dev/sdc for third and so on, and repeat
the steps from the first disk.
You could of course use fdisk to make the new partitions too,
but I prefer a more user friendly solution. At the shell prompt,
type
To start the cfdisk program on the first harddisk. Change to sdb
and sdc, and so on for more harddisks. Basic usage of cfdisk is outside
the scope of this document, but I have written a little starter.
You can read it in the
Section 15.
You should have at least these partitions:
A boot partition. It should be the first primary partition
on one of the SCSI drives, preferably the first (this
naming the partition to sda1). It must have type PReP boot
(type 41), and must be large enough to
hold a compressed Linux kernel image (zImage). Something like
5-10MB should do.
A swap partition. It can be either a primary or a logical
partition on any drive. Any size will do, but a guide may
be twice the size of you physical RAM. I have 64MB RAM, so
I have a swap partition on 128MB. Remember: This is only a
guide.
A system root partition. It can be either a primary or a
logical partition, and it should be big enough to hold the
main parts of the installation. You should write down the
device (disk and partition number, like sda5, for example)
for your system's root partition. You will need it later.
The easy way is just to use the rest of the harddisk space
for this. If you have several harddisks, big drives or
special requirements on safety and other things, you
should consider to make own partitions for /home, /usr,
/usr/local, and other parts of the system. Details on this
is outside the scope of this document, but there is a
good discussion on this in the Linux Partition HOWTO.
It is a
VERY good tip to find a piece
of paper and write down which partitions you have made, what
you want to use them to, and where you want to mount
them. You will need this information later. When you have
finished partitioning your disks.
So, we have some nice partitions. Let's use them. We have to
make filesystems on them, and then mount them to our existing
installation filesystem to be able to copy any files to
them. Now, I HOPE you have written down what partitions to use
where. First mount the root partition:
mkdir /mnt/install
mke2fs /dev/sdxy
mount /dev/sdxy /mnt/install
|
Of course, x and y are disk and partition number, as you have
written down. I use sda5 for my root partition, so I use the commands
'mke2fs /dev/sda5' and 'mount /dev/sda5'.
If you have more partitions, mount them in the same way. I have
a 1GB partition at sdb1 which I want to use for the /usr system. So I write this:
mkdir /install/usr
mke2fs /dev/sdb1
mount /dev/sdb1 /install/usr
|
You may have other partitions and also other mount points, like
/usr, /tmp, /home, /var and other stuff. But I guess you've got
the point now.
You have now cleared the first stage, and get 250 bonus
points. Congratulations. If the installation program had
worked, you had got no points at all, so be happy. The next
stage is to install packages. Here we can finally use some
semi-automatic programs. In the xterm window, type this:
xupgrade --install --debug --path_to_root /mnt/install
|
A new window will pop up. Select packages after your own
will. What packages should I select, you say. Oh, please! I
have no idea how you're going to use the machine :-). Press
Install. Aaah. There it goes! After some minutes (not to say
hours, it feels like that, doesn't it?) the install will be
complete.
Before we finalize the installation, it's a cool thing to have
a root password. Enter your new installation, and make a
funny, not-easy-to-guess password like this:
chroot /mnt/install
passwd
(You will be prompted for the new password twice)
|
You are still inside the freshly installed system (the chroot
command does that magic). Now, let's fix some other stuff
while we're at it. The mouse and the keyboard are not
right. Same goes for the timezone. If you are an experienced
user you may want to add even more configuration at this
point.
rm -f /dev/mouse
ln -s /dev/psaux /dev/mouse
kbdconf
timeconfig
|
Next, you may find that the /dev/cdrom link is not working properly,
it points to itself. It should point to /dev/scd0, so let's fix
this. Issue these commands:
rm -f /dev/cdrom
ln -s /dev/scd0 /dev/cdrom
|
You should now be able to mount the cdrom using /dev/cdrom.
Thanks to Thomas M. Nymand for this tip.
Now, you should be all ready. Issue the command
to exit the installed system and return to the intallation system.
Finally, shutdown the system, remove the CD and floppy disk,
and take a break.