NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (i386) Changing the order of "wd"s

Ingolf Steinbach wrote:

in my PC, I have an old hard disk attached to the on-board IDE
controller and a newer SATA disk attached to a separate controller in
one of the PCI slots.

As I plan to retire the old disk soon and work only with the SATA
disk, I'd prefer to have the SATA disk as wd0 and the old one as wd1
in order to keep the numbering consistent when the old one will be

If I disconnect the old disk, the new disk is handled as wd0 during
installation of NetBSD (5.0.1) to that disk. But when I connect the
old disk again (to copy the data), the new disk is then attached as
wd1 which causes the boot procedure to fail.

How can I specify the numbering (except building a custom kernel with
hard-wired numbers)?

Kind regards

As noted by others there really isn't a way to switch the drive device numbering without doing it in the kernel. The way I usually handle this is to update /etc/fstab with the appropriate devices for the disk based on the current situation. The course of action I would take is this:

 o Connect both drives
 o Boot off the "new" disk to single user mode ( boot -s )
 o mount -uw /
 o fix /etc/fstab ( s/wd0/wd1/ )
 o mount -a
 o mount /dev/wd0x to /somewhere
 o copy data as needed
 o fix fstab again ( s/wd1/wd0 )
 o reboot

... beats building a special kernel just for an old disk.


Home | Main Index | Thread Index | Old Index