Re: Everything (but /boot) on ZFS - trouble

From: Craig Boston <craig_at_xfoil.gank.org>
Date: Thu, 5 Jul 2007 14:49:39 -0500
On Thu, Jul 05, 2007 at 08:18:15PM +0200, Thomas Backman wrote:
> The instructions are quite incomplete, though, and the page doesn't
> say if doing this even should work.

I've got several systems that are set up this way.  I didn't follow the
instructions exactly because I was starting from scratch, but I did use
them as a base.

It's almost easier if you have a good livecd, the hard part is making
sure that that a working zpool.cache file ends up on your boot partition
(it would be nice if there was a way to populate it manually somehow).

> Anyway. Could someone lay out some simple steps? I've tried creating
> the new 'a' partition, copying /boot and create a symlink, so far so  
> good.

> Except when I reboot the loader complains about it (I'm guessing because
> /boot is a symlink to another partition that it doesn't know about?).

Where did you create the symlink?  It should be in your ZFS root
partition, which the loader shouldn't know anything about.  Basically
what you want to have is ad0s1a with a UFS filesystem that has nothing
but a directory called boot on it.  It should look something like this:

/boot/
	loader*
	kernel/*
	zfs/zpool.cache
	(other files that belong in boot)

and maybe an /etc/fstab, but I usually just go the route of setting
vfs.root.mountfrom in loader.conf.

What was the complaint from loader exactly?  If you have your boot
partition set up correctly, the kernel should at least be loaded and
start (even if it can't mount the root filesystem for some reason).

Since you're using a VM, it may be easier to create a new virtual disk
to use as your boot disk, set it up as such, then swap it out and remove
the original.

> Also, I don't know how to get my stuff over to ZFS - singleuser and  
> cp -Rp?

I tend to end up using

tar -cf - . | tar -C /destination -xf -

to preserve hard links (important so /rescue doesn't end up huge), but
others prefer cpio.  Since your source is a UFS partition, dump/restore
may also be a good option.

Hope this helps,
Craig
Received on Thu Jul 05 2007 - 17:49:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC