Debian & Ubuntu: Rework dataset creation step
The major change for Ubuntu is to mark many of these as optional, like with Debian and the old guides. As I move away from zsys, this will end up being more like the old way. This was also discussed in #306 and #307, but this change has trade-offs. It can reduce the number of datasets created on the system, but it does so by increasing the complexity to read and follow the guide. Then I just harmonized Debian with Ubuntu. Aside from whitespace, reordering, rewording, the substantive changes were to drop /opt and add /var/lib/NetworkManager. Signed-off-by: Richard Laager <rlaager@wiktel.com>
This commit is contained in:
@@ -450,16 +450,13 @@ Step 3: System Installation
|
||||
The datasets below are optional, depending on your preferences and/or
|
||||
software choices.
|
||||
|
||||
If you wish to exclude these from snapshots::
|
||||
If you wish to separate these to exclude them from snapshots::
|
||||
|
||||
zfs create -o com.sun:auto-snapshot=false rpool/var/cache
|
||||
zfs create -o com.sun:auto-snapshot=false rpool/var/lib/nfs
|
||||
zfs create -o com.sun:auto-snapshot=false rpool/var/tmp
|
||||
chmod 1777 /mnt/var/tmp
|
||||
|
||||
If you use /opt on this system::
|
||||
|
||||
zfs create rpool/opt
|
||||
|
||||
If you use /srv on this system::
|
||||
|
||||
zfs create rpool/srv
|
||||
@@ -473,6 +470,16 @@ Step 3: System Installation
|
||||
|
||||
zfs create rpool/var/games
|
||||
|
||||
If this system will have a GUI::
|
||||
|
||||
zfs create rpool/var/lib/AccountsService
|
||||
zfs create rpool/var/lib/NetworkManager
|
||||
|
||||
If this system will use Docker (which manages its own datasets &
|
||||
snapshots)::
|
||||
|
||||
zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker
|
||||
|
||||
If this system will store local email in /var/mail::
|
||||
|
||||
zfs create rpool/var/mail
|
||||
@@ -485,25 +492,6 @@ Step 3: System Installation
|
||||
|
||||
zfs create rpool/var/www
|
||||
|
||||
If this system will use GNOME::
|
||||
|
||||
zfs create rpool/var/lib/AccountsService
|
||||
|
||||
If this system will use Docker (which manages its own datasets &
|
||||
snapshots)::
|
||||
|
||||
zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker
|
||||
|
||||
If this system will use NFS (locking)::
|
||||
|
||||
zfs create -o com.sun:auto-snapshot=false rpool/var/lib/nfs
|
||||
|
||||
Mount a tmpfs at /run::
|
||||
|
||||
mkdir /mnt/run
|
||||
mount -t tmpfs tmpfs /mnt/run
|
||||
mkdir /mnt/run/lock
|
||||
|
||||
A tmpfs is recommended later, but if you want a separate dataset for
|
||||
``/tmp``::
|
||||
|
||||
@@ -521,6 +509,12 @@ Step 3: System Installation
|
||||
to limit the maximum space used. Otherwise, you can use a tmpfs (RAM
|
||||
filesystem) later.
|
||||
|
||||
#. Mount a tmpfs at /run::
|
||||
|
||||
mkdir /mnt/run
|
||||
mount -t tmpfs tmpfs /mnt/run
|
||||
mkdir /mnt/run/lock
|
||||
|
||||
#. Install the minimal system::
|
||||
|
||||
debootstrap bullseye /mnt
|
||||
|
||||
@@ -486,32 +486,77 @@ Step 3: System Installation
|
||||
|
||||
#. Create datasets::
|
||||
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no \
|
||||
rpool/ROOT/ubuntu_$UUID/srv
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \
|
||||
rpool/ROOT/ubuntu_$UUID/usr
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/usr/local
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \
|
||||
rpool/ROOT/ubuntu_$UUID/var
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/games
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/log
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/mail
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/snap
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/spool
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/www
|
||||
|
||||
zfs create -o canmount=off -o mountpoint=/ \
|
||||
rpool/USERDATA
|
||||
zfs create -o com.ubuntu.zsys:bootfs-datasets=rpool/ROOT/ubuntu_$UUID \
|
||||
-o canmount=on -o mountpoint=/root \
|
||||
rpool/USERDATA/root_$UUID
|
||||
chmod 700 /mnt/root
|
||||
|
||||
If you want a separate dataset for ``/tmp``::
|
||||
The datasets below are optional, depending on your preferences and/or
|
||||
software choices.
|
||||
|
||||
If you wish to separate these to exclude them from snapshots::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/cache
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/nfs
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/tmp
|
||||
chmod 1777 /mnt/var/tmp
|
||||
|
||||
If desired (the Ubuntu installer creates these)::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg
|
||||
|
||||
If you use /srv on this system::
|
||||
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no \
|
||||
rpool/ROOT/ubuntu_$UUID/srv
|
||||
|
||||
If you use /usr/local on this system::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/usr/local
|
||||
|
||||
If this system will have games installed::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/games
|
||||
|
||||
If this system will have a GUI::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager
|
||||
|
||||
If this system will use Docker (which manages its own datasets &
|
||||
snapshots)::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/docker
|
||||
|
||||
If this system will store local email in /var/mail::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/mail
|
||||
|
||||
If this system will use Snap packages::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/snap
|
||||
|
||||
If you use /var/www on this system::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/www
|
||||
|
||||
For a mirror or raidz topology, create a dataset for ``/boot/grub``::
|
||||
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no bpool/grub
|
||||
|
||||
A tmpfs is recommended later, but if you want a separate dataset for
|
||||
``/tmp``::
|
||||
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no \
|
||||
rpool/ROOT/ubuntu_$UUID/tmp
|
||||
|
||||
@@ -480,24 +480,13 @@ Step 3: System Installation
|
||||
|
||||
#. Create datasets::
|
||||
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no \
|
||||
rpool/ROOT/ubuntu_$UUID/srv
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \
|
||||
rpool/ROOT/ubuntu_$UUID/usr
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/usr/local
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no -o canmount=off \
|
||||
rpool/ROOT/ubuntu_$UUID/var
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/games
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/log
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/mail
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/snap
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/spool
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/www
|
||||
|
||||
zfs create -o canmount=off -o mountpoint=/ \
|
||||
rpool/USERDATA
|
||||
@@ -506,16 +495,60 @@ Step 3: System Installation
|
||||
rpool/USERDATA/root_$UUID
|
||||
chmod 700 /mnt/root
|
||||
|
||||
The datasets below are optional, depending on your preferences and/or
|
||||
software choices.
|
||||
|
||||
If you wish to separate these to exclude them from snapshots::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/cache
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/nfs
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/tmp
|
||||
chmod 1777 /mnt/var/tmp
|
||||
|
||||
If desired (the Ubuntu installer creates these)::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/apt
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/dpkg
|
||||
|
||||
If you use /srv on this system::
|
||||
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no \
|
||||
rpool/ROOT/ubuntu_$UUID/srv
|
||||
|
||||
If you use /usr/local on this system::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/usr/local
|
||||
|
||||
If this system will have games installed::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/games
|
||||
|
||||
If this system will have a GUI::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/AccountsService
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/NetworkManager
|
||||
|
||||
If this system will use Docker (which manages its own datasets &
|
||||
snapshots)::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/lib/docker
|
||||
|
||||
If this system will store local email in /var/mail::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/mail
|
||||
|
||||
If this system will use Snap packages::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/snap
|
||||
|
||||
If you use /var/www on this system::
|
||||
|
||||
zfs create rpool/ROOT/ubuntu_$UUID/var/www
|
||||
|
||||
For a mirror or raidz topology, create a dataset for ``/boot/grub``::
|
||||
|
||||
zfs create -o com.ubuntu.zsys:bootfs=no bpool/grub
|
||||
|
||||
Mount a tmpfs at /run::
|
||||
|
||||
mkdir /mnt/run
|
||||
mount -t tmpfs tmpfs /mnt/run
|
||||
mkdir /mnt/run/lock
|
||||
|
||||
A tmpfs is recommended later, but if you want a separate dataset for
|
||||
``/tmp``::
|
||||
|
||||
@@ -534,6 +567,12 @@ Step 3: System Installation
|
||||
to limit the maximum space used. Otherwise, you can use a tmpfs (RAM
|
||||
filesystem) later.
|
||||
|
||||
#. Mount a tmpfs at /run::
|
||||
|
||||
mkdir /mnt/run
|
||||
mount -t tmpfs tmpfs /mnt/run
|
||||
mkdir /mnt/run/lock
|
||||
|
||||
#. Install the minimal system::
|
||||
|
||||
debootstrap jammy /mnt
|
||||
|
||||
Reference in New Issue
Block a user