Date: Mon, 9 Apr 2007 11:43:19 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: freebsd-current@FreeBSD.org Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS: amd64, devd, root file system. Message-ID: <20070409094319.GB76673@garage.freebsd.pl> In-Reply-To: <20070409011723.GB74547@garage.freebsd.pl> References: <20070409011723.GB74547@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
--UHN/qo2QbUvPLonB Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 09, 2007 at 03:17:23AM +0200, Pawel Jakub Dawidek wrote: > 3. It is now possible to have root file system on ZFS. You would still > need UFS for your /boot/ file system. Let me explain how this suppose to work. You have ad0 disk. Create one slice covering entire disk: # fdisk -BI /dev/ad0 Initialize BSDlabel: # bsdlabel -wB /dev/ad0s1 Edit your label and create small (like 256MB-512MB) 'a' partition and use the rest for 'd' partition: # bsdlabel -e /dev/ad0s1 'd' partition will be used for ZFS: # zpool create tank ad0s1d Create UFS file system on /dev/ad0s1a and copy /boot/ directory in there: # newfs /dev/ad0s1a # mount /dev/ad0s1a /mnt/tmp # cp -Rp /boot/* /mnt/tmp/ Note that there is no /boot/ directory on ad0s1a yet. This is one of the two possibilities. You now need to create symlink: # cd /mnt/tmp # ln -s . boot =46rom what I checked our loader should handle symlinks just fine. This will allow us to mount /dev/ad0s1a on /boot directory and use it as usual. Another option is to: # cp -Rp /boot /mnt/tmp/ and in the future mount /dev/ad0s1a on eg. /bootdisk and create symlink: # ln -s bootdisk/boot /boot All in all, you should see your kernel when you do: # ls -l /mnt/tmp/boot/kernel Now don't forget to add zfs_load=3D"YES" to /mnt/tmp/boot/loader.conf. Ok, you also need to tell your loader where your root file system is. You can do it by adding: vfs.root.mountfrom=3D"zfs:tank" to /mnt/tmp/boot/loader.conf or you can create /mnt/tmp/etc/fstab file with one entry only: tank / zfs rw 0 0 On your ZFS file system, your /etc/fstab should contains the line above and: /dev/ad0s1a /boot ufs rw 0 0 (and everything else, ie. your swap and other file systems) --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --UHN/qo2QbUvPLonB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGGgq3ForvXbEpPzQRAmlbAKDspksBGqObSZy1iCUqWDfGIkwGZwCgkrsV RsDmcIlojnNaF2KCDzFTesA= =+ZEQ -----END PGP SIGNATURE----- --UHN/qo2QbUvPLonB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070409094319.GB76673>