# 7.2 -> 8.1, changed /dev/ad0*



## rptv2010 (Oct 10, 2010)

Hi,

I am trying to upgrade from FreeBSD 7.2 to 8.1-RELEASE. First, I run the following on 7.2:


```
# freebsd-update upgrade -r 8.1-RELEASE
# freebsd-update install
# shutdown -r now
```

After that, boot stopped while mounting root:

```
Trying to mount root from ufs:/dev/ad0s3a
ROOT MOUNT ERROR:
If you have invalid mount options, reboot, and first try the following from
the loader prompt:

	set vfs.root.mountfrom.options=rw

and then remove invalid mount options from /etc/fstab.

Loader variables:
vfs.root.mountfrom=ufs:/dev/ad0s3a
vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
		       eg. ufs:/dev/da0s1a
		       eg. cd9660:/dev/acd0
		       This is equivalent to: mount -t cd9660 /dev/acd0 /

  ?		     List valid disk boot devices
  <empty line>	     Abort manual input

mountroot>
```

Issuing '?' shows the valid disk boot devices:


```
mountroot> ?

List of GEOM managed disk devices:
  acd0 msdosfs/ACER msdosfs/PQSERVICE ad0p ad0o ad0n ad0m ad0l ad0k ad0j ad0i ad
0f ad0e ad0d ad0b ad0a ad0
Loader variables:
vfs.root.mountfrom=ufs:/dev/ad0s3a
vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
		       eg. ufs:/dev/da0s1a
		       eg. cd9660:/dev/acd0
		       This is equivalent to: mount -t cd9660 /dev/acd0 /

  ?		     List valid disk boot devices
  <empty line>	     Abort manual input

mountroot>
```

Trying to figure out what is wrong with the device names, I boot using the "FreeSBIE 2.0.1-RELEASE" live CD, which is based on FreeBSD 6.2-RELEASE. The /dev/ad0* are the ones I expected:


```
$ ls -l /dev/ad*
crw-r-----  1 root  operator    0,  92 Oct  9 17:50 /dev/ad0
crw-r-----  1 root  operator    0,  93 Oct  9 17:50 /dev/ad0s1
crw-r-----  1 root  operator    0,  94 Oct  9 17:50 /dev/ad0s2
crw-r-----  1 root  operator    0,  95 Oct  9 17:50 /dev/ad0s3
crw-r-----  1 root  operator    0, 102 Oct  9 17:50 /dev/ad0s3a
crw-r-----  1 root  operator    0, 103 Oct  9 17:50 /dev/ad0s3b
crw-r-----  1 root  operator    0, 104 Oct  9 17:50 /dev/ad0s3c
crw-r-----  1 root  operator    0, 105 Oct  9 17:50 /dev/ad0s3d
crw-r-----  1 root  operator    0, 106 Oct  9 17:50 /dev/ad0s3e
crw-r-----  1 root  operator    0, 107 Oct  9 17:50 /dev/ad0s3f
crw-r-----  1 root  operator    0, 108 Oct  9 17:50 /dev/ad0s3g
crw-r-----  1 root  operator    0,  96 Oct  9 17:50 /dev/ad0s4
crw-r-----  1 root  operator    0, 109 Oct  9 17:50 /dev/ad0s5
crw-r-----  1 root  operator    0, 110 Oct  9 17:50 /dev/ad0s6
crw-r-----  1 root  operator    0, 114 Oct  9 17:50 /dev/ad0s6a
crw-r-----  1 root  operator    0, 115 Oct  9 17:50 /dev/ad0s6c
crw-r-----  1 root  operator    0, 116 Oct  9 17:50 /dev/ad0s6d
crw-r-----  1 root  operator    0, 111 Oct  9 17:50 /dev/ad0s7
```
and they are in agreement with those specified in my /etc/fstab:


```
$ sudo mount -r /dev/ad0s3a /mnt/ufs.1
$ cat /mnt/ufs.1/etc/fstab
# Device        Mountpoint       FStype  Options           Dump          Pass#
/dev/ad0s3b     none             swap    sw                0             0
/dev/ad0s3a     /                ufs     rw                1             1
/dev/ad0s3g     /home            ufs     rw                2             2
/dev/ad0s3e     /tmp             ufs     rw                2             2
/dev/ad0s3f     /usr             ufs     ro                2             2
/dev/ad0s6d     /usr/local       ufs     ro                2             2
/dev/ad0s6a     /usr/ports       ufs     ro                2             2
/dev/ad0s3d     /var             ufs     rw                2             2
/dev/acd0       /cdrom           cd9660  ro,noauto         0             0
```

However, booting with the "FreeBSD 8.1-RELEASE i386 livefs" CD and running Fixit, I see these special files:


```
# ls -l /dev/ad*
crw-r-----  1 root  operator    0,  87 Oct  9 18:13 /dev/ad0
crw-r-----  1 root  operator    0,  89 Oct  9 18:13 /dev/ad0a
crw-r-----  1 root  operator    0,  90 Oct  9 18:13 /dev/ad0b
crw-r-----  1 root  operator    0,  91 Oct  9 18:13 /dev/ad0d
crw-r-----  1 root  operator    0,  92 Oct  9 18:13 /dev/ad0e
crw-r-----  1 root  operator    0,  93 Oct  9 18:13 /dev/ad0f
crw-r-----  1 root  operator    0,  94 Oct  9 18:13 /dev/ad0i
crw-r-----  1 root  operator    0,  95 Oct  9 18:13 /dev/ad0j
crw-r-----  1 root  operator    0,  96 Oct  9 18:13 /dev/ad0k
crw-r-----  1 root  operator    0,  97 Oct  9 18:13 /dev/ad0l
crw-r-----  1 root  operator    0,  98 Oct  9 18:13 /dev/ad0m
crw-r-----  1 root  operator    0,  99 Oct  9 18:13 /dev/ad0n
crw-r-----  1 root  operator    0, 100 Oct  9 18:13 /dev/ad0o
crw-r-----  1 root  operator    0, 101 Oct  9 18:13 /dev/ad0p
```
which agree with the output of the '?' mountroot> command.

I do not understand what I am doing wrong or whether I am being able to go on with the upgrade from this point or not.

Any help will be appreciated.

TIA,

Rafa.


----------



## Beastie (Oct 10, 2010)

rptv2010 said:
			
		

> However, booting with the "FreeBSD 8.1-RELEASE i386 livefs" CD and running Fixit, I see these special files:
> 
> 
> ```
> ...


Did you install 7.2 in dangerously dedicated (DD) mode? This was removed in 8.0. You can check [post=59234]this[/post] for a possible solution.


----------



## rptv2010 (Oct 10, 2010)

Beastie said:
			
		

> Did you install 7.2 in dangerously dedicated (DD) mode? This was removed in 8.0. You can check [post=59234]this[/post] for a possible solution.



Great!

It seems this was my case. According to the information available in the post you have pointed to, and also the one in http://lists.freebsd.org/pipermail/freebsd-current/2009-January/001892.html, I have issued the commands:


```
# dd if=/dev/zero of=/dev/ad0 oseek=1 count=1
dd: /dev/ad0: Operation not permitted
# sysctl kern.geom.debugflags=16
kern.geom.debugflags: 0 -> 16
# dd if=/dev/zero of=/dev/ad0 oseek=1 count=1
```

and now everything seems ok.

Thanks a lot for your time and help.

Regards,

Rafa.


----------



## jem (Oct 12, 2010)

Beastie said:
			
		

> Did you install 7.2 in dangerously dedicated (DD) mode? This was removed in 8.0. You can check [post=59234]this[/post] for a possible solution.



Is it really possible to "remove" Dangerously Dedicated mode from FreeBSD entirely?

I could understand the removal of support for DD mode from sysinstall, but it seems unlikely that it would be removed from FreeBSD entirely.

DD mode is after all just where a bsdlabel is created at the top level of a disk device instead of inside an MBR partition.  As far as I can tell, there's nothing to stop you from still doing this with a manual FreeBSD installation.  It would seem that preventing that would require the addition of code to deliberately block any attempt to bsdlabel a disk device.  Seems unlikely to me.


----------

