[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 Steven, thanks for the reply.  What CD/DVD image are you using to install kfreebsd?  Using the July 12 netinstall mini.iso, I can't get a working/booting install with Expert mode and Testing(wheezy) or even Stable - even by going with the defaults (UFS all the way, default partitioning.)  It always fails on grub. This should be easily reproducible with Vmware player.  (I can send you my .vmx file if it will help.)

I believe the kfreebsd installer needs quite a bit of work; for one thing, the " Configure ZFS " menu isn't really all that intuitive; and you can't change the sizes of partitions on the fly.  Maybe it's borking because the vdisk was previously formatted with zfs, I'm not sure.  I know PCBSD actually writes zeros to parts of the drive when (re)partitioning and formatting.  The current installer loses its mind if I initially go with ZFS, and then change my mind and try to use UFS - even after entirely deleting the zfs pool.

Error messages on alt+f4 indicate that /proc can't be mounted in target, but it's not really verbose.  I can go thru each and every install step if it will help.

The installer should not allow a non-working partition setup to be created.  Sorry if I sound bitter; I've tried various permutations of this install at least 10 times, and it's very frustrating trying to find a work around for a glaring bug like this.

I've tried making /boot (UFS, partition 1) and swap (p2) outside the ZFS partition (p3); grub still errors out.  I tried UFS all the way, intending to move /usr to a separate ZFS vdisk after booting, but the installer still bombs on Grub.  I've tried both msdos and GPT partition tables.  I've tried installing grub2 to the MBR, /dev/da0s1, (hd0), nothing works.  With no LILO/equivalent or even the default "dumb" Freebsd bootloader available, the VM is effectively brain-dead, even if I finish the install w/o GRUB.

Even Super Grub Disk (beta version) won't detect the kernel; altho I think I used GPT partitions this last time.

I'll try it again, using msdos partition setup and default partitioning, and let you know what happens.

And again, if there's anything more that I can do to help, please let me know.  I have a few suggestions/recommendations, and would be happy to work directly with whoever maintains the code for the installer and GRUB (although I'm not much of a coder, outside of Bash.)


---- Replying to message:

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

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium



Reply to: