|
(this issue might apply to the other BSDs, Linux, Solaris etc as well)
FreeBSD automatically names ATA hard disks like this:
controller | state | # | name | |
---|---|---|---|---|
primary | master | -> | drive 0 | ad0 |
primary | slave | -> | drive 1 | ad1 |
secondary | master | -> | drive 2 | ad2 |
secondary | slave | -> | drive 3 | ad3 |
On boot, the FreeBSD boot loader tries to mount the root partition; the location of the root partition is indexed using the drive number it is installed on (for example, ad0s1a or ad2s1a). However in the following circumstances, the FreeBSD boot loader will be unable to locate the root partition, and display a 'trying to mount root' message, followed by a prompt to mount manually:
These actions cause the FreeBSD drive to be renumbered. As the root partition is indexed by drive number, if the drive number changes, the root partition will no longer be where FreeBSD expects it to be.
The fix is as follows:
Note: the above problem can also occur if, for example, FreeBSD is installed on a drive in a USB enclosure, then the drive is removed from the enclosure and placed into a machine (connected directly to a hard drive controller). In this example, the drive would be named da0 while it was connected to the USB enclosure, but named ad0 when it was connected to the primary IDE channel. The fix is identical - in /etc/fstab, change every mention of da0 to ad0, using the procedure above.
related articles: |