File note:
The small swap file turned out to be a major problem, causing occasional disk thrashing. There appears to be no safe way to change partition sizes on a Linux HDD so I decided to copy the whole system over to another drive. I would have liked to make a good copy of the drive to a replacement drive using rsync and looked everywhere for a rescue floppy or CD with rsync but none seem to have it. So I gave up on that idea and decided I would have to copy from the live system to the backup.
I temporarily installed a spare HDD as secondary master /dev/hdc and partitioned it manually for the new system as follows.
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 3 24066 83 Linux
/dev/hdc2 4 1247 9992430 5 Extended
/dev/hdc5 4 20 136521 82 Linux swap
/dev/hdc6 21 1247 9855846 83 Linux
Next I did a mke2fs on /dev/hdc1 and /dev/hdc6 and a mkswap on /dev/hdc5.
Then swapon /dev/hdc6 to prevent the thrashing problem.
Next, I mounted the new partitions:
mount /dev/hdc1 /newdisk/boot
mount /dev/hdc2 /newdisk/main
then used rsync to copy the operating system across:
rsync -ax / /newdisk/main/
rsync -ax /boot /newdisk/boot/
Next, shut down, remove the old main drive, put the replacement in as /dev/hda.
Boot up with a slackware rescue disk, with mount root=/dev/hda6 at the prompt.
Discovered a problem with partition mounting - drops into single user read-only mode. Run mount -n -o remount,rw / to get it to read-write.
Edit /etc/fstab to explicitly state the partitions to be mounted.
Mount /dev/hda1 /boot to access the kernel image file.
Run lilo.
All looks ok so reboot.
Reboots cleanly! Hooray!
That's all for now.
Phil Maley