Extending zfsboot.c to allow selecting filesystem from boot.config

Florian Wagner florian at wagner-flo.net
Sat Nov 19 20:19:25 UTC 2011


> on 19/10/2011 19:21 Florian Wagner said the following:
> >> [...]
> >> 
> >>> The only thing I was a bit confused by is that on the boot prompt
> >>> only the pool and filename to be booted are printed.
> >> 
> >> Do you mean the (gpt)zfsboot prompt?
> > 
> > Yes. For a boot.config with "rpool:root/something:" it prints:
> > 
> > Booting from Hard Disk... /boot.config: rpool FreeBSD/x86 boot
> > Default: rpool:/boot/zfsloader boot: <CURSOR>
> 
> 
> Thank you very much for your testing and reports!
> Please see these additional changes:
> http://people.freebsd.org/~avg/zfsboot.fixes.diff

Thanks for the additional patch. It seems to be exactly what I'm
looking for.

Sadly your patches (tested with and without the latest one) seem to
break booting on RAID-Z2 arrays. The prior test, for which I've reported
success were using a VM with only a single disk. Today I tried the
patched bootloader on my fileserver with a 6 disk RAID-Z2 array. That
didn't go so well:

Installing the modified gptzfsboot results in a blinking screen with
turquoise-striped ASCII background and assorted characters in the
foreground.

Installing the modified zfsloader (but unmodified gptzfsboot) makes it
unable to find its root dataset:

  BTX loader 1.00  BTX version is 1.02
  [...]
  BIOS drive C: is disk0
  BIOS drive D: is disk1
  [...]

  FreeBSD/x86 ZFS enabled bootstrap loader, Revision 1.0
  [...]
  ZFS: can't find dataset [LONG NUMBER]
  ZFS: can't map root filesystem to its name

  can't load 'kernel'

  Type '?' [...]
  OK lsdev
  cd devices:
  disk devices:
      disk0:   BIOS drive C:
        disk0p1: FreeBSD boot
        disk0p2: FreeBSD ZFS
        disk0p3: FreeBSD ZFS
      disk1:   BIOS drive D:
        disk1p1: FreeBSD boot
        disk1p2: FreeBSD ZFS
        disk1p3: FreeBSD ZFS
  pxe devices:
  zfs devices:
      zfs:root
  OK

The output is from my test VM, where I've reproduced the problem. Setup
is:

 - RAID-Z2 over the four partitions disk{0,1}p{2,3}.
 - Pool is simply called root.
 - root has bootfs property set to root/stable-8-r226381.
 - There is no boot.config on that dataset.

A zfsloader built without your patches boots the system.

Any more information I can provide?


Regards
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20111119/3911c77d/signature.pgp


More information about the freebsd-fs mailing list