The standard glued linux installation procedure trades flexibility for ease of use with respect to the allowed disk partitioning. Although you can choice the disk to install on, and can opt to use fdisk to resize partitions, you are still stuck with the basic partioning scheme, wherein
File system | Disk partition/slice # | FS type | Comments |
---|---|---|---|
root (/) | 1 | ext3 | /boot and /tmp on this partition |
swap | 2 | N/A | |
/usr | 5 | ext3 | |
/var | 6 | ext3 | |
/usr/vice/cache | 7 | ext3 | |
/tmp | N/A | N/A | same fs as root(/) |
/boot | N/A | N/A | same fs as root(/) |
While the above is fine for most situations, and indeed is quite similar to the set up on other Glue platforms, it can be a problem if you have special needs. E.g. dual booting, spreading the image over multiple disks, or even just maintaining a copy of the original OS in case you want to be able to talk to the vendor if there is a hardware issue. The following discusses how to do some more stuff.
This is not for the faint of heart. Neither Physics nor OIT Glue staff promise that any of this stuff will work. In particular, while this page may help you to install a system in a given way, no guarantees are made that the installed Glue system will be functional. E.g., not all supported filesystems are supported by the AFS client for the cache partition.
The basic procedure is to do the netboot as you would do for a normal
install, but choose the advanced partioning
option during the
install. You then can partition
your drive or drives with fdisk
, as per normal. After formatting,
you will be brought into an editor screen wherein you can create a config
file which instructs the glueinstall
which partition is which,
etc. as described
below.
/
) should be at least 1 GB.
Note I would advice
splitting /tmp
off of the root partition.
/usr
should be at least 4 GB.
/var
should be at least 1 GB.
/usr/vice/cache
should be at least 1 GB.
/tmp
partition
of about 1 GB or more.
/boot
partition if desired should be
at least about 100 MB.
glueinstall
will throw you
into an editor with a sample (commented out) config file. You must edit
this file to inform the code which partition it should use for which
filesystems.
It consists of ASCII text,
one line per partition, with fields separated by colons (':'). Lines beginning
with a hash mark ('#') are considered comments and ignored (the entire "default"
config file is commented out).
Values are all case sensitive.
The fields for each partition
ROOT
for the root file system (required)
USR
for the /usr
file system
(recommended, if missing becomes part of ROOT).
SWAP
the swap partition (required)
VAR
the /var
file system
(recommended, if missing becomes part of ROOT).
TMP
the /tmp
file system
(recommended, if missing becomes part of ROOT).
CACHE
the AFS cache partition,
/usr/vice/cache
file system
(required) (I believe AFS client only supports this
for ext2 or ext3 filesystem types).
BOOT
the /boot
file system
(if missing becomes part of ROOT). Not fully supported?
GRUB
this actually does not represent a
partition, but indicates where GRUB should be installed.
Defaults to the MBR of the disk ROOT is on.
hda1
, sda7
.
The /dev
directory prefix is assumed, and must
not be included. Be sure to change the default hda
to sda if using SCSI, etc.
mount
and
mkfs
is legal. This field must not be provided
for usage types SWAP
or GRUB
. It
is optional in other cases, defaulting to ext3
.
mkfs
)
the partition first. If 0, it is assumed the partition has
already had a valid filesystem of the specified type (see
previous field) installed on it. Otherwise, the script will
mkfs
to the filesystem type specified in the
previous field. Default is 1 ( it).
This field must
be left blank for usage types SWAP
or
GRUB
.
/tmp/mnt
, the others should be mounted in the
appropriate subdirectory of the root filesystem of the to be
installed system). If 0, it is assumed you already mounted
it. Otherwise, the script will mount the filesystem in the
appropriate directory (based on usage flag) with the appropriate
file system type. Default is 1.
This field must
be left blank for usage types SWAP
or
GRUB
.
As can be seen, the first two fields are always required, and the remaining
fields can be dropped off from the right (e.g. if only four fields are given,
the last field (mount flag) is defaulted). Usage types SWAP
and GRUB
, since they do not represent file systems, may only
have the first two fields set.
Note that there is no sizing information; the partition sizes are set in the
partition table with fdisk
, etc. This file only says which
partition is intended to be what. Any partitions that are irrelevant to the
install of the new system (i. e. are purely for local data, or for other
operating systems) should simply be omitted. It may be useful to keep this
file on a floppy for use in future systems; particularly if calling
glueinstall
from a floppy.
Typically, I find I generally only need to uncomment the "default" config
lines, change hda
to sda
if using a SCSI or
pseudo-SCSI device, and change the partition numbers.
Example 1 This example gives the
standard partitioning for a glued linux install onto the first IDE/ATA
hard drive. (Of course, it really is foolish to use the advanced mode
functionality for such a case). Note that /
, /usr
,
/var
, and /usr/vice/cache
all are set to use the
ext3
filesystem, and for the script to and mount due to
the defaulting of some fields. /tmp
and /boot
are
not listed, and so will be kept as part of the root filesystem rather than
separate mount points.
ROOT:hda1:ext3:1:1 SWAP:hda2 USR:hda5:ext3 VAR:hda6 CACHE:hda7:ext3:1
Example 2 This example gives a sample
partitioning we use on some of our servers. The server originally had a
special utility partition on sda1
and the original vendor
operating system on sda2
which we did not wish to disturb in
case we needed to contact the vendor on hardware issues (they often insist
on testing the problem in the OS they listed the machine as being sold with).
So instead we put all the linux stuff on logical partitions of the first
SCSI drive.
ROOT:sda5:ext3:1:1 SWAP:sda6 USR:sda7:ext3:1:1 VAR:sda8:ext3:1:1 TMP:sda9:ext3:1:1 CACHE:sda10:ext3:1:1Note that we add a separate codeit(/tmp) filesystem, but leave
/boot
on the root filesystem. Grub will be installed on the
master boot record of sda
.
/boot/grub/grub.conf
. The standard glue install will give
you a chance to edit this, you should probably always say yes and check that
the default is correct.
If you have a separate boot partition, the /boot
prefix should
be removed from all the paths pointing to kernels and initrd images.
If your /boot
partition (or your /
partition if
/boot
is not a separate filesystem) is not the first
partition/slice of the disk grub is on, you will need to change all the
occurences of hd0,0
to hd0,
n where
n is one less than the partition number of the /boot
or /
filesystem. E. g. for example 2 above, these should be
changed to hd0,4
There may be other changes needed in grub.conf
for more
complicated situations. If there is a problem booting, netboot again into
maintenance mode, mount /
and /boot
if necessary
and make the changes needed.
Just for future reference, we are providing a list of undocumented
arguments for the glueinstall
(but if we document them
here, they're no longer undocumented :)
(Note: This section has not been updated in some time)
auto
: does an automatic install based on
bootparams (does this function in linux???)
fixit
: some message about replacing a bogus
kernel. Not entirely sure what this means, much less
if works for linux.
settime
: just uses ntp to set the clock
help
: prints a small usage paragraph. Physics version
only.