How to predict drive number change for 7.3->8.1 upgrade?

Nenhum_de_Nos matheus at
Fri Sep 17 18:54:29 UTC 2010

On Fri, September 17, 2010 13:10, Freddie Cash wrote:
> On Fri, Sep 17, 2010 at 5:38 AM, Oliver Fromme <olli at>
> wrote:
>> Michael Sperber <sperber at> wrote:
>>  > I just upgraded my desktop system from 7.3 to 8.1, and the main hard
>>  > drive, which was /dev/ad6 before is now /dev/ad10.  Consequently,
>> the
>>  > initial boot failed when trying to mount the root file system from
>> ad6.
>>  >
>>  > The desktop system is now fixed, but I also have a rented server
>> with
>>  > only a serial console, and I worry that the upgrade is going to
>> leave me
>>  > with a dead machine.  Is there any way to predict how the drive
>> number
>>  > changes?  (Why does it change at all?)  If so, what's the proper
>> way to
>>  > tell the system the initial root device *before* rebooting?
>> Remove "options ATA_STATIC_ID" from your kernel config
>> before building the new kernel and rebooting.  Then your
>> first disk will be ad0, no matter what controller and
>> channel it is connected to.  Be sure to update your
>> /etc/fstab file.
> Problem with doing that (no ATA_STATIC_ID) is that if you change the
> order that your PCI devices are enumerated, you will change the order
> in which your disks are probed, and all your numbers change again.  :)
>  And there's an option for this in every BIOS I've worked with.  Plus,
> moving addon controllers from one slot to another will also re-number
> your devices.
> The best, long-term, solution is to label your devices/filesystems so
> that the name never changes, no matter what happsn to the underlying
> device nodes.  There are multiple ways to do so, depending on whether
> you want to label the disk, the slice, the partition, or the
> filesystem:
>   - glabe;
>   - gpart labels
>   - filesystem labels

I have the same issue, a virtual machine rented in some datacenter. I'd
like to know a way that is safe, as I did already on another box the
glabel way without newfs on the label (but the underlying device). never
got problems thought, but I figure this way is better for aditional disks,
not / and system slices.



We will call you cygnus,
The God of balance you shall be

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

More information about the freebsd-stable mailing list