This website requires JavaScript.
Explore
Help
Sign In
Aren
/
NetBSD
Watch
1
Star
0
Fork
You've already forked NetBSD
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
9e6dbce9f9
NetBSD
/
distrib
/
common
/
mtree.zfsroot
6 lines
82 B
Plaintext
Raw
Normal View
History
Unescape
Escape
ramdisk-zfsroot: We no longer need to have /etc/zfs in mtree Now that mountall doesn't rely on /etc/zfs/zpool.cache being present.
2020-02-23 13:51:12 +03:00
# $NetBSD: mtree.zfsroot,v 1.3 2020/02/23 10:51:12 roy Exp $
zfs: build a ramdisk on amd64 with enough to mount rpool/ROOT on / Until we get ZFS integrated into our boot loader, this is the next best thing. The idea is simple - have a small FFS partition with a kernel, modules and this ramdisk. Once the ramdisk boots it will mount the FFS partition read only, copy the needed ZFS modules to the ramdisk and then unmount the partition. Then we import the ZFS root pool, mount the ZFS root filesystem and then pivot to it. Because the initial FFS partition is not mounted at this point, we can mount it in /altroot so we can replace the kernel and modules with newer ones so it's easily maintainable. This ZFS boot strapper currently makes the following assumptions: * The device NAME=boot is the FFS with kernel, modules and this ramdisk. * The ZFS root pool and root filesystem are called rpool/ROOT. A boot.cfg menu entry can then be added like so: menu=Boot ZFS root:fs /ramdisk-zfsroot.fs;boot
2020-02-22 12:53:47 +03:00
.
./altroot
./rpool