Installing System Upgrades |
Think Differently. Think MkLinux
|
Home |
About
|
News |
FAQ-O-Matic
|
Getting Started |
Using MkLinux |
Advanced Admin
Installing newer versions of the operating system.
MkLinux is a moving target. New features and bug fixes are added
to both the Mach Kernel and Linux server on a regular basis. If you
would like to benefit from the constant development, then you will
need to learn how to perform an upgrade on an installed system.
David Gatwood
coordinates kernel development for MkLinux and provides regular updates
to the system. See the
Kernel Updates Page for the latest system versions.
There are four major components to MkLinux which may need to be swapped
out when upgrading to a new version.
- Mach Kernel
- vmlinux server
- System.map
- default_pager
The Mach Kernel talks to the hardware. This is the microkernel behind the
"Mk" in MkLinux. On Macintosh systems, it is stored in the Extensions folder
of your MacOS startup disk.
The vmlinux server provides the operating system functionality. This
file is stored on the root partition of your Linux system in the /mach_servers
directory.
System.map is a text file containing information used internally by
vmlinux. The system will function without this file, but it aides in tracking
down problems. You should keep this file up to date with your vmlinux server.
Like the file vmlinux, the System.map file is stored on the root partition
in the /mach_servers directory.
The default_pager does not change frequently and can usually be skipped.
This is the server which handles virtual memory management under MkLinux.
There are two options for installing an upgrade. (Choose one)
Using MkLinux only
These instructions are for performing an upgrade entirely from
within MkLinux. You need to only reboot once to make the upgrade
complete instead of twice where you do pieces from both MacOS
and MkLinux.
- Download the files.
Using your favorite file transfer utility, obtain new copies
of the Mach_Kernel.gz, vmlinux.gz and System.map.gz files.
- Uncompress the files.
Use gunzip to uncompress the new files.
gunzip Mach_Kernel.gz vmlinux.gz System.map.gz
- Become the root user
From here on, you will need to be the superuser to upgrade
the system.
- Mount your Mac OS System disk
Use hfsutils to mount the bootable mac partition, either with the
command line or with xhfs.
hmount /dev/sdXX
Where 'XX' denotes the drive letter and the
partition number of the HFS volume holding your System Folder.
If you do not recall the partition number, use pdisk to examine
your disk partition table. It is generally better to err on
the side of caution and not use the linux kernel HFS code to
write to your system disk.
- Change into the Extensions folder
hcd ":System Folder:Extensions"
This is where you must place the new Mach Kernel.
- Back up or delete your old Mach Kernel
If you want a backup version of the Mach Kernel (always a good idea)
you can rename your current version with
hrename "Mach Kernel" "Mach Kernel - backup"
If you have a previous backup you can delete it using
hdel ":Mach Kernel - backup"
- Copy Mach_Kernel to your Extensions folder
Use the following command to copy and rename the Mach_Kernel
file into Extensions folder.
hcopy -r Mach_Kernel ":Mach Kernel"
The MkLinux booter will not recognize the Mach Kernel unless it
is named "Mach Kernel" with a space not an underscore.
- Install the vmlinux and System.map files
The uncompressed vmlinux and System.map files belong in the
/mach_servers directory. You should rename the old files
to vmlinux.old and System.map.old, just in case the new
versions don't work on your machine, and cp the new
files into this directory. If you are installing a new
version of the default_pager or mach_init, they also
belong in this directory.
- Reboot the machine.
Use shutdown -r now to reboot the system.
- Download files in binary mode to your machine.
All of these files are linux binaries, even those which are placed
in the Macintosh System folder. It is important to prevent the automatic
conversion of some characters which can take place during file transfers.
- Uncompress the file Mach_Kernel.gz
The file was compressed with the utility, gzip. There are several
applications which can be used to decompress the file, MacGzip, Stuffit
Deluxe, etc.
- Rename the file to "Mach Kernel"
It is important
that the file have precisely this name in order for the booter
to find it. Be sure to replace the underscore, '_', in the
name with a space.
- Place the file in your Extensions folder.
The file
"Mach Kernel" is not a Macintosh extension, so the Mac OS will not
recognize it if you simply drop it on System Folder. You must place
the file in your Extensions folder yourself.
- Reboot into MkLinux
At this point you will have
the new Mach Kernel installed and an older vmlinux. There
is no guarantee that this will work. One reason you might
want to do things this way would be if you cannot download the
files from within MkLinux.
- Mount the HFS partition
As the root user, use either hfsutils or mount the hfs partition
read-only.
hmount /dev/sdXX
or
mount -t hfs -r /dev/sdXX /mnt/mac
Where 'XX' refers to the drive letter and
partition number of the HFS volume containing the vmlinux and
System.map files. The mount command expects a mount point (here
called /mnt/mac), but the hmount command does not expect one.
- Copy the vmlinux server and System.map files
Use hcopy or cp to move the new files onto your linux partition
if you mount your HFS volume with hmount or mount respectively.
Use gunzip to uncompress the files, if you have not already
done this.
- Unmount the HFS volume.
Use
humount
or
umount /mnt/mac
to unmount your HFS volume if you originally mounted the volume
using hmount or mount respectively.
- Install the vmlinux and System.map files
The uncompressed vmlinux and System.map files belong in
the /mach_servers directory. You should rename the old files
in this directory to vmlinux.old and System.map.old, just in
case the new versions don't work on your machine, and cp the
new files to this location. If you are installing a new
version of the default_pager or mach_init, they also belong
in this directory.
- Reboot the machine.
Use shutdown -r now to reboot the system and
try out your new kernel/server pair.