On Fri, Oct 26, 2001 at 10:10:31PM -0700, Ross Boylan wrote: > I am trying to isolate some disk problems, which may be in the disks > or the motherboard. It would be helpful if I switched cables so the > disks connected to the IDE 0 connector on the motherboard go into #1, > and vice versa. > > The problem is that this completely throws off my drive mappings for > LILO, wired in the kernel (I think they are wired in) and /etc/fstab. > For example, all /hda become /hdc. > > An additional wrinkle is that lilo.conf includes > append="hdc=ide-scsi" > because hdc is an ATAPI CD-Writer. > > What's the best way to handle this? > > My boot process starts with the NT loader, which I then point at an > image of the Linux boot sector. It would be easy to add another boot > sector image. >
Because of some unfortunate incidents, I've become more adapt at LILO. I think the following approach will work: 1. Edit lilo.conf, if needed, to create at least one option without the hdc=ide-scsi line. Possibly one could also use the literal="" argument at the lilo prompt to throw out the append="..." in the conf file. 2. Run lilo and create a suitable boot diskette or image. 3. Switch cables. 4. Boot system, select the appropriate image name to start (from step 1) and specify root=/dev/hdc6, or whatever your new root location is. 5. Get lots of mount failure errors. 6. edit /etc/lilo.conf and /etc/fstab to match your new setup. 7. rerun lilo and install appropriate boot sector. 8. reboot and see if it all works. This doesn't permit easy swapping of configurations, but I think it will at least work. Alternate approach for general disaster recovery (iinspired by HOW-TO's): Create rescue and root diskettes from debian install. Start up from rescue diskette. At the first prompt, specify rescue root=/dev/fd0. Insert the root diskette when prompted. Exit out of the install to a subshell. Mount your "real" root partition under, e.g., /real/. Edit lilo.conf and fstab in /real/etc/ (like 6 above). chroot /real lilo installl boot sectors, reboot as appropriate. I know the latter approach works because I just had to do it. I find I'm unable to use the rescue diskette with rescue root=/dev/hdc6 (or whatever) because the kernel version on the rescue diskette doesn't match my root partition, so it can't find /lib/modules/x.y.z/, where x.y.z is the kernel version on the rescue diskette. It just goes into an infinite loop saying it can't find the dir. I think the main approach outline above will solve that problem.