The procedure
■tar -clzpvf tgz file --exclude lost+found per
original partition.
■Got the slackware boot image and merge to create bootable CD
with mkisofs and cdrecord.
■Create the partition table as above with fdisk.
■Use mke2fs -L LABEL to format with disk labels.
■mount CD, mount the partitions under /mnt and unpack the
content of the CD under it.
■fix the broken hard links:
cd /mnt/bin
ln gawk-3.0.6 gawkln
zcat gzipln
zcat gunzipcd ../sbinln fsck.ext3 fsck.ext2 ; ln fsck.ext3
e2fsck
Remember to sync the disc and umount -a before
reboot.
■boot slackware kernel on CD but mount the root disc on hard disc
to fix lilo: linux 1 root=/dev/hda11 at the lilo
prompt of the CD. 22Would have been better if either the
slackware image has lilo, or redhat’s lilo on the hard
disc works with slackware’s libc. Then I could have use
lilo -r without this step. ■Actually
Redhat's installation CD (at least 7.2) comes with chroot. In rescue
mode, the CD automatically scan for the root disc (probably by the
disc label) and mount the root file system under
/mnt/sysimage. One can do chroot /mnt/sysimage ; lilo ;
exit to fix the boot loader problem.
■reboot, and let kudzu autodetect new hardware. Changed
hardwares includes video card, USB bridge, network card, etc and it
all worked, except for one particular video card, which doesn’t seem
to like hardware probing much — the machine locks up a little
while either entering X, exiting X, or switching virtual
consoles. kudzu also seems to get a bit confused about
the KVM Switch and want to reconfigure the mouse. And I experienced the
consequence of a broken mouseconfig. Just told kudzu to ignore
forever the mouse change, after doing the first few boxes.
■edit /etc/hosts, /etc/sysconfig/network and
/etc/sysconfig/network-scripts/cfg-eth0 for new network settings.
For convenience, I have made the following changes:
■enable remote X session by editing /etc/X11/xdm/Xaccess and
/etc/X11/xdm/xdm-config, adding port 177 in the former and *
NOBROADCAST in the latter. kill -HUP the X server to get kdm to
reload the config.
■enable telnet and ftp by editing /etc/xinetd.d/telnet,
/etc/xinetd/wu-ftpd. Changed disable=yes to disable=no, and added only_from = 132.146.0.0. (See man xinetd.conf). Send the xinetd a USR1 signal.
The bootup process automatically check disc integrity with
fsck, and parse some start up files with awk. Hard
link for gawk to gawk-3.0.6, fsck.ext2 to
fsck.ext3 need to be fixed before reboot. After reboot, fixes
the rest. In particular, /usr/lib/locale need to be extracted
against the root directory for programs that requires locale
(e.g. apache’s mod_perl) to work properly, and the
terminfo database need to be extracted for proper remote
terminal operations, like running an full-screen editor in a telnet
session.
I should have used tar without the leading
“/” to avoid the hard link extraction
problem. Nevermind.
6