Commit Graph

55 Commits

Author SHA1 Message Date
Richard Laager
17845ca703 Debian: Fix /run/lock code
It looks like I messed this up (for Debian, but not Ubuntu) in my
various changes.  It is not necessary to do this before the chroot in
the normal install path, as it was done earlier.  But it is something
that should be done before the chroot in the rescue path.  I've now
made Debian match Ubuntu.

Fixes #141
Reported-by: Colm <colm@tuatha.org>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-03-15 18:32:01 -05:00
Richard Laager
30598b4875 Debian/Ubuntu: Improve the "Stop zed" message
Fixes #137
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-03-15 18:25:10 -05:00
Richard Laager
32954399c7 Debian/Ubuntu: Improve cryptsetup notes
There was already a note about ignoring a cryptsetup WARNING, but:
A) cryptsetup also prints an ERROR message, and
B) this also occurs at an earlier step.

Fixes #134

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-03-15 18:23:05 -05:00
Richard Laager
904e7253a2 Debian/Ubuntu: Remove /boot/efi automount option
This was mentioned in #99 and I added it as an alternative option.
However, it seems to break GRUB; see #107.  GRUB tries to parse
/proc/mounts and see a line like this:
  systemd-1 /boot/efi autofs ...
From there, it gets "systemd-1" as the device name, and breaks.

Closes #107

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-02-22 14:06:17 -06:00
Richard Laager
2551c34eda Debian/Ubuntu: Add a couple notes
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-02-21 17:22:04 -06:00
Richard Laager
c6ce3a9f6f Ubuntu/Debian: Fix bpool importing
We need the bpool to end up in zpool.cache.  For some reason, this is
not happening normally on Ubuntu 20.04.  I added the same steps to
Debian too, for good measure.

This was discussed in #120.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-02-21 17:21:46 -06:00
Richard Laager
0dd5093187 Debian/Ubuntu: Bring back creating /mnt/run/lock
This should fix issues with zed.

Closes #110
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-02-21 14:46:56 -06:00
Richard Laager
cbec1d359b Debian: Fix some bad whitespace 2021-02-19 23:44:08 -06:00
Richard Laager
4fa77b2658 Ubuntu/Debian: Fix formatting
I had one too many spaces.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-02-15 21:57:36 -06:00
Richard Laager
e8763236b6 Ubuntu/Debian: Disable automounting
If the disk has been used before (with partitions at the same offsets),
previous filesystems (e.g. the ESP) will automount if not disabled.

Co-authored-by: attero <service-github@attero.me>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
Closes #119
2021-02-09 18:57:01 -06:00
Richard Laager
b2d60382ba Debian & Ubuntu: chmod 700 /root
"The /root dataset is created with default world-readable permissions
 (755).  debootstrap would create /root with 700 permissions, but it
 does not change the permissions if it already exists."

Reported-by: zxyrepf
Closes #115
2021-02-02 03:28:38 -06:00
Rakor
142c5da691 Corrected partition number in grub config for efi 2021-01-20 14:02:39 -06:00
Richard Laager
c00aa93389 Debian/Ubuntu: Update /boot/efi fstab entry
I made Debian follow the Ubuntu approach, which comes from the Ubuntu
installer.  There was a report (#99) of a problem with the old approach
used on Debian.  In that issue, user foo-git linked to a Fedora feature
request which discusses automounting /boot/efi instead.  I've offered
that as an alternative.

I am not switching to that outright, as following the Ubuntu installer
(where possible) is a goal of mine.

Suggested-by: foo-git
Closes #99
2021-01-09 16:59:17 -06:00
Richard Laager
2c76e5de97 Debian/Ubuntu: Try again with /run
The fix for #97, 66233a1138, seems to
have created yet another issue (beyond #100):

"the link /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
is dangling (since /run has just been clobbered by an empty tmpfs).
debootstrap seems to populate all manner of stuff in /run."
f1721edda7 (commitcomment-45770519)

I considered just reverting all of this, since the original issue only
occurred when copying in an existing system.  Ignoring it was my
decision the first time this came up.  But it's come up twice now.
Also, this mode is mentioned in the guide.  Most importantly, if we are
not mounting a /tmpfs at /run in the normal case, then we could end up
with cruft in /run in the root filesystem which could potentially break
something or be confusing later if the /run tmpfs ever failed to mount.
So in the interest of correctness, I'd like to try to handle this.

I am now mounting a tmpfs at /mnt/run before the debootstrap step.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-01-08 16:16:35 -06:00
Richard Laager
d06e1a9b13 Debian/Ubuntu: Create /mnt/run/lock
The fix for #97, 66233a1138, seems to have
created another issue.

Closes #100

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-01-05 00:01:22 -06:00
Richard Laager
66233a1138 Debian: Add a work-around to preserve zpool.cache
The zpool.cache file is getting cleared by zfs-import-bpool.service.  A
work-around is to move the cache file out of the way before the import
and restore it after:
https://github.com/openzfs/zfs/discussions/8549#discussioncomment-231334

The suggestion there is suppressing errors with `|| true`, which can
also be done by prefixing the command with `-`.  (I verified that the
systemd in Buster is new enough to support that.)  If we are
suppressing errors anyway, I'm not sure there's a benefit to checking
for the file rather than just trying the move and letting it fail.  The
latter approach avoids the shell entirely.  So I changed it.

Closes #97
Suggested-by: Andrey Prokopenko <9478806+terem42@users.noreply.github.com>
Tested-by: Hevisko <hvjunk@gmail.com>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-12-31 10:48:42 -06:00
Richard Laager
f1721edda7 Mount a tmpfs at /run
It was reported, in #97, that this is required when copying an existing
system installation into the root filesystem.  It is probably a good
idea to do this all the time, to avoid the risk of stray junk ending up
in /run during the install process.

Suggested-by: Hevisko <hvjunk@gmail.com>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-12-30 23:51:28 -06:00
Richard Laager
3dd76f39ec Debian/Ubuntu: Fix os-prober change
This was broken in add1e275fb.

Closes #93

Reported-by: Wojtek Siudzinski <admin@suda.pl>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-12-18 19:34:37 -06:00
Richard Laager
3d862230eb Debian/Ubuntu: Add some blank lines
The convention here is to add a blank line between commands that
cannot be copied-and-pasted together.  apt is such a command, as it
will eat the input from the paste.
2020-12-12 03:49:41 -06:00
Yvan-Masson
d6674f9871 Fix formatting (literal block) 2020-12-11 03:09:33 -06:00
Yvan-Masson
add1e275fb Ubuntu/Debian: use apt instead of dpkg
In general apt is the preferred way to interact with packages, and I
think in this case there is no need/advantage to use dpkg.

Closes #88

Signed-off-by: Richard Laager <rlaager@wiktel.com>
[Fixed the other two instances too.]
2020-12-09 22:35:42 -06:00
Yvan-Masson
69ef236a3f Fix small formatting issue 2020-12-07 21:35:45 +03:00
Richard Laager
d86f52c207 Debian/Ubuntu: Use /dev/disk/by-uuid
This is how the Ubuntu 20.04 installer configures the ESP to mount at
/boot/efi, so it should be fine to use this convention everywhere.

/dev/md0's /dev/disk/by-uuid entry does not show up immediately, so I
removed the swapon there.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-12-05 17:32:40 -06:00
Richard Laager
a4f8837031 Debian: Use UUID instead of PARTUUID for esp
I don't know why this was different from Ubuntu.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-12-05 17:11:47 -06:00
Richard Laager
c94ee2cae4 Debian/Ubuntu: Configure keyboard & charset
On Ubuntu, console-setup, keyboard-configuration (a dependency of
console-setup), and locales are installed by default.  On Debian, we
need to install them manually.  (We were already doing so for locales.)

I merged the various dpkg-reconfigure lines into one to simplify.  The
order isn't important.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
Reported-by: Robert <technic-take3>
Fixes #59
2020-12-05 16:57:34 -06:00
Mathias Gibbens
7f3d021349 Include the debian security and -updates repos as well in sources.list
Users following the ZFS guide may not realize their system won't
receive important security updates between minor point releases
unless additional configuration is added to sources.list.

Signed-off-by: Mathias Gibbens <mathias@calenhad.com>
2020-11-25 17:17:29 -06:00
Mathias Gibbens
9ed82cda6e Fix pip3 install command for Debian-based distros
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>
2020-11-25 17:17:29 -06:00
George Melikov
a12e60f437 Use mailing lists anchor everywhere 2020-09-21 19:28:09 +03:00
XnTry
49c255e480 Fix typo for mirrored rpool creation
This was a copy-and-paste from the mirror bpool commands that was not
updated.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
Fixes #53
2020-09-09 17:59:37 -05:00
Richard Laager
f54ea18312 Debian: Skip manual mount of bpool/BOOT/debian
This was missed in 784b3b7a27 which
eliminated the canmount=noauto.  With that gone, it is not necessary to
manually mount bpool/BOOT/debian.

Reported-by: Danny <suavedandy>
2020-09-08 17:04:06 -05:00
Richard Laager
e2d9dcd2ad Debian/Ubuntu: Fix locales formatting 2020-08-31 00:21:38 -05:00
Christian Nassif-Haynes
ceb02668a3 Fix typo
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-08-24 23:09:10 -05:00
Richard Laager
371d3cf08b Debian/Ubuntu: Update pip3 command
This now matches the example in the top-level README.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-08-12 17:34:27 -05:00
George Melikov
bc36143d46 Fix typo in Debian-on-root man 2020-07-24 23:51:49 -05:00
Spotlight
ba1752bad9 Specify buster-backports usage
Without buster-backports, everything ZFS is from the buster repository.
Adding this to the Live CD installation instructions allows our initial
pool to be created with newer versions.

Signed-off-by: Spotlight <spotlight@joscomputing.space>
2020-06-26 01:56:15 -05:00
Jonathan Watt
ddc56b0106 Switch open-zfs.org links to openzfs.org, and use HTTPS URLs
The open-zfs.org host, Dreamhost, returns a page for https://open-zfs.org
(note, httpS://) which causes HTTPS Everywhere with the 'Encrypt All
Eligible Sites' option enabled to redirect http://open-zfs.org to
https://open-zfs.org, and therefore fail to redirect to openzfs.org.
Ideally a redirect would be implemented at Dreamhost for
httpS://open-zfs.org too, but presumably the links in the docs should
really be updated anyway.
2020-06-17 20:19:49 +03:00
Arooo
ebdfbfbf96 Source list in live context
Line 104 : "/mnt/etc/apt/sources.list" should be  "/etc/apt/sources.list", we are preparing the live context, not the chroot, yet.
2020-06-05 16:11:53 -05:00
Richard Laager
0ccf839233 Drop the Debian package option for building docs
We are now using an extension which is not packaged.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-30 16:58:43 -05:00
Richard Laager
c9e868af21 Debian/Ubuntu: Expand disk clearing steps
This covers more scenarios, including the need to stop md arrays and
wipe MD partitions.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
Requested-by: Larry Wagner <larrywagner0@gmail.com>
2020-05-30 15:00:51 -05:00
Richard Laager
bc4eac650a Debian: Update aes-256-gcm note
buster-backports has ZoL 0.8.4.  I am still explicitly specifying
encryption=aes-256-gcm to avoid accidents.  This can probably change to
encryption=on at some point.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
4fb612b336 Debian/Ubuntu: Expand SSH instructions
This makes the PermitRootLogin changes part of the actual steps rather
than a comment.  I've also made its removal an explicit step.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
3e9c328ce5 Debian: Adjust partition types to match Ubuntu
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
c11642d7ae Debian: Drop devices=off from rpool
This makes it consistent with Ubuntu.  This really isn't worth the
trouble, especially since it breaks debootstrap.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
67561688af Debian/Ubuntu: Autonumber (current) HOWTOs
This also involved a bunch of reindenting and rewrapping.

I reworked the Live CD sources on Debian to be more consistent with
Ubuntu (and the chroot sources configuration on Debian).

I reworked the zpool create wrapping and the mirror/raidz notes.  This
should be more clear on how to create the multi-disk topologies.

I fixed a couple formatting issues too (mainly one backtick where
there should have been two).

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
277ad2a070 Debian/Ubuntu: Autonumber Contributing section
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
784b3b7a27 Debian: Simplify /boot mounting
The original idea here was that bpool/BOOT/debian should be able to be
cloned, just like rpool/ROOT/debian. The problem is that it doesn't
really work without special support in the initramfs. Given that, it is
possible to simplify this.

I also set mountpoint=/boot on bpool, for consistency with the Ubuntu
20.04 HOWTO, which is in turn done that way for consistency with the
Ubuntu installer.

Thanks: colmbuckley
Closes: openzfs/zfs#10309
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
7c4861e911 Debian/Ubuntu: Add Ubuntu 20.04
I have backported some of the cosmetic and other minimal changes to
Ubuntu 18.04 and Debian Buster.  This keeps the deltas as small as
reasonably possible.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
417c2a5379 Debian: Set REMAKE_INITRD=yes
The initrd needs to be rebuilt after the ZFS modules are built.
Otherwise, the system can (will?) fail to boot.

Closes: openzfs/zfs#10355
Reported-by: Christian Garbs <mitch@cgarbs.de>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
c5cd813885 Debian/Ubuntu: Update Support links
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00
Richard Laager
99a0c97413 Debian/Ubuntu: Cleanup and update index pages
Signed-off-by: Richard Laager <rlaager@wiktel.com>
2020-05-26 14:40:24 -05:00