First some background info. The SCO disk driver has a concept of the active partition and the default kernel/installation configuration uses this when accessing the disk. This allows the correct kernel and partition to be accessed no matter how many changes are made to the boot drive fdisk table as long as it is active. If you have multiple SCO installs on the same drive, just make the one you want active, it just works, but that's problem. The disk driver also has the concept of absolute minors too. These minor numbers point to partitions/divisions on the drive that aren't affected by what is active.
Assumptions:
The boot program also knows about the driver minor numbers. If you want
"boot to do what you want and not what your tell it" you need to give
it the correct instructions. When the /boot
program is loaded it looks
in /etc/default/boot
for instructions to load the next program. By
default this is hd(40)unix. If you want the boot program to always
look for and load the unix kernel on the boot division of the second
partition, the number 40 needs to change to 16.
The /etc/default/boot
file will now contain a line that says hd(16)unix instead of
hd(40)unix.
This will load the correct kernel.
The kernel has compiled in defaults for the root filesystem, swap and
dump. The dump device is where the panic image is written. These can
be changed with a boot string option but why take the risk. The file
/etc/conf/cf.d/sassign
contains the kernel defaults for where it will
look for these devices.
Before | ||
---|---|---|
swap | hd | 41 |
dump | hd | 41 |
root | hd | 42 |
After | ||
swap | hd | 17 |
dump | hd | 17 |
root | hd | 18 |
./link_unix
.
So far boot will find the correct kernel and the kernel will load.
That's about it though. Remember that all the utilities that use the
various devices that point to /dev/swap
,
/dev/root
, /dev/home
and /dev/data
won't
be able to find them. They are looking for devices that still have
minor numbers that aren't any good, they point somewhere else. The
driver doesn't care where the minor number points. It's job is to look
where it's told and get blocks.
To change this there are two places that need to change, the place that controls how device node get made and the existing device nodes.
The /etc/conf/node.d/hd
file has a list of the disk nodes and
the minor numbers to use when creating them. The entries that
have numbers 40 - 47 will need to change to 16 - 23. Changing
these will insure that a kernel relink won't mess up the changes
you are about to make.
The /dev
, /dev/dsk
and /dev/rdsk
directories have the current
device nodes. carefully look for the nodes which have a major
number of 1 and a minor in the range 40 - 47 and remove them one
at a time. When you remove one recreate it with the correct (new)
minor number. Remember to use the correct b or c flag to mknod
too. For example
It take a while but once you are done you can test your work
with the mount command, divvy and sar. If you relink a new
kernel and something doesn't work you know it is in the node.d
directory and you will also need to track the node down in
/dev. Remember that the changes you made to the device nodes
are valid with the old kernel. A floating minor pointing to
the same place as the absolute minor is still the same place.
rm /dev/home
mknod /dev/home b 1 19
rm /dev/rhome
mknod /dev/rhome c 1 19
Once you have smoke tested the settings reboot.
man HW hd
locally for more detail on minor numbers.