How to upgrade kernel with gmirror boot?

Chris Shenton chris at shenton.org
Sat Sep 26 19:22:46 UTC 2009


I've got a couple FreeBSD 7.0 systems which I am trying to upgrade. I
had used ZFS for everything except the boot where I had used a gmirror.
I didn't really understand it all then, but it's been working fine.

The problem is that now with I "make buildworld" and "make
installkernel" I get the old original kernel, not the new one.  I
suspect it's because I'm not installing the kernel in the boot partition
that's actually being used, but am out of my depth here and need some
advice.

Here's how I created the gmirror and installed onto it back then, per my
notes. I had 2x 1TB drives and wanted to use a gmirror for the boot and
ZFS for the rest:

Did a minimal install onto a 1GB ad4s1a.
fdisk -BI ad6
bslabel ad4s1 > /tmp/label
bsdlabel -RB ad6s1 /tmp/label
gmirror label boot ad6s1a
newfs /dev/mirror/boot
mount /dev/mirror/boot /mnt
find -x / | cpio -pmd /mnt
rm -rf /mnt/var/* /mnt/usr/* /mnt/tmp/*
reboot
gmirror insert boot ad4s1a

Rebooting I believe is now booting from the gmirror comprised of ad4s1a
and ad6s1a:

$ df -h / /boot
Filesystem                   Size    Used   Avail Capacity  Mounted on
/dev/mirror/boot             989M    634M    276M    70%    /
/dev/mirror/boot             989M    634M    276M    70%    /

After "make installkernel" my /boot/GENERIC is still from 2008, when I
did the original installation.  My /boot/kernel is new, from the
installkernel.

What am I missing? It seems I am not "installkernel"-ing to the right place
where the boot loader is looking. 

Thanks.

PS: Current "gmirror list" output:

$ gmirror list
Geom name: boot
State: COMPLETE
Components: 1
Balance: split
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 2728037890
Providers:
1. Name: mirror/boot
   Mediasize: 1073741312 (1.0G)
   Sectorsize: 512
   Mode: r1w1e1
Consumers:
1. Name: ad6s1a
   Mediasize: 1073741824 (1.0G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 2864447916


More information about the freebsd-stable mailing list