Date: Sat, 16 Jan 2010 01:30:12 -0800 From: Xin LI <delphij@gmail.com> To: Volodymyr Kostyrko <c.kworr@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: AHCI and ZFS: root mount error Message-ID: <a78074951001160130i180a3b3rbb053153eb4f9238@mail.gmail.com> In-Reply-To: <20100116015529.2fb2ca91@limbo.lan> References: <7ab0356e1001151213y5536d4cdi1d1759ce28ad546a@mail.gmail.com> <20100116015529.2fb2ca91@limbo.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 15, 2010 at 3:55 PM, Volodymyr Kostyrko <c.kworr@gmail.com> wrote: > On Fri, 15 Jan 2010 21:13:39 +0100 > Romain Garbage <romain.garbage@gmail.com> wrote: > >> After setting ahci_load="YES" in /boot/loader.conf, I get a root mount error. >> ahci seems to attach to disk correctly (I get ada0 messages with no error) >> >> Without ahci_load="YES", system boots fine, with ata module attaching to disk. >> >> I have a full zfs system, set up following wiki instructions: >> http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition >> (MBR scheme, ZFS in a FreeBSD slice, together with a swap partition) >> >> I'm using a GENERIC kernel, RELENG_8 branch. > > I have faced some problems that looks exactly like you say. I haven't investigated thoroughly after some quick-hack-repairs machine runs flawlessly. > > 1. I have moved to RELENG_8 from RELENG_8_0. I don't think this is it but zfsloader support was what I was looking for. > > 2. I reinitialised zfs partitions again with a boot code. But this time I used bs=512 dd option. > > 3. I recreated zpool.cache and replaced it on my pool. I believe the step 3 has fixed your issue. I believe that the zfs loader on -HEAD is less prone to this type of problems, but I am not entirely sure if it would be helpful for all-disk-name-changed case, though. So, in conclusion, in order to fix the problem, one need: Boot into an environment where you can mount ZFS partition. With a LiveFS boot, one can do this: 0) during boot, load zfs, tmpfs 1) mount a tmpfs on /boot/zfs 2) zpool import -f -R /mnt yourpool 3) set hostid to the one in your zpool, perhaps chroot into the zpool and do hostid start 4) export and re-import zpool 5) overwrite /pool/boot/zfs with /boot/zfs 6) make sure the zfs has been written down to disk 7) reboot (Steps 3-4 may be skipped in theory but I personally recommend one to do that). Cheers, -- Xin LI <delphij@delphij.net> http://www.delphij.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a78074951001160130i180a3b3rbb053153eb4f9238>