Hello all:
A little knowledge is a dangerous thing. I'm an old Unix hacker who made
the mistake of assuming he could take some shortcuts on Linux by just
reading a few manuals here and there. Of course, I made a mess of things.
I was attempting to take a functioning Mandrake 7.0 system and move it to a
larger disk. I'd heard there were some "disk clone" utilities out there,
but I figured I didn't need them. I went about it in a rather ass-backwards
way, and now I'm experiencing problems loading modules. This is what I did:
1. I moved the existing (old) disk from SCSI ID 0 to 2. (I had an extra
disk at SCSI ID 1, which I plan to use for extra space.)
2. I installed the new disk at SCSI ID 0. Unfortunately, I had to replace
my SCSI card, because the existing SIIG board was narrow and the new drive
was wide. I replaced it with an Advansys card because I couldn't find a
wide SIIG at Fry's.
3. I made a new Mandrake 7.0 installation on the new drive. This time I
selected just about all the packages, because I figured I had the room.
4. In the new disk's fstab file, I added the "/", "/boot", and "/home"
partitions from the old disk as "/root2", "/boot2", and "/home2", and
rebooted. I could then see the contents of the old disk from the new
configuration.
5. I fiddled with lilo.conf on the old disk until I got it to boot as /sdc1
instead of /sda1. It took me a while to figure out the correct parameters
for /sbin/lilo, but the following seemed to work:
/sbin/lilo -m /boot2/map -i /boot2/boot.b -C /root2/etc/lilo.conf
6. I booted Mandrake on the old disk (now sdc.) (I use System Commander,
because I was already using it for a multi-OS configuration on that
machine.) Mandrake (in the old installation) surprised me by recognizing
that the SIIG board was gone and the Advansys board had been installed.
7. On the old Mandrake disk (now sdc), I modified the fstab file so I could
see the new disk's partitions as "/root1", "/boot1", and "/home1", and
rebooted again.
8. From the old configuration, I did a "cp -R -f -d" for all the directories
under "/" and "/home" on the old disk to copy everything to the new. Before
I did this, I saved the original copies of the new configuration's fstab and
lilo.conf files, which I later restored to the partition names would be
right on the new disk.
The problems are:
1. The new disk won't boot anymore, because it's still trying to load the
SIIG driver (initio.o) instead of the Advansys driver (advansys.o.) I
changed the driver entry in /etc/conf.modules but this doesn't seem to make
a difference. Apparently I trashed the new configuration's module
information by copying files from the old disk. Why isn't Mandrake smart
enough (in this situation) to recognize the changed card? Is the SCSI-card
module information duplicated elsewhere, or do I need to somehow "compile"
the info in conf.modules?
2. I can still boot from the old disk, but it won't mount the floppy OR the
CDROM, saying that the major and/or minor numbers are incorrect for /dev/fd0
and /dev/hdc. I'm using the original fstab file (with changes from "sda" to
"sdc") so why would the floppy and CD be affected?
3. Wierdest of all: the kernel version has changed. I didn't realize this,
but when I installed Mandrake to the NEW disk, it installed the kernel
version 2.2.14-1mdklinus instead of 2.2.14-15mdk. I don't know HOW that
happened, or even what the differences are supposed to be, but in any case,
Mandrake won't load the drivers for my ethernet card (pci_scan.o and
tulip.o) because I had originally compiled them for the WRONG kernel. I
tried recompiling to no avail; apparently the "make" environment from the
old disk is creating object files that match the old kernel. Is there an
easy way to get my old kernel back? Or is there some kind of environment
variable I need to fix so I can recreate these object files correctly?
I know this is a long, rambline question, but I'd appreciate it if somebody
could tell me what the heck I'm doing wrong here. I'd like to keep the new
disk, and avoid redoing everything I did on the original configuration. And
hopefully, this posting will provide an example of how NOT to move a working
system to a new disk.
Thanks in advance,
Vaughn Treude
vaughn@nakota-software.com