Changing the root device - properly

Craig Reyenga craig at craig.afraid.org
Tue Mar 9 13:46:31 PST 2004


Hi,

The other day, I replaced my server's motherboard with a new one. The old
board had an onboard ATA33 controller that could not read disks >32GB, even
with the bios upgrade, so I bought an ATA133 pci card. The computer has two
disks, a 40GB 5400rpm ata100, and a 120GB 7200rpm ata133. The way I had it
setup was the 40G was the pri master on the controller (ad4), and the 120
was the secondary master (ad6). The root partition is 's1a' on the 40G
drive.

When I put in the new board, I decided to re-arrange things a bit. It has an
ata100 controller on it, so I put the 40G as the pri master on that, and
made the 120G the pri master on the pci card. This obviously changes
ad4->ad0, and ad6->ad4, respectively. I had forgotten to change /etc/fstab
before doing all this, so the kernel couldnt mount the root device, and
complained accordingly. I tried to enter "ufs:/dev/ad0s1a" a few times, with
no luck. I forget the exact error code, but I'm reasonably confident it was
"22." What I ended up doing was putting the drives in the old configuration,
booting up, changing fstab, and then putting it back to the new layout. This
did end up working, but my question now is: What's the _proper_ way of
changing the root device after making hardware changes? Or, should fstab
_always_ be changed prior? I actually didn't forget, I just hadn't thought
of re-arranging the drives until the screwdriver was in my hand...

Thanks,

-Craig



More information about the freebsd-questions mailing list