[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 Dave,

[I see you got this installed now, but since I already wrote all this
I'll send it anyway for future reference/whatever]

On 26/07/12 22:08, Dave Bechtel wrote:
> What CD/DVD image are you using to install kfreebsd?

An installer image that I've successfully used a few times is the alpha1
netinst ISO which is currently available under the netinst heading from:


It it bigger than mini.iso as it has packages for the base and rescue
systems, which is definitely worth it in case you hit a problem like
this and have to run the installer again.

I always perform a minimal install, then make sure it's bootable, and
install whatever else I want by running tasksel/apt-get on the installed
system afterwards.

> 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. 

It is quite new, and I imagine it involved a lot of work to integrate it
into the Debian installer, so we're probably lucky to have anything at
all for configuring ZFS at the moment.

Adjusting the partition sizes I think is a limitation of the Debian
installer and not specific to GNU/kFreeBSD.

> The installer should not allow a non-working partition setup to be created.

The same applies there;  I think it already warns about some stuff, like
not creating a swap partition, but it should probably also warn about
leaving GRUB2 embedding space.

> Maybe it's borking because the vdisk was previously formatted with zfs, I'm not sure.

If you choose ufs partition type, it should erase any existing ZFS/UFS
signature, as per:  http://bugs.debian.org/635272

But if you try to create a ZFS pool using drives that belonged to an
older pool, I guess that might fail.  But you wouldn't get as far as the
Install GRUB step if that was the problem.

> 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.

This is all useful info, thanks.  Wasn't sure if it was just ZFS as
root/boot that triggered this bug, but I guess it isn't.

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

I've used the netinst install CD as a rescue disk to recover systems
that I accidentally made unbootable.  It's not well documented, but you
can enter sort of a rescue mode explained at:


The installer menu will be different.  I don't think the 'Enter rescue
mode' step really works yet, but if you go through the preceding steps
you can go into the shell and manually recover your system.

`zpool import` scans disks for ZFS pools and should give you their names

`zpool import -R /mnt <poolname>` should be able to mount a pool's
filesystem[s] under /mnt

`chroot /mnt /bin/bash` then gives you a shell, but you should probably
also do:

`mount -t linprocfs linprocfs /proc` to get a working /proc filesystem

`update-grub2` should then be able to [re]write the GRUB2 bootloader if
that's what's missing.

You must `exit` from the chroot first if you want to run `reboot`.

Steven Chamberlain

Reply to: