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

Some changes for Debian Bullseye #126

Closed
wants to merge 4 commits into from
Closed

Some changes for Debian Bullseye #126

wants to merge 4 commits into from

Conversation

gratuxri
Copy link

No description provided.

@rlaager
Copy link
Member

rlaager commented Feb 23, 2021

Thanks. I will look at this at some point soon, but not immediately. Now that OpenZFS 2.0 has landed in buster-backports, I need to review and update the Buster version. The bullseye one will probably be very similar, so I can review those together.

Copy link
Contributor

@anarcat anarcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just did an install, but haven't rebooted yet... https://anarc.at/hardware/tubman/ i'll report back if there's anything else that needs changing.

@anarcat
Copy link
Contributor

anarcat commented Apr 29, 2021

ah and, by the way, the buster procedure mostly works in bullseye, actually. the above changes are minor and maybe it would be worth merging the two. in any case, i can say this procedure worked for me and the machine rebooted fine (although without networking because i screwed up the interface(5) configuration):

https://anarc.at/hardware/tubman/

(it should be noted that eth0 doesn't exist after a reboot here, the correct interface was enp1s0. i think the procedure shouldn't use ifupdown, that say: we should use systemd-networkd as that's actually easier to configure and better integrated. i'll document that procedure when i figure it out. :)

@gratuxri
Copy link
Author

You can check ethernet device name with udevadm test /sys/class/net/eth0/. After some updates I noticed that grub cannot recognize correct encrypted root path in /boot/grub/grub.cfg: root=ZFS=/ROOT/debian
P.S.: You can make fai hook for ZFS partitioning ;)

@anarcat
Copy link
Contributor

anarcat commented Apr 29, 2021 via email

@anarcat
Copy link
Contributor

anarcat commented May 4, 2021

it would also be nice to have remote unlock instructions (#46 )

@faxm0dem
Copy link

I'd like to install bullseye on root zfs. Is this patch a good start or is it out of date ?

Copy link

@faxm0dem faxm0dem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just successfully tested the whole procedure for UEFI and ZFS encrypted.
It works like a charm, thanks a bunch!

@anarcat
Copy link
Contributor

anarcat commented Aug 18, 2021

03bd1a4 seems to add an entirely new file, which makes this PR really hard to review.

@faxm0dem
Copy link

aren't all debian release instructions in separate files ?

@anarcat
Copy link
Contributor

anarcat commented Aug 18, 2021

well right now we have those files in this pull request:

  • docs/Getting Started/Debian Bullseye Root on ZFS.rst
  • docs/Getting Started/Debian/Debian Bullseye Root on ZFS.rst

This seems like a duplicate. Am I missing something?

@gratuxri
Copy link
Author

gratuxri commented Aug 18, 2021

This seems like a duplicate. Am I missing something?
Sorry, it's really duplicate. It's fixed now.

Copy link
Contributor

@anarcat anarcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for removing the dupe and the cleanup! :)

@anarcat
Copy link
Contributor

anarcat commented Aug 18, 2021

I'd like to install bullseye on root zfs. Is this patch a good start or is it out of date ?

fwiw, i used a previous version of this guide for an install, and it worked mostly well, back when bullseye was testing, to answer your question more directly. so i guess this is all ready to go now...

@rlaager rlaager self-assigned this Aug 29, 2021
@gratuxri gratuxri requested a review from gmelikov August 29, 2021 19:19
@faxm0dem
Copy link

faxm0dem commented Sep 2, 2021

BTW, how safe is upgrading from buster ?

@gratuxri
Copy link
Author

gratuxri commented Sep 3, 2021

BTW, how safe is upgrading from buster ?

Just worked for me following official upgrade guide https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.html

@faxm0dem
Copy link

faxm0dem commented Sep 7, 2021

Just worked for me following official upgrade guide https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.html

No issues whatsoever with your rpool and bpool ?

@gratuxri
Copy link
Author

gratuxri commented Sep 8, 2021

No issues whatsoever with your rpool and bpool ?

From Buster Installation with 2.0.3-9~bpo10+1 to Bullseye with 2.0.3-9 I didn't have any problems. I didn't tested it with on old (stretch) Installations.

@freezed
Copy link

freezed commented Sep 10, 2021

Hi, thanks for the work
I want to set up a ZFS root for a Debian/Bullseye, is this proposal ready to be followed?

@freezed
Copy link

freezed commented Sep 10, 2021

I just take a rapid look, these commits were made before bullseye goes stable.
I can push some commit fixing that.

@gratuxri
Copy link
Author

I just take a rapid look, these commits were made before bullseye goes stable.
I can push some commit fixing that.

Please make a PR to branch bullseye or just say here, what do you want to change, maybe it's usable right now to enable some update repos in sources.list

@gmelikov gmelikov requested a review from rlaager October 3, 2021 10:37
@gmelikov
Copy link
Member

gmelikov commented Oct 3, 2021

Sorry for long delay, we'll try to get back to ubuntu/debian howto this month (they reused same parts), and work this out.

@faxm0dem
Copy link

Hi https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html still doesn't list bullseye.
Consider this a friendly reminder, with offer to help if I can :-D

Copy link
Member

@gmelikov gmelikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diffed with Buster howto, just some nits and we're good to go.

~~~~~~~~~~~~~~~~~~~

- `64-bit Debian GNU/Linux Bullseye Live CD w/ GUI (e.g. gnome iso)
<https://cdimage.debian.org/mirror/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid/debian-live-11.0.0-amd64-standard+nonfree.iso>`__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't exist now, let's use previous variant

Suggested change
<https://cdimage.debian.org/mirror/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid/debian-live-11.0.0-amd64-standard+nonfree.iso>`__
<https://cdimage.debian.org/mirror/cdimage/release/current-live/amd64/iso-hybrid/>`__

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one problem with current-live is it will silently turn into bookworm when that (Debian 12) is released... I'm not sure there's a good way around that, because the version-specific link:

https://cdimage.debian.org/mirror/cdimage/release/11.1.0-live/amd64/iso-hybrid/

... includes the minor version number, which will change more frequently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, but we didn't have a problem with current-live in previous versions, so I propose to leave it.

Comment on lines +41 to +42
`#zfsonlinux <irc://irc.freenode.net/#zfsonlinux>`__ on `freenode
<https://freenode.net/>`__. If you have a bug report or feature request
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`#zfsonlinux <irc://irc.freenode.net/#zfsonlinux>`__ on `freenode
<https://freenode.net/>`__. If you have a bug report or feature request
`#zfsonlinux <ircs://irc.libera.chat/#zfsonlinux>`__ on `Libera Chat
<https://libera.chat/>`__. If you have a bug report or feature request

Comment on lines +854 to +861
Replace ``username`` with your desired username::

zfs create rpool/home/username
adduser username

cp -a /etc/skel/. /home/username
chown -R username:username /home/username
usermod -a -G audio,cdrom,dip,floppy,netdev,plugdev,sudo,video username
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to leave a variant from Buster with username in variable to minimize client's changes

Suggested change
Replace ``username`` with your desired username::
zfs create rpool/home/username
adduser username
cp -a /etc/skel/. /home/username
chown -R username:username /home/username
usermod -a -G audio,cdrom,dip,floppy,netdev,plugdev,sudo,video username
Replace ``YOUR_USERNAME`` with your desired username::
username=YOUR_USERNAME
zfs create rpool/home/$username
adduser $username
cp -a /etc/skel/. /home/$username
chown -R $username:$username /home/$username
usermod -a -G audio,cdrom,dip,floppy,netdev,plugdev,sudo,video $username


If you installed SSH earlier, revert the temporary change::

vi /etc/ssh/sshd_config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remain sudo as in other parts of this section

Suggested change
vi /etc/ssh/sshd_config
sudo vi /etc/ssh/sshd_config

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't do this anywhere else in the tutorial though, so that's a bit strange.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be a copy-paste from Ubuntu how-tos. Another way is to remove sudo entirely from this section, I'm ok with both ways for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think i would favor that... but let's not make perfection the enemy of good here. :)

vi /etc/ssh/sshd_config
# Remove: PermitRootLogin yes

systemctl restart ssh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Suggested change
systemctl restart ssh
sudo systemctl restart ssh

@faxm0dem
Copy link

Thanks for working on this !

@gmelikov
Copy link
Member

Merged as b81a471 with my suggestions. Thank you everybody for participation, sorry for long delay!

@gmelikov gmelikov closed this Dec 11, 2021
@rlaager rlaager reopened this Dec 12, 2021
@rlaager rlaager closed this in c2ecfb8 Dec 12, 2021
@gratuxri gratuxri deleted the bullseye branch December 16, 2021 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants