Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| zfsonroot [2007/04/25 21:38] – Link to ZFS AndrewThompson | zfsonroot [2021/05/04 10:51] (current) – Fix 3 broken links. SashaVigole | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| You have an ad0 disk. Create one slice covering the entire disk: | You have an ad0 disk. Create one slice covering the entire disk: | ||
| - | < | + | '' |
| - | # fdisk -BI /dev/ad0 | + | |
| - | </ | + | |
| Initialize the BSDlabel: | Initialize the BSDlabel: | ||
| - | < | + | '' |
| - | # bsdlabel -wB /dev/ad0s1 | + | |
| - | </ | + | |
| Edit your label and create a small (like 256MB-512MB) ' | Edit your label and create a small (like 256MB-512MB) ' | ||
| use the rest for the ' | use the rest for the ' | ||
| - | < | + | '' |
| - | # bsdlabel -e /dev/ad0s1 | + | |
| - | </ | + | |
| - | The 'd' partition | + | Something like this will create 512MB 'a' partition |
| - | < | + | '' |
| - | # zpool create tank ad0s1d | + | '' |
| - | </code> | + | '' |
| + | '' | ||
| + | '' | ||
| + | '' | ||
| + | |||
| + | The ' | ||
| + | |||
| + | '' | ||
| + | |||
| + | Create bootdir directory where the boot file system will be mounted: | ||
| + | |||
| + | '' | ||
| + | '' | ||
| Create a UFS file system on /dev/ad0s1a and copy the /boot/ directory onto it: | Create a UFS file system on /dev/ad0s1a and copy the /boot/ directory onto it: | ||
| - | < | + | '' |
| - | # newfs / | + | '' |
| - | # mount /dev/ad0s1a /mnt/tmp | + | '' |
| - | # cp -Rp /boot/* /mnt/tmp/ | + | |
| - | </code> | + | |
| - | Note that there is no / | + | If the boot filesystem |
| - | two possibilities. You now need to create a symlink: | + | |
| - | < | + | Now don't forget to add zfs_load=" |
| - | # cd /mnt/tmp | + | |
| - | # ln -s . boot | + | |
| - | </code> | + | |
| - | From what I checked our loader | + | Ok, you also need to tell your loader |
| - | This will allow us to mount /dev/ad0s1a on /boot directory and use it as | + | You can do it by adding: |
| - | usual. | + | |
| - | Another option is to: | + | '' |
| - | < | + | to /tank/boot/loader.conf or you can create |
| - | # cp -Rp /boot /mnt/tmp/ | + | with one entry only: |
| - | </code> | + | |
| - | and in the future mount /dev/ad0s1a on eg. /bootdisk and create symlink: | + | '' |
| - | < | + | On your [[ZFS]] file system, your /etc/fstab (/tank/ |
| - | # ln -s bootdisk/boot /boot | + | |
| - | </code> | + | |
| - | All in all, you should see your kernel when you do: | + | '' |
| - | < | + | (and everything else, ie. your swap and other file systems) |
| - | # ls -l / | + | |
| - | </ | + | |
| - | Now don' | + | At the end, set mount point to ' |
| - | Ok, you also need to tell your loader where your root file system is. | + | '' |
| - | You can do it by adding: | + | |
| - | < | + | ==== troubleshooting ==== |
| - | vfs.root.mountfrom=" | + | * Ensure / |
| - | </ | + | * Set '' |
| - | to /mnt/tmp/boot/loader.conf or you can create / | + | ==== Alternate way with GPT and full zfs (no UFS /boot) for 8.0-RELEASE ==== |
| - | with one entry only: | + | |
| - | < | + | %%FreeBSD%% 8.0 and later have support for a full zfs-based system (i.e. without using an UFS /boot), so we can use the GPT partitioning scheme along with /boot/gptzfsboot. See lulf blog's entry: |
| - | tank / | + | |
| - | </code> | + | |
| - | On your [" | + | [[https://web.archive.org/ |
| - | and: | + | |
| - | < | + | or |
| - | / | + | |
| - | </ | + | |
| - | (and everything else, ie. your swap and other file systems) | + | [[https:// |
| + | |||
| + | ==== Automated installation with GPT and full zfs for 8.0-RELEASE ==== | ||
| + | |||
| + | You may try the mfsbsd SE amd64 ISO image with the " | ||
| + | |||
| + | ==== Automated install with GPT and Full ZFS with PXE ==== | ||
| + | |||
| + | PXE: [[https:// | ||
| + | |||
| + | Install: [[https:// | ||
| - | At the end, set mount point to ' | + | ---- |
| - | < | + | {{tag>Zfs}} |
| - | # zfs set mountpoint=legacy tank | + | |
| - | </code> | + | |