Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Dec 2018 15:54:32 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        freebsd-current@freebsd.org
Subject:   r342378 fails sometimes on boot mounting root (error 2)
Message-ID:  <20181228145432.GA2249@c720-r314251>

next in thread | raw e-mail | index | archive | help

Hello,

I've setup a new r342378 (December 23) for amd64 onto an external disk
with this procedure:

# grep da0 /var/log/messages
...
Dec 28 14:20:01 c720-r314251 kernel: da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
Dec 28 14:20:01 c720-r314251 kernel: da0: <WD Elements SE 25FE 1021> Fixed Direct Access SPC-4 SCSI device
Dec 28 14:20:01 c720-r314251 kernel: da0: Serial Number 575854314134383033483150
Dec 28 14:20:01 c720-r314251 kernel: da0: 400.000MB/s transfers
Dec 28 14:20:01 c720-r314251 kernel: da0: 953837MB (1953458176 512 byte sectors)
Dec 28 14:20:01 c720-r314251 kernel: da0: quirks=0x2<NO_6_BYTE>


# gpart destroy -F da0
da0 destroyed
# gpart create -s gpt da0
da0 created
# gpart add -t freebsd-boot -s 512k -a4k -l extboot da0
da0p1 added
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 da0
partcode written to da0p1
bootcode written to da0
# gpart add -t freebsd-ufs -l  extrootfs -b 1m -s 256g da0
da0p2 added
# gpart add -t freebsd-swap -l extswap -a 1m -s 2g da0
da0p3 added
# gpart add -t freebsd-ufs -l  extbackupfs -a 1m da0
da0p4 added

# newfs -U /dev/gpt/extrootfs
# newfs -U /dev/gpt/extbackupfs

# gpart set -a active da0
active set on da0
# gpart show -l da0
=>        40  1953458096  da0  GPT  (931G)
          40        1024    1  extboot  (512K)
        1064         984       - free -  (492K)
        2048   536870912    2  extrootfs  (256G)
   536872960     4194304    3  extswap  (2.0G)
   541067264  1412388864    4  extbackupfs  (673G)
  1953456128        2008       - free -  (1.0M)


# mount /dev/gpt/extrootfs /mnt

# cd /usr/src
# make installworld  DESTDIR=/mnt
# make installkernel DESTDIR=/mnt
# make distrib-dirs  DESTDIR=/mnt
# make distribution  DESTDIR=/mnt

# cd ~guru/C720

# cp -p rc.conf         /mnt/etc
# cp -p c720.kbd        /mnt/etc
# cp -p sysctl.conf     /mnt/etc
# cp -p loader.conf     /mnt/boot/
# cp -p device.hints    /mnt/boot/

# cat > /mnt/etc/fstab  <<EOF
/dev/gpt/extrootfs  / ufs rw,noatime 1 1
/dev/gpt/extswap none swap sw 0 0
EOF

# chroot /mnt passwd root
Changing local password for root
New Password:

# umount /mnt

The disk now boots sometimes fine, more times it fails with:

Trying to mount root from ufs:/dev/gpt/extroot [rw, noatime]...
Mounting from ufs:/dev/gpt/extroot failed with error 2; retrying fpr 3 seconds
Mounting from ufs:/dev/gpt/extroot failed with error 2; retrying fpr 2 seconds
Mounting from ufs:/dev/gpt/extroot failed with error 2; retrying fpr 1 seconds
...

I can provide a 'dmesg' output from an successful boot, if this helps.

Any hints? Thanks

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181228145432.GA2249>