Date: Tue, 24 Jul 2018 11:33:52 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: John Kennedy <warlock@phouka.net>, freebsd-fs@freebsd.org Subject: Re: CRC32Mounting from zfs:zroot/ROOT/default failed with error 2 Message-ID: <3596ef16-da50-b26c-b7fd-724ca020cba2@FreeBSD.org> In-Reply-To: <20180724012745.GB75644@phouka1.phouka.net> References: <20180724012745.GB75644@phouka1.phouka.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24/07/2018 04:27, John Kennedy wrote: > I'm trying to get my RPI3B+ to boot up with a ZFS root. I've seeded the OS > with FreeBSD-12.0-CURRENT-arm64-aarch64-RPI3-20180719-r336479.img (and it's > predecessors 20180709-r336134 and 20180618-r335317). > > I've more or less copied the EFI/U-Boot partition over as-is, and that part > seems fine. The EFI loader iterates through my partitions, finds the ZFS root > (zfs:zroot/ROOT/default), clearly reads the /boot/defaults/loader.conf and > downloads the kernel, umodem.ko and zfs.ko so it's obviously able get the data > off of there. > > [/boot/loader.conf] > hw.usb.template=3 > umodem_load="YES" > > zfs_load="YES" > > The kernel boots. That parts looks relatively normal except for this message > during the boot: > > ... Instruction Set Attributes 0 = <Trying to mount root from zfs:zroot/ROOT/default []... > CRC32Mounting from zfs:zroot/ROOT/default failed with error 2> > : unknown file system. > ... > > (It's possible that the error is landing in the middle of the rest of the info > dump that after the CPU 0 processor feature dump.) > > It eventually fails and gives me a mountroot> prompt. It prints out a good- > looking vfs.root.mountfrom (=zfs:zroot/ROOT/default) variable. > > Trying devices like zfs:zoort (wrong) and zfs:zroot/ROOT/default (should be Ok) > results in this, much like the kernel startup error: > > Mounting from zfs:zroot/ROOT/default failed with error 2: unknown file system This seems like possibly the same problem as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229972 That bug report also describes getting error 2 (ENOENT). Your report adds an additional detail, "unknown file system". That means that vfs_byname() cannot find "zfs" filesystem type. As-if zfs module was not loaded. I wonder if there can be any conflict / confusion between the module declared via VFS_SET(zfs_vfsops, zfs, VFCF_JAIL | VFCF_DELEGADMIN); in zfs_vfsops.c and the module declared via DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); in zfs_ioctl.c. Both define an object named 'zfs_mod' but the objects are static so should not conflict. But there can be quirks in the toolchain (linker) or in the kernel loader. Also, there have been some relatively recent changes related to VFS_SET and DECLARE_MODULE. But the problem is very strange. > At the mountroot prompt, I don't see the ZFS partition directly (but mmcsd0s2a > is shown). At the loader prompt, lsdev lists zfs:zroot as a zfs device, and > "lszfs zroot" shows ROOT (+$MOS, $FREE & $ORIGIN), "lszfs zroot/ROOT" shows > default, but I can't get below that. "ls" and "ls /boot" show what you'd > expect to see off of the root filetree from zroot/ROOT/default. > > I literally made the image by creating a UFS version to build the ZFS version, > same kernel, so you'd think there wouldn't be any incompatibilities. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3596ef16-da50-b26c-b7fd-724ca020cba2>