]> git.proxmox.com Git - mirror_zfs.git/commitdiff
contrib: rename initrd READMEs to README.md
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Wed, 26 Jan 2022 13:44:08 +0000 (14:44 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 11 Feb 2022 19:44:27 +0000 (11:44 -0800)
It's an unhelpful naming scheme and one that breaks GitHub autoreadme.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13017

contrib/dracut/Makefile.am
contrib/dracut/README.dracut.markdown [deleted file]
contrib/dracut/README.md [new file with mode: 0644]
contrib/initramfs/Makefile.am
contrib/initramfs/README.initramfs.markdown [deleted file]
contrib/initramfs/README.md [new file with mode: 0644]
rpm/generic/zfs.spec.in

index 8c9a6be0899a827db9ca0b3c2da652bb632a783e..09805277ffb0c7faa444b12c85cffa9c6201f314 100644 (file)
@@ -3,4 +3,4 @@ include $(top_srcdir)/config/Shellcheck.am
 SUBDIRS = 02zfsexpandknowledge 90zfs
 SHELLCHECKDIRS = $(SUBDIRS)
 
-EXTRA_DIST = README.dracut.markdown
+EXTRA_DIST = README.md
diff --git a/contrib/dracut/README.dracut.markdown b/contrib/dracut/README.dracut.markdown
deleted file mode 100644 (file)
index 906648d..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-## Basic setup
-1. Install `zfs-dracut`
-2. Set `mountpoint=/` for your root dataset (for compatibility, `legacy` also works, but is not recommended for new installations):
-    ```sh
-    zfs set mountpoint=/ pool/dataset
-    ```
-3. Either (a) set `bootfs=` on the pool to the dataset:
-    ```sh
-    zpool set bootfs=pool/dataset pool
-    ```
-4. Or (b) append `root=zfs:pool/dataset` to your kernel cmdline.
-5. Re-generate your initrd and update it in your boot bundle
-
-Encrypted datasets have keys loaded automatically or prompted for.
-
-If the root dataset contains children with `mountpoint=`s of `/etc`, `/bin`, `/lib*`, or `/usr`, they're mounted too.
-
-## cmdline
-1. `root=`            | Root dataset is…                                         | Pools imported |
-   -------------------|----------------------------------------------------------|----------------|
-   *(empty)*          | the first `bootfs=` after `zpool import -aN`             | all            |
-   `zfs:AUTO`         | *(as above, but overriding other autoselection methods)* | all            |
-   `ZFS=pool/dataset` | `pool/dataset`                                           | `pool`         |
-   `zfs:pool/dataset` | *(as above)*                                             | `pool`         |
-
-   All `+`es are replaced with spaces (i.e. to boot from `root pool/data set`, pass `root=zfs:root+pool/data+set`).
-
-   The dataset can be at any depth, including being the pool's root dataset (i.e. `root=zfs:pool`).
-
-2. `spl_hostid`: passed to `zgenhostid -f`, useful to override the `/etc/hostid` file baked into the initrd.
-
-3. `bootfs.snapshot`, `bootfs.snapshot=snapshot-name`: enables `zfs-snapshot-bootfs.service`,
-   which creates a snapshot `$root_dataset@$(uname -r)` (or, in the second form, `$root_dataset@snapshot-name`)
-   after pool import but before the rootfs is mounted.
-   Failure to create the snapshot is noted, but booting continues.
-
-4. `bootfs.rollback`, `bootfs.rollback=snapshot-name`: enables `zfs-snapshot-bootfs.service`,
-   which `-Rf` rolls back to `$root_dataset@$(uname -r)` (or, in the second form, `$root_dataset@snapshot-name`)
-   after pool import but before the rootfs is mounted.
-   Failure to roll back will fall down to the rescue shell.
-   This has obvious potential for data loss: make sure your persistent data is not below the rootfs and you don't care about any intermediate snapshots.
-
-5. If both `bootfs.snapshot` and `bootfs.rollback` are set, `bootfs.rollback` is ordered *after* `bootfs.snapshot`.
-
-6. `zfs_force`, `zfs.force`, `zfsforce`: add `-f` to all `zpool import` invocations.
-   May be useful. Use with caution.
diff --git a/contrib/dracut/README.md b/contrib/dracut/README.md
new file mode 100644 (file)
index 0000000..906648d
--- /dev/null
@@ -0,0 +1,46 @@
+## Basic setup
+1. Install `zfs-dracut`
+2. Set `mountpoint=/` for your root dataset (for compatibility, `legacy` also works, but is not recommended for new installations):
+    ```sh
+    zfs set mountpoint=/ pool/dataset
+    ```
+3. Either (a) set `bootfs=` on the pool to the dataset:
+    ```sh
+    zpool set bootfs=pool/dataset pool
+    ```
+4. Or (b) append `root=zfs:pool/dataset` to your kernel cmdline.
+5. Re-generate your initrd and update it in your boot bundle
+
+Encrypted datasets have keys loaded automatically or prompted for.
+
+If the root dataset contains children with `mountpoint=`s of `/etc`, `/bin`, `/lib*`, or `/usr`, they're mounted too.
+
+## cmdline
+1. `root=`            | Root dataset is…                                         | Pools imported |
+   -------------------|----------------------------------------------------------|----------------|
+   *(empty)*          | the first `bootfs=` after `zpool import -aN`             | all            |
+   `zfs:AUTO`         | *(as above, but overriding other autoselection methods)* | all            |
+   `ZFS=pool/dataset` | `pool/dataset`                                           | `pool`         |
+   `zfs:pool/dataset` | *(as above)*                                             | `pool`         |
+
+   All `+`es are replaced with spaces (i.e. to boot from `root pool/data set`, pass `root=zfs:root+pool/data+set`).
+
+   The dataset can be at any depth, including being the pool's root dataset (i.e. `root=zfs:pool`).
+
+2. `spl_hostid`: passed to `zgenhostid -f`, useful to override the `/etc/hostid` file baked into the initrd.
+
+3. `bootfs.snapshot`, `bootfs.snapshot=snapshot-name`: enables `zfs-snapshot-bootfs.service`,
+   which creates a snapshot `$root_dataset@$(uname -r)` (or, in the second form, `$root_dataset@snapshot-name`)
+   after pool import but before the rootfs is mounted.
+   Failure to create the snapshot is noted, but booting continues.
+
+4. `bootfs.rollback`, `bootfs.rollback=snapshot-name`: enables `zfs-snapshot-bootfs.service`,
+   which `-Rf` rolls back to `$root_dataset@$(uname -r)` (or, in the second form, `$root_dataset@snapshot-name`)
+   after pool import but before the rootfs is mounted.
+   Failure to roll back will fall down to the rescue shell.
+   This has obvious potential for data loss: make sure your persistent data is not below the rootfs and you don't care about any intermediate snapshots.
+
+5. If both `bootfs.snapshot` and `bootfs.rollback` are set, `bootfs.rollback` is ordered *after* `bootfs.snapshot`.
+
+6. `zfs_force`, `zfs.force`, `zfsforce`: add `-f` to all `zpool import` invocations.
+   May be useful. Use with caution.
index 931ceb1316a527ec6deeac58c019506f6b9440c1..57e8f5c3a485091d720461f02b900c502f6c5f82 100644 (file)
@@ -8,5 +8,4 @@ dist_initrd_SCRIPTS = \
 SUBDIRS = conf.d conf-hooks.d hooks scripts
 SHELLCHECKDIRS = hooks scripts
 
-EXTRA_DIST = \
-       README.initramfs.markdown
+EXTRA_DIST = README.md
diff --git a/contrib/initramfs/README.initramfs.markdown b/contrib/initramfs/README.initramfs.markdown
deleted file mode 100644 (file)
index 34e9bab..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-## Description
-
-These scripts are intended to be used with `initramfs-tools`, which is a
-similar software product to `dracut` (which is used in Red Hat based
-distributions), and is mainly used by Debian GNU/Linux and derivatives.
-
-These scripts share some common functionality with the SysV init scripts,
-primarily the `/etc/zfs/zfs-functions` script.
-
-## Configuration
-
-### Root pool/filesystem
-
-Different distributions have their own standard on what to specify on the
-kernel command line to boot off a ZFS filesystem.
-
-This script supports the following kernel command line argument combinations
-(in this order - first match wins):
-
-* `rpool=<pool>`
-* `bootfs=<pool>/<dataset>`
-* `rpool=<pool> bootfs=<pool>/<dataset>`
-* `-B zfs-bootfs=<pool>/<fs>`
-* `root=<pool>/<dataset>`
-* `root=ZFS=<pool>/<dataset>`
-* `root=zfs:AUTO`
-* `root=zfs:<pool>/<dataset>`
-* `rpool=rpool`
-
-If a pool is specified, it will be used.  Otherwise, in `AUTO` mode, all pools
-will be searched.  Pools may be excluded from the search by listing them in
-`ZFS_POOL_EXCEPTIONS` in `/etc/default/zfs`.
-
-Pools will be imported as follows:
-
-* Try `/dev/disk/by-vdev` if it exists; see `/etc/zfs/vdev_id.conf`.
-* Try `/dev/disk/by-id` and any other `/dev/disk/by-*` directories.
-* Try `/dev`.
-* Use the cache file if nothing else worked.
-
-This order may be modified by setting `ZPOOL_IMPORT_PATH` in
-`/etc/default/zfs`.
-
-If a dataset is specified, it will be used as the root filesystem.  Otherwise,
-this script will attempt to find a root filesystem automatically (in the
-specified pool or all pools, as described above).
-
-Filesystems below the root filesystem will be automatically mounted with no
-additional configuration necessary.  For example, if the root filesystem is
-`rpool/ROOT/rootfs`, `rpool/root/rootfs/var`, `rpool/root/rootfs/usr`, etc.
-will be mounted (if they exist).
-
-### Snapshots
-
-The `<dataset>` can be a snapshot.  In this case, the snapshot will be cloned
-and the clone used as the root filesystem.  Note:
-
-* If the snapshot does not exist, the base dataset (the part before `@`) is
-  used as the boot filesystem instead.
-* If the resulting clone dataset already exists, it is destroyed.
-* The clone is created with `mountpoint=none` and `canmount=noauto`.  The root
-  filesystem is mounted manually by the initramfs script.
-* If no snapshot is specified on the `root=` kernel command line, but
-  there is an `@`, the user will be prompted to choose a snapshot to use.
-
-### Extra options
-
-The following kernel command line arguments are supported:
-
-* `zfsdebug=(on,yes,1)`: Show extra debugging information
-* `zfsforce=(on,yes,1)`: Force import the pool
-* `rollback=(on,yes,1)`: Rollback to (instead of clone) the snapshot
-
-### Unlocking a ZFS encrypted root over SSH
-
-To use this feature:
-
-1. Install the `dropbear-initramfs` package.  You may wish to uninstall the
-   `cryptsetup-initramfs` package to avoid warnings.
-2. Add your SSH key(s) to `/etc/dropbear-initramfs/authorized_keys`.  Note
-   that Dropbear does not support ed25519 keys before version 2020.79; 
-   in that case, use RSA (2048-bit or more) instead.
-3. Rebuild the initramfs with your keys: `update-initramfs -u`
-4. During the system boot, login via SSH and run: `zfsunlock`
diff --git a/contrib/initramfs/README.md b/contrib/initramfs/README.md
new file mode 100644 (file)
index 0000000..34e9bab
--- /dev/null
@@ -0,0 +1,84 @@
+## Description
+
+These scripts are intended to be used with `initramfs-tools`, which is a
+similar software product to `dracut` (which is used in Red Hat based
+distributions), and is mainly used by Debian GNU/Linux and derivatives.
+
+These scripts share some common functionality with the SysV init scripts,
+primarily the `/etc/zfs/zfs-functions` script.
+
+## Configuration
+
+### Root pool/filesystem
+
+Different distributions have their own standard on what to specify on the
+kernel command line to boot off a ZFS filesystem.
+
+This script supports the following kernel command line argument combinations
+(in this order - first match wins):
+
+* `rpool=<pool>`
+* `bootfs=<pool>/<dataset>`
+* `rpool=<pool> bootfs=<pool>/<dataset>`
+* `-B zfs-bootfs=<pool>/<fs>`
+* `root=<pool>/<dataset>`
+* `root=ZFS=<pool>/<dataset>`
+* `root=zfs:AUTO`
+* `root=zfs:<pool>/<dataset>`
+* `rpool=rpool`
+
+If a pool is specified, it will be used.  Otherwise, in `AUTO` mode, all pools
+will be searched.  Pools may be excluded from the search by listing them in
+`ZFS_POOL_EXCEPTIONS` in `/etc/default/zfs`.
+
+Pools will be imported as follows:
+
+* Try `/dev/disk/by-vdev` if it exists; see `/etc/zfs/vdev_id.conf`.
+* Try `/dev/disk/by-id` and any other `/dev/disk/by-*` directories.
+* Try `/dev`.
+* Use the cache file if nothing else worked.
+
+This order may be modified by setting `ZPOOL_IMPORT_PATH` in
+`/etc/default/zfs`.
+
+If a dataset is specified, it will be used as the root filesystem.  Otherwise,
+this script will attempt to find a root filesystem automatically (in the
+specified pool or all pools, as described above).
+
+Filesystems below the root filesystem will be automatically mounted with no
+additional configuration necessary.  For example, if the root filesystem is
+`rpool/ROOT/rootfs`, `rpool/root/rootfs/var`, `rpool/root/rootfs/usr`, etc.
+will be mounted (if they exist).
+
+### Snapshots
+
+The `<dataset>` can be a snapshot.  In this case, the snapshot will be cloned
+and the clone used as the root filesystem.  Note:
+
+* If the snapshot does not exist, the base dataset (the part before `@`) is
+  used as the boot filesystem instead.
+* If the resulting clone dataset already exists, it is destroyed.
+* The clone is created with `mountpoint=none` and `canmount=noauto`.  The root
+  filesystem is mounted manually by the initramfs script.
+* If no snapshot is specified on the `root=` kernel command line, but
+  there is an `@`, the user will be prompted to choose a snapshot to use.
+
+### Extra options
+
+The following kernel command line arguments are supported:
+
+* `zfsdebug=(on,yes,1)`: Show extra debugging information
+* `zfsforce=(on,yes,1)`: Force import the pool
+* `rollback=(on,yes,1)`: Rollback to (instead of clone) the snapshot
+
+### Unlocking a ZFS encrypted root over SSH
+
+To use this feature:
+
+1. Install the `dropbear-initramfs` package.  You may wish to uninstall the
+   `cryptsetup-initramfs` package to avoid warnings.
+2. Add your SSH key(s) to `/etc/dropbear-initramfs/authorized_keys`.  Note
+   that Dropbear does not support ed25519 keys before version 2020.79; 
+   in that case, use RSA (2048-bit or more) instead.
+3. Rebuild the initramfs with your keys: `update-initramfs -u`
+4. During the system boot, login via SSH and run: `zfsunlock`
index d66de0f33f293caa74d8591d5826127b9dca4f1d..bdd77b43da6ff2faec19ea5d13b9687b76b9f330 100644 (file)
@@ -540,7 +540,7 @@ systemctl --system daemon-reload >/dev/null || true
 %{_datadir}/%{name}/*.sh
 
 %files dracut
-%doc contrib/dracut/README.dracut.markdown
+%doc contrib/dracut/README.md
 %{_dracutdir}/modules.d/*
 
 %if %{with pyzfs}
@@ -554,7 +554,7 @@ systemctl --system daemon-reload >/dev/null || true
 
 %if 0%{?_initramfs}
 %files initramfs
-%doc contrib/initramfs/README.initramfs.markdown
+%doc contrib/initramfs/README.md
 /usr/share/initramfs-tools/*
 %else
 # Since we're not building the initramfs package,