Michel Le Cocq 2020-09-11 16:20:25 +02:00
commit 7bef0496f5
5 changed files with 142 additions and 170 deletions

@ -1,78 +0,0 @@
source : [Linsomniac's Articles - Encrypting ZFS on Ubuntu 20.04](https://linsomniac.gitlab.io/post/2020-04-09-ubuntu-2004-encrypted-zfs/)
# encrypt - Unbuntu 20.04 full ZFS install
Here we are going to install Ubuntu 20.04 in **almost** full zfs updating **zsys-setup** to permit **zfs encryption**. Read bellow articles to understand why 2 differerent pools and full implementation.
* [ZFS focus on Ubuntu 20.04 LTS: whats new?](https://didrocks.fr/2020/05/21/zfs-focus-on-ubuntu-20.04-lts-whats-new/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys general presentation](https://didrocks.fr/2020/05/26/zfs-focus-on-ubuntu-20.04-lts-zsys-general-presentation/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys sate management](https://didrocks.fr/2020/05/28/zfs-focus-on-ubuntu-20.04-lts-zsys-general-principle-on-state-management/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys commands for state management](https://didrocks.fr/2020/06/02/zfs-focus-on-ubuntu-20.04-lts-zsys-commands-for-state-management/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys state collection](https://didrocks.fr/2020/06/04/zfs-focus-on-ubuntu-20.04-lts-zsys-state-collection/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys for system administrators](https://didrocks.fr/2020/06/09/zfs-focus-on-ubuntu-20.04-lts-zsys-for-system-administrators/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys partition layout](https://didrocks.fr/2020/06/11/zfs-focus-on-ubuntu-20.04-lts-zsys-partition-layout/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys dataset layout](https://didrocks.fr/2020/06/16/zfs-focus-on-ubuntu-20.04-lts-zsys-dataset-layout/)
* [ZFS focus on Ubuntu 20.04 LTS: ZSys properties on ZFS datasets](https://didrocks.fr/2020/06/19/zfs-focus-on-ubuntu-20.04-lts-zsys-properties-on-zfs-datasets/)
## initial boot and ssh
Boot the Ubuntu 20.04 Desktop installer/live CD.
Click the “Try Ubuntu” button.
launch a terminal.
set a passwd to root to permit remote ssh
~~~
$ sudo su
## passwd
New password :
Retype new passord :
passwd: password updated successfully
~~~
Install ssh to simplfy configuration edit.
~~~
## apt install ssh
~~~
Edit **/etc/ssh/sshd_config** to **Enable PermitRootLogin** change *prohibit-password* to *yes* like bellow.
~~~{.shell}
#PermitRootLogin prohibit-password
PermitRootLogin yes
~~~
~~~
service ssh restart
~~~
find yout IP with : *ip a*
then connect remotely with : *ssh*
## update zsys-setup to enable zfs encyption on rpool
bpool remain unencrypt.
Search for “zpool create”, and make sure you have found the create command that has “rpool” on the last line.
Before the “zpool create” insert: echo MYPASSWORD |
You have to change *MYPASSWORD* for the password you wanted to have.
Before the last line of the command insert these lines:
~~~{.cpp}
-O recordsize=1M \
-O encryption=aes-256-gcm \
-O keylocation=prompt \
-O keyformat=passphrase \
~~~
## swap
you may be interrested if you are on a laptop in : [right fit swap for laptop hibernation Ubuntu 20.04 full ZFS install](right-fit-swap-for-laptop-hibernation-Ubuntu-20.04-full-ZFS-install)
## start installation
Run ubiquity to start the installer and install as normal, selecting “Use entire disk” and the option to use ZFS.
## questions to be solves
* what happen if zpool passwd is not given at boot shutdown ?
* find a way to shut it down pass a delay

98
Xubuntu-UHD-display.md Normal file

@ -0,0 +1,98 @@
## UHD screen
~~~
!!!
https://forum.xfce.org/viewtopic.php?id=13617
a essayer : xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -s 2
xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -s 2
~~~
### taille de police GTK2
to do
### taille des police applis
* inkscape : add official repository : *deb http://ppa.launchpad.net/inkscape.dev/stable/ubuntu focal main* to have last stable release 1.0+r73+1 which support UHD display
* gimp : not completly solve : Menu -> Edition -> Preferences -> Interface -> Icon Theme -> [here at the bottom : choose Custom Icon Size : Hudge]
* spotify : modify menu launche like this : spotify --force-device-scale-factor=1.8 %U
* blender : Menu -> edit -> Prefereences -> Resolution Scale : 1.8
### Changer la taille de police dans les applications Qt sous Xfce
#### source
* [ezvan.fr - Changer la taille de police dans les applications Qt sous Xfce](https://www.ezvan.fr/taille-police-qt.html)
* [wiki.archlinux.org - X resources](https://wiki.archlinux.org/index.php/x_resources)
editer : ~/.Xresources : Ce fichier est utilisé par le serveur X pour configurer ses applications clientes.
~~~{.shell}
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 240
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.autohint: false
Xft.lcdfilter: lcddefault
~~~
Il faut ensuite utiliser la commande xrdb pour appliquer ces paramètres :
~~~{.shell}
$ xrdb -merge ~/.Xresources
~~~
You can add this in your auto-start application list:
~~~
/usr/bin/xrdb -merge /home/nomad/.Xresources
~~~
### console grub ...
Boot menu uses a tiny font (GRUB menu).
Best way to address this would be to have GRUB automatically select the right font, but GRUB is kept small on purpose, or to install a larger GRUB font when installing Ubuntu.
Workaround: let the default GRUB terminal driver, gfxterm, switch to a supported mode such as 1600x1200 (NB to list video modes, disable secure mode in the BIOS and run the videoinfo command in the GRUB shell accessed by pressing "c" from the GRUB menu):
~~~
GRUB_GFXMODE=1280x1024
~~~
~~~
update-grub
~~~
Splash screen uses too small logo and somewhat too small fonts (Plymouth).
Plymouth has logic to detect the proper scaling to apply, but it's still too small; workaround by forcing the scale on the kernel cmdline:
Add to GRUB_CMDLINE_LINUX in /etc/default/grub.
~~~
plymouth.force-scale=3
~~~
~~~
update-grub
~~~
Console terminal uses too small fonts.
Note that the package shipping the Ubuntu Monospace font for the terminal, fonts-ubuntu-console, is not installed by default and only ships 8x16 fonts.
Change the font by running :
~~~
dpkg-reconfigure console-setup
~~~
select a font face that supports a larger font size, for instance the Terminus font, and select a large font size such as 16x32; you need to reboot for the new font to be set.
https://vincent.bernat.ch/fr/blog/2018-double-ecran-4k-linux

40
preseed-ubuntu-zfs.md Normal file

@ -0,0 +1,40 @@
source : [Instalación desatendida de Ubuntu 20.04 sobre OpenZFS](https://elpuig.xeill.net/Members/vcarceler/articulos/instalacion-desatendida-de-ubuntu-20-04-sobre-openzfs)
Traduction Google French :
Script de préparation du disque avec OpenZFS.
Heureusement, il est très pratique que la version de bureau vous permette de tester le système avant de lancer le programme d'installation. De cette façon, il est possible d'explorer le système de fichiers de l'image .iso et de trouver dans / usr / share / ubiquity / zsys-setup le script bash qui s'occupe de la préparation du disque. Ce n'est pas un script court mais il semble faire assez bien son travail.
Là par exemple vous pouvez voir:
- Comment les partitions sont créées selon qu'il s'agit d'un ordinateur avec BIOS (utilisant des partitions étendues) ou UEFI (utilisant des partitions GPT et une partition ESP).
- Comment la partition est définie pour le swap.
- La création des zpools bpool et rpool.
- La création des différents jeux de données.
Options pour le fichier préconfiguré
Mais c'est une chose de savoir quel script le programme d'installation utilise et une autre est de découvrir l'option appropriée dans le fichier préconfiguré pour effectuer une installation sans assistance sur OpenZFS.
Heureusement, Gonzalo Collado a tiré le fil jusqu'à ce qu'il trouve l'option:
~~~
d-i ubiquity/use_zfs boolean true
~~~
Mais l'installateur a également besoin des options de partitionnement habituelles pour considérer qu'il n'y a pas d'erreurs. Ainsi le bloc dédié au partitionnement finit par être:
~~~
# Partitioning
d-i ubiquity/use_zfs boolean true
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i preseed/early_command string umount /media
~~~

@ -110,6 +110,9 @@ Because it's not possible to configure suspend-then-hibernate for Lid close insi
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -n -t bool -s true xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -n -t bool -s true
~~~ ~~~
Be carrefull this setup may be remove if you do some modification in Control Panel.
If you want everything time related, then you can set them with settings in /etc/systemd : **sleep.conf** and **logind.conf** If you want everything time related, then you can set them with settings in /etc/systemd : **sleep.conf** and **logind.conf**
## What is our suspend Hibernate comportement with above configuration ## What is our suspend Hibernate comportement with above configuration

@ -8,101 +8,10 @@
* have to disable Raid ... Enable AHCI * have to disable Raid ... Enable AHCI
* Disable secure boot in bios to permit Hibernate (if you want to use it) * Disable secure boot in bios to permit Hibernate (if you want to use it)
## UHD screen
~~~
!!!
https://forum.xfce.org/viewtopic.php?id=13617
a essayer : xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -s 2
xfconf-query -c xsettings -p /Gdk/WindowScalingFactor -s 2
~~~
### Changer la taille de police dans les applications Qt sous Xfce
* source : [ezvan.fr - Changer la taille de police dans les applications Qt sous Xfce](https://www.ezvan.fr/taille-police-qt.html)
editer : ~/.Xresources : Ce fichier est utilisé par le serveur X pour configurer ses applications clientes.
~~~{.shell}
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 240
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.autohint: false
Xft.lcdfilter: lcddefault
~~~
Il faut ensuite utiliser la commande xrdb pour appliquer ces paramètres :
~~~{.shell}
$ xrdb -merge ~/.Xresources
~~~
### console grub ...
Boot menu uses a tiny font (GRUB menu).
Best way to address this would be to have GRUB automatically select the right font, but GRUB is kept small on purpose, or to install a larger GRUB font when installing Ubuntu.
Workaround: let the default GRUB terminal driver, gfxterm, switch to a supported mode such as 1600x1200 (NB to list video modes, disable secure mode in the BIOS and run the videoinfo command in the GRUB shell accessed by pressing "c" from the GRUB menu):
~~~
GRUB_GFXMODE=1280x1024
~~~
~~~
update-grub
~~~
Splash screen uses too small logo and somewhat too small fonts (Plymouth).
### plymouth boot splash and boot logger
Plymouth has logic to detect the proper scaling to apply, but it's still too small; workaround by forcing the scale on the kernel cmdline:
Add to GRUB_CMDLINE_LINUX in /etc/default/grub.
~~~
plymouth.force-scale=3
~~~
~~~
update-grub
~~~
### Console terminal uses too small fonts.
Note that the package shipping the Ubuntu Monospace font for the terminal, fonts-ubuntu-console, is not installed by default and only ships 8x16 fonts.
Change the font by running :
~~~
dpkg-reconfigure console-setup
~~~
select a font face that supports a larger font size, for instance the Terminus font, and select a large font size such as 16x32; you need to reboot for the new font to be set.
## enable screen rotatation ## enable screen rotatation
~~~ ~~~
apt install iio-sensor-proxy apt install iio-sensor-proxy
~~~ ~~~
install : **[GitHub - ScreenRotator](https://github.com/GuLinux/ScreenRotator)** install : screen rotator : https://github.com/GuLinux/ScreenRotator
### If you use black theme
open : **ScreenRotator/src/resources/scalable/apps/screenrotator/svg** with **inkscape**, select all the paths and use **extensions>color>negative**.
Launch script : **ScreenRotator/src/resources/create_icons**
Reinstall ScreenRotator :
~~~
user@laptop:~/ScreenRotator/build$ sudo make install
~~~