Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Apr 2013 21:14:10 -0500
From:      Scott Newell <newell+sparc@n5tnl.com>
To:        freebsd-sparc64@freebsd.org
Subject:   U60 needs two tries to boot 8.3 UFS/ZFS?
Message-ID:  <20130406021412.C62E864914@n5tnl.com>

next in thread | raw e-mail | index | archive | help
I'm trying to do a 8.3-release UFS boot/ZFS root setup on an Ultra 60 
(2*300 MHz, 2GB, 2*78 GB disks).  I can boot into a standard FreeBSD, 
OpenBSD, or Debian install, but not this ZFS install.  At least not 
the first time.

The first time I attempt to boot the disk, I get a "Trap 3e".  If I 
retry the boot from the OBP (OpenBoot 3.31) it works!  I've tested on 
two disks and two machines to rule out hardware.

Here's the serial output:

{0} ok boot disk
Boot device: /pci@1f,4000/scsi@3/disk@0,0  File and args:
Trap 3e
{0} ok boot disk
Boot device: /pci@1f,4000/scsi@3/disk@0,0  File and args:

 >> FreeBSD/sparc64 boot block
    Boot path:   /pci@1f,4000/scsi@3/disk@0,0:a
    Boot loader: /boot/loader
Consoles: Open Firmware console

Booting with sun4u support.

FreeBSD/sparc64 bootstrap loader, Revision 1.0
(root@araz.cse.buffalo.edu, Mon Apr  9 23:14:08 UTC 2012)
bootpath="/pci@1f,4000/scsi@3/disk@0,0:a"
Loading /boot/defaults/loader.conf
/boot/kernel/kernel data=0xa0b248+0x6e830 syms=[0x8+0xadc40+0x8+0xa05cc]
/boot/kernel/zfs.ko text=0x20ba50 data=0x5808+0x16eb0 
syms=[0x8+0x168a8+0x8+0x11384]
loading required module 'opensolaris'
/boot/kernel/opensolaris.ko text=0x3168 data=0x3a0+0x830 
syms=[0x8+0xd38+0x8+0x8eb]


I'm manually building this UFS boot/ZFS root system from a running 
standard install, with the standard install on da0 and the ZFS 
install is to da1.  I power down and swap the disks to test it.  I 
think I've rebuilt this at least 3 times now with the same trap 3e.

I dd'd the first 32kb of both disks:
http://n5tnl.com/freebsd/sparc64/std_boot.bin
http://n5tnl.com/freebsd/sparc64/zdisk_boot.bin

Here's the recipe I used, slightly modified from 
http://forums.freebsd.org/showthread.php?t=27728:

sysctl kern.geom.debugflags=0x10
gpart destroy -F da1
gpart create -s vtoc8 da1
sunlabel -B da1
gpart add -s 192M -t freebsd-ufs /dev/da1
gpart add -s 1G -t freebsd-swap /dev/da1
gpart add -t freebsd-zfs /dev/da1
kldload /boot/kernel/opensolaris.ko
kldload /boot/kernel/zfs.ko
zpool create -f -m /mnt zroot /dev/da1d
zpool set bootfs=zroot zroot
zfs set checksum=fletcher4 zroot
zfs set compression=lzjb zroot
zfs create zroot/usr
zfs create zroot/var
zfs create zroot/tmp
zfs create zroot/data
chmod 1777 /mnt/tmp
zpool export zroot
zpool import -o cachefile=/tmp/zpool.cache zroot
mkdir /mnt/bootdir
newfs -m 0 /dev/da1a
mount /dev/da1a /mnt/bootdir
cd /usr/freebsd-dist
export DESTDIR=/mnt
cd /usr/freebsd-dist/base; ./install.sh
cd /usr/freebsd-dist/kernels; ./install.sh generic
cd /usr/freebsd-dist/doc; ./install.sh
cd /usr/freebsd-dist/games; ./install.sh
cd /usr/freebsd-dist/dict; ./install.sh
cd /usr/freebsd-dist/manpages; ./install.sh
mkdir /mnt/boot/zfs
cp /tmp/zpool.cache /mnt/boot/zfs/zpool.cache
chroot /mnt
# Set rc.conf and boot/loader.conf
echo 'defaultrouter="192.168.0.1"' > /etc/rc.conf
echo 'hostname="zfs.localnet.net"' >> /etc/rc.conf
echo 'ifconfig_rl0="inet 192.168.0.14  netmask 255.255.255.0"' >> /etc/rc.conf
echo 'ntpdate_enable="YES"' >> /etc/rc.conf
echo 'ntpdate_hosts="192.168.0.6"' >> /etc/rc.conf
echo 'sshd_enable="YES"' >> /etc/rc.conf
echo 'ntpd_enable="YES"' >> /etc/rc.conf
echo 'zfs_enable="YES"' >> /etc/rc.conf
echo 'zfs_load="YES"' > /boot/loader.conf
echo 'vfs.root.mountfrom="zfs:zroot"' >> /boot/loader.conf
echo 'vfs.zfs.prefetch_disable="1"' >> /boot/loader.conf
echo 'console="ofw"' >> /boot/loader.conf
mv boot bootdir/
ln -s bootdir/boot /boot
chflags -h sunlink /boot
# Set fstab
echo '# Device                  Mountpoint      FStype  Options 
Dump    Pass#' > /etc/fstab
echo 
'/dev/da0a     /bootdir    ufs                     rw              0 
      0' >> /etc/fstab
echo 
'/dev/da0b     none                        swap            sw 
      0       0' > /etc/fstab
echo '/dev/cd0      /cdrom   cd9660  ro,noauto 0       0' >> /etc/fstab
passwd
tzsetup
cd /etc/mail
make aliases
# Exit chroot
exit
cd
umount /mnt/bootdir
zfs umount -a
zfs set mountpoint=legacy zroot
zfs set mountpoint=/tmp zroot/tmp
zfs set mountpoint=/var zroot/var
zfs set mountpoint=/usr zroot/usr
zfs set mountpoint=/data zroot/data


Any thoughts?  Thanks!

-- 
newell N5TNL




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