Solved RPi2B: root directory on HDD boots, but with SYSERR printed to console

ZYZQY

New Member


Messages: 1

#1
Hello, I haven't used FreeBSD since around 2003, but I'm pretty far into reading my way through the handbook! Please excuse the poor formatting and any obvious steps I may have missed.

I've installed FreeBSD-CURRENT-20151102 onto a Raspberry Pi 2B with the root FS on an external USB HDD and now I'm getting a few errors printed to console (see bottom) -- besides that, everything seems to work though.

Is there a "right" way to do this? I'd really like to fix whatever is causing that SYSERR.

Here's the steps I took which led up to the problem. Just fyi, everything is over serial console.

1. downloaded and verified FreeBSD*.xz. dd it to SD card. This will be the original SD card, as I'll burn a second SD card soon.

2. boot RPi from original SD card

3. plug USB HDD into the Pi, format it with GPT and create UFS and swap FS's on a partition table that looks like:

Code:
da0p1    freebsd-ufs    5G     /
da0p2    swap           2G     swap
da0p3    freebsd-ufs    5G     /var
da0p4    freebsd-ufs    5G     /tmp
da0p5    freebsd-ufs    10G    /usr
da0p6    freebsd-ufs    1.8T   /home
4. label the partitions with tunefs -L

5. shutdown the Pi

6. dd FreeBSD onto a second SD card, plug it into the Pi and boot it up so it can initialize the FS. I shutdown without logging in.

7. plug the original SD card into the Pi, boot it up and login. Then plug the second SD card (from step 6) into a USB adapter and mount it with mount -o ro /dev/da1 /mnt/1

8. Mount USB HDD partitions to /mnt/2/*:

mount /dev/ufs/root /mnt/2 && \
mkdir /mnt/2/{var,tmp,usr,home} && \
mount /dev/ufs/var /mnt/2/var && \
mount /dev/ufs/tmp /mnt/2/tmp && \
mount /dev/ufs/usr /mnt/2/usr && \
mount /dev/ufs/home /mnt/2/home


9. copy files from the second SD card mounted ro at /mnt/1 to their respective partitions mounted in /mnt/2 (a few named pipes won't copy, but let's continue anyway). Then edit /etc/fstab on USB HDD:

cp -R /mnt/1/* /mnt/2 && \
vi /mnt/2/etc/fstab ### Add /dev/ufs/* entries to point to USB HDD partitions


10. umount the second SD card and mount it rw. Copy the loader.conf file from /boot/defaults to /boot. Then edit it to look for root on da0p1:

umount /mnt/1 && \
mount /dev/da1 /mnt/1 && \
cp /mnt/1/boot/defaults/loader.conf /mnt/1/boot/ && \
echo 'vfs.root.mountfrom="ufs:da0p1"' >/mnt/1/boot/loader.conf && \
umount /mnt/1


11. unplug the original SD card. Then plug in the second SD card and boot with the USB HDD plugged in.

12. Boots up fine. mount reports /dev/ufs/{root,home,tmp,usr,var} mounted to /{.,home,tmp,usr,var}. Also, errors similar to the one below are printed to console:

Code:
root@rpi2: # Nov 3 06:11:00 rpi2 sendmail[1227]: NOQUEUE: SYSERR(operator): can not chdir(/var/spool/clientmqueue/): Permission denied
Any help or direction is appreciated.

###EDIT###
Clarified, Typos
Looks like the folders the partitions are mounted on don't have the right permissions because I created them myself. Be right back.

###EDIT 2###
Looks like it was a folder permissions error. I started over from the beginning, but used tar to snatch up everything from the SD card (preserving attributes) and moved the tarball over to HDD and extracted it. Fixed.
 
Last edited:
Top