Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Phil Maley on September 20, 2002, 10:27:21 AM
-
Hi all
Yesterday I decided I'd better upgrade my old E-Smith 4.1 to the latest version. I had a spare HDD which already had another version of Linux installed so I carried out the following steps:
1. Shut down the box
2. Installed the spare drive as secondary master
3. Booted up from a DOS diskette and ran Norton Ghost.
4. Copied the primary master DISK to the seconday master.
5. Shut down, removed the primary master drive and swapped the new copy to primary master so that I could do the upgrade on the "spare" drive.
6. Installed the 5.5 upgrade and installed patches 1 and 2.
All seems to be OK, EXCEPT I've now discovered the partition layout is as follows:
Disk /dev/hda: 255 heads, 63 sectors, 1582 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3 24066 83 Linux
/dev/hda2 4 1580 12667252+ f Win95 Ext'd (LBA)
/dev/hda5 4 4 8001 82 Linux swap
/dev/hda6 5 1580 12659188+ 83 Linux
Obviously my swap partition is way too small and I'm also wondering if /dev/hda2 being type "f" is likely to cause any problems. It's been running happily for 24 hours now so looks like it could be OK.
I think I need to copy each partition back to the old drive. What do you think?
Regards
Phil Maley
-
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