[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: installing with root on ZFS (was: So, who's in charge of Kfreebsd? The installer is broken)



Hi,

On 25/07/12 17:19, Dave Bechtel wrote:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613430

To be honest, I've never seen that bug report before.  Unfortunately it
wasn't tagged kfreebsd or Cc'd to this list, so it wasn't really on my
radar.

And without more info like an installer log it would be impossible to
know now what that issue was or if it got fixed already.

That said, I've successfully installed each of those combinations of
UFS/ZFS in recent weeks and got a working GRUB2 bootloader without too
much trouble.

I guess what you're seeing is a new/different problem with the same end
result.


Just a few hints first, some things to consider:

On 25/07/12 17:19, Dave Bechtel wrote:
> ... I require root "/" to be ZFS [...]

ZFS as root filesystem should be fine.

If you did any manual partitioning beforehand, it is important that you
left a gap of up to 1 MiB before the start of the first partition -- if
you create your partitions afresh within the installer it should get
this right.  There must be space there for GRUB2 to install itself and
modules.

Also you have a choice -- to keep /boot inside your ZFS root pool, or
mounted from a separate partition.

An msdos partition table with a ufs partition for /boot is a sensible
choice as it is widely understood and easy to fix if your system becomes
unbootable.

Or if you decide to keep /boot in the root ZFS pool, that's okay too.
But there may be limitations to GRUB2's ZFS support.  I doubt it
supports RAID-Z, but mirrored vdevs are okay;  compression works, but
probably only if you use the default algorithm;  dedup doesn't seem to
be a problem.

A more complex choice might be to have a simple mirrored ZFS pool just
for root and/or boot, and a separate ZFS pool if you want to use RAID-Z.

While here, I recommend at least a small dedicated swap partition unless
you have >= 4 GiB RAM.  You *can* use a local ZFS zvol as swap space but
I don't recommend that as it appears to be unstable.

GRUB2 should be installed to the drive MBR (e.g. /dev/da0) and not into
a ZFS partition.  I think it only asks this in the Expert install mode,
and will stop you if try to install GRUB2 to a ZFS partition by mistake.


Back to your original problem...

If you can Alt-F2 or drop to a shell during the installer, take a look
at /var/log/syslog to find the actual error message from GRUB2.  Or you
could try to manually install it after you hit the error -- I think this
is right:

# chroot /target /bin/bash
# update-grub2

You may then get some kind of error message or clue as to what the
problem is.

I suspect you're seeing one of two possible glitches:

1. outside of the chroot, you should see in /target/boot/zfs/ a
zpool.cache file.  If not, that is probably a bug, and you could try `cp
-ai /boot/zfs/zpool.cache /target/boot/zfs/` and retry the above.

2. I think I've seen a glitch before where linprocfs is not mounted at
the GRUB2 install step.  It results in a failure of grub-probe and then
trying to load non-existent module 'unknown.ko'.  You could see if this
helps:

# chroot /target /bin/bash
# mount -t linprocfs linprocfs /proc
# update-grub2

If you do manage to install GRUB2 that way, log out of that shell,
return to the installer menu on Alt-F1 and make sure to complete all the
install steps.

And of course please reply back here to let us know what the problem
turned out to be.  I'd like to gather enough info to make for a useful
bug report and see that it gets fixed in time for the Wheezy release.

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org


Reply to: