Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addresses comment in ne9z/openzfs-docs/pull/1 #456

Merged
merged 1 commit into from Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions docs/Getting Started/Alpine Linux/Root on ZFS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Preparation
#. Disable Secure Boot. ZFS modules can not be loaded if Secure Boot is enabled.
#. Download latest extended variant of `Alpine Linux
live image
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso.asc>`__
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso.asc>`__
and boot from it.

.. code-block:: sh
Expand All @@ -48,8 +48,8 @@ Preparation

# check whether the download page exists
# alpine version must be in sync with ci/cd test chroot tarball
curl --head --fail https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso
curl --head --fail https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso.asc
curl --head --fail https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso
curl --head --fail https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso.asc

#. Login as root user. There is no password.
#. Configure Internet
Expand Down Expand Up @@ -199,9 +199,7 @@ System Installation

#. Partition the disks.

Note: you must clear all existing partition tables and data structures from the disks,
especially those with existing ZFS pools or mdraid and those that have been used as live media.
Those data structures may interfere with boot process.
Note: you must clear all existing partition tables and data structures from target disks.

For flash-based storage, this can be done by the blkdiscard command below:
::
Expand Down
12 changes: 5 additions & 7 deletions docs/Getting Started/Arch Linux/Root on ZFS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Preparation

Download latest extended variant of `Alpine Linux
live image
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso.asc>`__
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso.asc>`__
and boot from it.

.. code-block:: sh
Expand Down Expand Up @@ -196,9 +196,7 @@ System Installation

#. Partition the disks.

Note: you must clear all existing partition tables and data structures from the disks,
especially those with existing ZFS pools or mdraid and those that have been used as live media.
Those data structures may interfere with boot process.
Note: you must clear all existing partition tables and data structures from target disks.

For flash-based storage, this can be done by the blkdiscard command below:
::
Expand Down Expand Up @@ -395,10 +393,10 @@ System Configuration
apk add curl

curl --fail-early --fail -L \
https://america.archive.pkgbuild.com/iso/2023.05.03/archlinux-bootstrap-x86_64.tar.gz \
https://america.archive.pkgbuild.com/iso/2023.09.01/archlinux-bootstrap-x86_64.tar.gz \
-o rootfs.tar.gz
curl --fail-early --fail -L \
https://america.archive.pkgbuild.com/iso/2023.05.03/archlinux-bootstrap-x86_64.tar.gz.sig \
https://america.archive.pkgbuild.com/iso/2023.09.01/archlinux-bootstrap-x86_64.tar.gz.sig \
-o rootfs.tar.gz.sig

apk add gnupg
Expand Down
21 changes: 15 additions & 6 deletions docs/Getting Started/Fedora/Root on ZFS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Preparation

Download latest extended variant of `Alpine Linux
live image
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso.asc>`__
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso.asc>`__
and boot from it.

.. code-block:: sh
Expand Down Expand Up @@ -200,9 +200,7 @@ System Installation

#. Partition the disks.

Note: you must clear all existing partition tables and data structures from the disks,
especially those with existing ZFS pools or mdraid and those that have been used as live media.
Those data structures may interfere with boot process.
Note: you must clear all existing partition tables and data structures from target disks.

For flash-based storage, this can be done by the blkdiscard command below:
::
Expand Down Expand Up @@ -582,12 +580,13 @@ System Configuration
::

rm -f /etc/localtime
rm -f /etc/hostname
systemd-firstboot \
--force \
--locale=en_US.UTF-8 \
--timezone=Etc/UTC \
--hostname=testhost \
--keymap=us
--keymap=us || true

#. Set root passwd
::
Expand Down Expand Up @@ -719,6 +718,16 @@ Bootloader
# chroot ends here
ZFS_ROOT_GUIDE_TEST

#. On first reboot, SELinux policies will be applied, albeit
incompletely. The computer will then reboot with incomplete
policies and fail to mount ``/run``, resulting in a failure.

Workaround is to append ``enforcing=0`` to kernel command line in
the GRUB menu, as many times as necessary, until the system
complete one successful boot. The author of this guide has not
found out a way to solve this issue during installation. Help is
appreciated.

Post installaion
---------------------------

Expand Down
19 changes: 12 additions & 7 deletions docs/Getting Started/NixOS/Root on ZFS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ System Installation

#. Partition the disks.

Note: you must clear all existing partition tables and data structures from the disks,
especially those with existing ZFS pools or mdraid and those that have been used as live media.
Those data structures may interfere with boot process.
Note: you must clear all existing partition tables and data structures from target disks.

For flash-based storage, this can be done by the blkdiscard command below:
::
Expand Down Expand Up @@ -302,7 +300,7 @@ System Installation
zfs create -o mountpoint=legacy rpool/nixos/home
mkdir "${MNT}"/home
mount -t zfs rpool/nixos/home "${MNT}"/home
zfs create -o mountpoint=legacy rpool/nixos/var
zfs create -o mountpoint=none rpool/nixos/var
zfs create -o mountpoint=legacy rpool/nixos/var/lib
zfs create -o mountpoint=legacy rpool/nixos/var/log
zfs create -o mountpoint=none bpool/nixos
Expand Down Expand Up @@ -384,6 +382,10 @@ System Configuration
sed -i "s|\"x86_64-linux\"|\"$(uname -m || true)-linux\"|g" \
"${MNT}"/etc/nixos/flake.nix

#. Detect kernel modules needed for boot

.. code-block:: sh

cp "$(command -v nixos-generate-config || true)" ./nixos-generate-config

chmod a+rw ./nixos-generate-config
Expand All @@ -398,10 +400,13 @@ System Configuration

.. ifconfig:: zfs_root_test

::
::

sed -i "s|\"kernelModules_placeholder\"|\"nvme\"|g" \
"${MNT}"/etc/nixos/hosts/exampleHost/default.nix

# show generated config
cat "${MNT}"/etc/nixos/hosts/exampleHost/default.nix
# show generated config
cat "${MNT}"/etc/nixos/hosts/exampleHost/default.nix

#. Set root password

Expand Down
8 changes: 3 additions & 5 deletions docs/Getting Started/RHEL-based distro/Root on ZFS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Preparation

Download latest extended variant of `Alpine Linux
live image
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.0-x86_64.iso.asc>`__
<https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso>`__,
verify `checksum <https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-extended-3.18.4-x86_64.iso.asc>`__
and boot from it.

.. code-block:: sh
Expand Down Expand Up @@ -195,9 +195,7 @@ System Installation

#. Partition the disks.

Note: you must clear all existing partition tables and data structures from the disks,
especially those with existing ZFS pools or mdraid and those that have been used as live media.
Those data structures may interfere with boot process.
Note: you must clear all existing partition tables and data structures from target disks.

For flash-based storage, this can be done by the blkdiscard command below:
::
Expand Down
4 changes: 2 additions & 2 deletions scripts/zfs_root_guide_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ losetup --detach-all
# it is easier to install rhel with Alpine Linux live media
# which has native zfs support
if ! test -f rootfs.tar.gz; then
curl --fail-early --fail -Lo rootfs.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.0-x86_64.tar.gz
curl --fail-early --fail -Lo rootfs.tar.gz.sig https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.0-x86_64.tar.gz.asc
curl --fail-early --fail -Lo rootfs.tar.gz https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz
curl --fail-early --fail -Lo rootfs.tar.gz.sig https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz.asc
gpg --auto-key-retrieve --keyserver hkps://keyserver.ubuntu.com --verify rootfs.tar.gz.sig
fi
mkdir rootfs-"${distro}"
Expand Down
Loading