Diskussion:Install-Party/Linux Mint Debian Edition: Unterschied zwischen den Versionen

Aus Wiki StuRa HTW Dresden
Zur Navigation springen Zur Suche springen
Zeile 295: Zeile 295:


==== LMDE 6 OpenZFS Vorbereitung ====
==== LMDE 6 OpenZFS Vorbereitung ====
----


mit dem Internet verbinden
mit dem Internet verbinden
Zeile 332: Zeile 329:


: <code>ssh mint@321.321.321.321</code>
: <code>ssh mint@321.321.321.321</code>
<pre>
<pre></pre>
</pre>


----
----
Zeile 345: Zeile 341:
<pre></pre>
<pre></pre>


: <code>gsettings get org.gnome.desktop.media-handling automount</code>
<pre>
true
</pre>
: <code>gsettings set org.gnome.desktop.media-handling automount false</code>
: <code>gsettings set org.gnome.desktop.media-handling automount false</code>
<pre>
<pre>
</pre>
</pre>


: <code>apt -y install debootstrap gdisk zfsutils-linux</code>
: <s><code>apt -y install debootstrap gdisk zfsutils-linux</code></s>
: <code>apt -y install gdisk zfsutils-linux</code>
<pre>
<pre>
</pre>
</pre>
Zeile 377: Zeile 378:
</pre>
</pre>


 
: <code>DISK0=/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R</code>
: <code>DISK1=/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R</code>
: <code>DISK1=/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M</code>
: <code>DISK2=/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M</code>


: <code>swapoff -a</code>
: <code>swapoff -a</code>
Zeile 389: Zeile 389:
</pre>
</pre>


 
: <code>sudo wipefs -a $DISK0</code>
: <code>sudo wipefs -a $DISK1</code>
<pre>
<pre>
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
Zeile 397: Zeile 396:
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: calling ioctl to re-read partition table: Success
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: calling ioctl to re-read partition table: Success
</pre>
</pre>
: <code>sudo wipefs -a $DISK2</code>
: <code>sudo wipefs -a $DISK1</code>
<pre>
<pre>
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
Zeile 405: Zeile 404:
</pre>
</pre>


: <code>sudo blkdiscard -f $DISK1</code>
: <code>sudo blkdiscard -f $DISK0</code>
<pre>
<pre>
blkdiscard: Operation forced, data will be lost!
blkdiscard: Operation forced, data will be lost!
</pre>
</pre>
: <code>sudo blkdiscard -f $DISK2</code>
: <code>sudo blkdiscard -f $DISK1</code>
<pre>
<pre>
blkdiscard: Operation forced, data will be lost!
blkdiscard: Operation forced, data will be lost!
</pre>
</pre>


: <code>sudo sgdisk --zap-all $DISK1</code>
: <code>sudo sgdisk --zap-all $DISK0</code>
<pre>
<pre>
Creating new GPT entries in memory.
Creating new GPT entries in memory.
Zeile 420: Zeile 419:
other utilities.
other utilities.
</pre>
</pre>
: <code>sudo sgdisk --zap-all $DISK2</code>
: <code>sudo sgdisk --zap-all $DISK1</code>
<pre>
<pre>
Creating new GPT entries in memory.
Creating new GPT entries in memory.
Zeile 427: Zeile 426:
</pre>
</pre>


: <code>sudo sgdisk -n2:1M:+512M -t2:EF00 $DISK1</code>
: <code>sudo sgdisk -n2:1M:+512M -t2:EF00 $DISK0</code>
<pre>
<pre>
Creating new GPT entries in memory.
Creating new GPT entries in memory.
The operation has completed successfully.
The operation has completed successfully.
</pre>
</pre>
: <code>sudo sgdisk -n2:1M:+512M -t2:EF00 $DISK2</code>
: <code>sudo sgdisk -n2:1M:+512M -t2:EF00 $DISK1</code>
<pre>
<pre>
Creating new GPT entries in memory.
Creating new GPT entries in memory.
Zeile 438: Zeile 437:
</pre>
</pre>


: <code>sudo sgdisk -n3:0:+1G -t3:BF01 $DISK1</code>
: <code>sudo sgdisk -n3:0:+1G -t3:BF01 $DISK0</code>
<pre>
<pre>
The operation has completed successfully.
The operation has completed successfully.
</pre>
</pre>
: <code>sudo sgdisk -n3:0:+1G -t3:BF01 $DISK2</code>
: <code>sudo sgdisk -n3:0:+1G -t3:BF01 $DISK1</code>
<pre>
<pre>
The operation has completed successfully.
The operation has completed successfully.
</pre>
</pre>


: <code>sudo sgdisk -n4:0:0 -t4:BF00 $DISK1</code>
: <code>sudo sgdisk -n4:0:0 -t4:BF00 $DISK0</code>
<pre>
<pre>
The operation has completed successfully.
The operation has completed successfully.
</pre>
</pre>
: <code>sudo sgdisk -n4:0:0 -t4:BF00 $DISK2</code>
: <code>sudo sgdisk -n4:0:0 -t4:BF00 $DISK1</code>
<pre>
<pre>
The operation has completed successfully.
The operation has completed successfully.
Zeile 472: Zeile 471:
     -O mountpoint=/boot -R /mnt \
     -O mountpoint=/boot -R /mnt \
     bpool mirror \
     bpool mirror \
     ${DISK1}-part3 \
     ${DISK0}-part3 \
     ${DISK2}-part3
     ${DISK1}-part3
</pre>
</pre>
</code>
</code>
Zeile 496: Zeile 495:
     -O mountpoint=/ -R /mnt \
     -O mountpoint=/ -R /mnt \
     rpool mirror \
     rpool mirror \
     ${DISK1}-part4 \
     ${DISK0}-part4 \
     ${DISK2}-part4
     ${DISK1}-part4
</pre>
</pre>
</code>
</code>
Zeile 534: Zeile 533:
: <code>sudo zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker</code>
: <code>sudo zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker</code>


: <code>sudo zfs create rpool/var/snap</code>
: <s><code>sudo zfs create rpool/var/snap</code></s>
: <code>sudo zfs create rpool/var/lib/flatpak</code>


: <code>sudo zfs create rpool/var/www</code>
: <s><code>sudo zfs create rpool/var/www</code></s>


: <code>sudo zfs create -o com.sun:auto-snapshot=false  rpool/tmp</code>
: <code>sudo zfs create -o com.sun:auto-snapshot=false  rpool/tmp</code>
: <code>sudo chmod 1777 /mnt/tmp</code>
: <code>sudo chmod 1777 /mnt/tmp</code>
<!--
 
<pre>
cannot create 'rpool/ROOT': dataset already exists
cannot create 'rpool/ROOT': dataset already exists
cannot create 'bpool/BOOT': dataset already exists
cannot create 'bpool/BOOT': dataset already exists
Zeile 546: Zeile 547:
cannot mount 'rpool/ROOT/debian': filesystem already mounted
cannot mount 'rpool/ROOT/debian': filesystem already mounted
cannot create 'bpool/BOOT/debian': dataset already exists
cannot create 'bpool/BOOT/debian': dataset already exists
mint@mint:~$ sudo zfs create -o canmount=off -o mountpoint=none rpool/ROOT
</pre>
 
: <code>sudo zfs create -o canmount=off -o mountpoint=none rpool/ROOT</code>
<pre>
cannot create 'rpool/ROOT': dataset already exists
cannot create 'rpool/ROOT': dataset already exists
mint@mint:~$ mkdir /mnt/run
</pre>
mkdir: cannot create directory ‘/mnt/run’: Permission denied
 
mint@mint:~$ sudo mkdir /mnt/run
: <code>sudo mkdir /mnt/run</code>
mint@mint:~$ sudo mount -t tmpfs tmpfs /mnt/run
: <code>sudo mount -t tmpfs tmpfs /mnt/run</code>
mint@mint:~$ mkdir /mnt/run/lock
 
mint@mint:~$ sudo debootstrap bookworm /mnt/
: <code>mkdir /mnt/run/lock</code>
 
: <s><code>sudo debootstrap bookworm /mnt/</code></s>
<pre>
I: Target architecture can be executed
I: Target architecture can be executed
I: Retrieving InRelease  
I: Retrieving InRelease  
Zeile 563: Zeile 570:
I: Resolving dependencies of base packages...
I: Resolving dependencies of base packages...
^CE: Interrupt caught ... exiting
^CE: Interrupt caught ... exiting
</pre>


==== LMDE 6 OpenZFS Installation LMDE GUI I ====
==== LMDE 6 OpenZFS Installation LMDE GUI I ====


mint@mint:~$ mint
: <code>sudo ls /mnt/</code>
mintbackup                  mint-iso-verify              mint-remove-application      mintupdate-cli
<pre>
mintBackup                  mintlocale                  mintreport                  mintupdate-launcher
mint-drivers                mintlocale-im                mintreport-tray              mintupdate-tool
mintinstall                  mintmenu                    mintsources                  mintwelcome
mintinstall-fp-handler      mint-refresh-cache          mintstick                    mintwelcome-launcher
mintinstall-remove-app      mint-release-upgrade        mintupdate                  mint-xfce-delete
mintinstall-update-pkgcache  mint-release-upgrade-root    mintupdate-automation       
mint@mint:~$ mint
mintbackup                  mint-iso-verify              mint-remove-application      mintupdate-cli
mintBackup                  mintlocale                  mintreport                  mintupdate-launcher
mint-drivers                mintlocale-im                mintreport-tray              mintupdate-tool
mintinstall                  mintmenu                    mintsources                  mintwelcome
mintinstall-fp-handler      mint-refresh-cache          mintstick                    mintwelcome-launcher
mintinstall-remove-app      mint-release-upgrade        mintupdate                  mint-xfce-delete
mintinstall-update-pkgcache  mint-release-upgrade-root    mintupdate-automation       
mint@mint:~$ man mintinstall
No manual entry for mintinstall
mint@mint:~$ sudo ls /mnt/
boot  debootstrap  home  root  run  srv  tmp  usr  var
boot  debootstrap  home  root  run  srv  tmp  usr  var
mint@mint:~$ sudo rm -rf /mnt/
</pre>
 
: <code>sudo rm -rf /mnt/</code>
<pre>
rm: cannot remove '/mnt/srv': Device or resource busy
rm: cannot remove '/mnt/srv': Device or resource busy
rm: cannot remove '/mnt/tmp': Device or resource busy
rm: cannot remove '/mnt/tmp': Device or resource busy
Zeile 604: Zeile 598:
rm: cannot remove '/mnt/usr/local': Device or resource busy
rm: cannot remove '/mnt/usr/local': Device or resource busy
rm: cannot remove '/mnt/home': Device or resource busy
rm: cannot remove '/mnt/home': Device or resource busy
mint@mint:~$ sudo ls /mnt/
</pre>
boot  home  root  run  srv  tmp  usr  var
 
mint@mint:~$ ln -s /target /mnt/
: <code>sudo ln -s /mnt /target</code>
ln: failed to create symbolic link '/mnt/target': Permission denied
 
mint@mint:~$ sudo ln -s /target /mnt/
: <code>ls /boot/</code>
mint@mint:~$ ln -s /mnt /target
<pre>
ln: failed to create symbolic link '/target': Permission denied
mint@mint:~$ sudo ln -s /mnt /target
mint@mint:~$ ls /boot/
config-6.1.0-12-amd64  grub  initrd.img-6.1.0-12-amd64  System.map-6.1.0-12-amd64  vmlinuz-6.1.0-12-amd64
config-6.1.0-12-amd64  grub  initrd.img-6.1.0-12-amd64  System.map-6.1.0-12-amd64  vmlinuz-6.1.0-12-amd64
mint@mint:~$ ls /boot/
</pre>
config-6.1.0-12-amd64  grub  initrd.img-6.1.0-12-amd64  System.map-6.1.0-12-amd64  vmlinuz-6.1.0-12-amd64
 
mint@mint:~$ ls /mnt/
: <code>ls /mnt/</pre>
<pre>
bin/            home/          lib32/          mnt/            run/            target/        vmlinuz         
bin/            home/          lib32/          mnt/            run/            target/        vmlinuz         
boot/          initrd.img      lib64/          opt/            sbin/          tmp/            vmlinuz.old     
boot/          initrd.img      lib64/          opt/            sbin/          tmp/            vmlinuz.old     
dev/            initrd.img.old  libx32/        proc/          srv/            usr/             
dev/            initrd.img.old  libx32/        proc/          srv/            usr/             
etc/            lib/            media/          root/          sys/            var/             
etc/            lib/            media/          root/          sys/            var/             
mint@mint:~$ ls /mnt/home/
</pre>
 
: <code>ls /mnt/home/</code>
<pre>
vater
vater
mint@mint:~$ ls /target
</pre>
 
: <code>ls /target</code>
<pre>
bin  dev  home        initrd.img.old  lib32  libx32  mnt  proc  run  srv  target  usr  vmlinuz
bin  dev  home        initrd.img.old  lib32  libx32  mnt  proc  run  srv  target  usr  vmlinuz
boot  etc  initrd.img  lib            lib64  media  opt  root  sbin  sys  tmp    var  vmlinuz.old
boot  etc  initrd.img  lib            lib64  media  opt  root  sbin  sys  tmp    var  vmlinuz.old
mint@mint:~$ ls /target/b
</pre>
bin/  boot/
 
mint@mint:~$ ls /target/b
: <code>ls /target/boot/</code>
bin/  boot/  
<pre>
mint@mint:~$ ls /target/b
bin/  boot/  
mint@mint:~$ ls /target/boot/
config-6.1.0-12-amd64  grub  initrd.img-6.1.0-12-amd64  System.map-6.1.0-12-amd64  vmlinuz-6.1.0-12-amd64
config-6.1.0-12-amd64  grub  initrd.img-6.1.0-12-amd64  System.map-6.1.0-12-amd64  vmlinuz-6.1.0-12-amd64
mint@mint:~$ ls /target/etc/
</pre>
 
: <code>ls /target/etc/</code>
<pre>
Display all 240 possibilities? (y or n)
Display all 240 possibilities? (y or n)
mint@mint:~$ sudo mkdir /mnt/etc/zfs
</pre>
mint@mint:~$ cp /etc/zfs/zpool.cache /mnt/etc/zfs/
 
cp: cannot create regular file '/mnt/etc/zfs/zpool.cache': Permission denied
: <code>sudo mkdir /mnt/etc/zfs</code>
mint@mint:~$ sudo cp /etc/zfs/zpool.cache /mnt/etc/zfs/
: <code>sudo cp /etc/zfs/zpool.cache /mnt/etc/zfs/</code>
mint@mint:~$ cat /mnt/etc/hostname  
 
: <code>cat /mnt/etc/hostname</code>
<pre>
localhost.localdomain
localhost.localdomain
mint@mint:~$ hostname lab
</pre>
hostname: you must be root to change the host name
 
mint@mint:~$ sudo hostname lab
: <code>sudo hostname lab</code>
mint@mint:~$ sudo hostname > /mnt/etc/hostname
 
-bash: /mnt/etc/hostname: Permission denied
: <code>sudo nano /mnt/etc/hostname</code>
mint@mint:~$ sudo nano /mnt/etc/hostname
 
<!--
mint@mint:~$ ip addr show  
mint@mint:~$ ip addr show  
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
Zeile 684: Zeile 685:


deb https://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
deb https://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
mint@mint:~$ sudo mount --make-private --rbind /dev  /mnt/dev
-->
mint@mint:~$ sudo mount --make-private --rbind /proc /mnt/proc
 
mint@mint:~$ sudo mount --make-private --rbind /sys  /mnt/sys
: <code>sudo mount --make-private --rbind /dev  /mnt/dev</code>
mint@mint:~$ chroot /mnt /usr/bin/env DISK=$DISK1 bash --login
: <code>sudo mount --make-private --rbind /proc /mnt/proc</code>
chroot: cannot change root directory to '/mnt': Operation not permitted
: <code>sudo mount --make-private --rbind /sys  /mnt/sys</code>
mint@mint:~$ sudo chroot /mnt /usr/bin/env DISK1=$DISK1 bash --login
: <code>sudo chroot /mnt /usr/bin/env DISK0=$DISK0 bash --login</code>
: <s><code>sudo chroot /mnt /usr/bin/env DISK1=$DISK1 bash --login</code></s>


----
----
Zeile 751: Zeile 753:
: <code>apt install --yes zfs-initramfs</code>
: <code>apt install --yes zfs-initramfs</code>
<pre></pre>
<pre></pre>
-->


: <code>apt search systemd-timesyncd</code>
: <code>apt search systemd-timesyncd</code>

Version vom 29. Mai 2024, 17:19 Uhr

Installation mit Verschlüsselung

Fail!
LMDE 3 meets https://gitlab.com/pepa65/lmdescrypt/raw/master/lmdescrypt ?

(default) disk layout

Calamares meets Btrfs

(nach der manuellen Partitionierung und) Angabe beim Programm für die Installation

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=8f303b38-b7e7-4781-aa8e-f1559b5504d2 /boot          ext4    defaults,noatime 0 2
UUID=33436381-7031-48be-8785-a48061fcabd7 /              btrfs   subvol=@,defaults,noatime,space_cache,autodefrag 0 1
UUID=33436381-7031-48be-8785-a48061fcabd7 /home          btrfs   subvol=@home,defaults,noatime,space_cache,autodefrag 0 2
UUID=641494b3-d3a2-4c57-b022-cba4d00603f5 swap           swap    defaults,noatime 0 2
cat /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=641494b3-d3a2-4c57-b022-cba4d00603f5"

cat /etc/crypttab
# /etc/crypttab: mappings for encrypted partitions.
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# See crypttab(5) for the supported syntax.
#
# NOTE: Do not list your root (/) partition here, it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies
#       to encrypted swap, which should be set up with mkinitcpio-openswap
#       for resume support.
#
# <name>               <device>                         <password> <options>

btrfs meets luks

cat /etc/fstab
####vb
/dev/sda1               /boot   btrfs   defaults,errors=remount-ro      0    1
/dev/mapper/vg-lv--swap none    swap    sw                              0    0
/dev/mapper/vg-lv--root /       btrfs   defaults,errors=remount-ro      0    1
/dev/mapper/vg-lv--home /home   btrfs   defaults,compress=lzo           0    1
####ve
# UNCONFIGURED FSTAB FOR BASE SYSTEM
proc    /proc   proc    defaults        0       0
cat /etc/crypttab
####vb
k-ot    UUID=8765dcba-ab12-cd34-ef56-123456abcdef       none    luks
####ve

https://www.howtoforge.com/a-beginners-guide-to-btrfs

cat /etc/default/grub

####vb
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash kopt=root=/dev/mapper/vg-lv--root"
####ve

sbin fehlt beim PATH

dpkg -i linux-UFRII-drv-v500-de/64-bit_Driver/Debian/cnrdrvcups-ufr2-uk_5.00-1_amd64.deb

Beachten Sie: PATH von root sollte normalerweise /usr/local/sbin, /usr/sbin und /sbin enthalten
export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin

LMDE 4 mit verschlüsselten Massenspeicher und btrfs subvolumes (möglichst noch als mirror von 2 Geräten für Massenspeicher)

LMDE 6 "anderes Dateisystem"

Vorkenntnisse vor LMDE 6

website:members/PaulRiegel/os/lmde/installation-lmde-3-mit-verschluesslung

Untersuchung Installation LMDE 6

standardmäßige Installation mit Verschlüsselung ext4 LMDE 6
nach dem Neustart in die Installation
cat /etc/crypttab
# <target name>	<source device>		<key file>	<options>
lvmlmde   UUID=3c96337f-bb08-4f9d-ba25-fe5d23afd680   none   luks,discard,tries=3
cat /etc/fstab
#### Static Filesystem Table File
proc	/proc	proc	defaults	0	0
# /dev/mapper/lvmlmde-root
UUID=ba9df8e4-a4fb-42f6-b3ef-682d8c3edd95 /  ext4 defaults 0 1
# /dev/mapper/lvmlmde-swap
UUID=9e412642-d11a-40f2-9c59-03f9a51f5e28 none   swap sw 0 0
# /dev/sda2
UUID=22a7ba7f-0999-43d8-90f2-34c85af6f167 /boot  ext4 defaults 0 1
# /dev/sda1
UUID=C002-8E9D /boot/efi  vfat defaults 0 1
cat /etc/default/grub.d/61_live-installer.cfg
#! /bin/sh
set -e

GRUB_CMDLINE_LINUX="cryptdevice=UUID=3c96337f-bb08-4f9d-ba25-fe5d23afd680:lvmlmde root=/dev/mapper/lvmlmde-root resume=/dev/mapper/lvmlmde-swap"
standardmäßige Installation ohne Verschlüsselung btrfs LMDE 6
während der Installation
mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3743316k,nr_inodes=935829,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=757356k,mode=755,inode64)
/dev/sdb1 on /run/live/medium type iso9660 (ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
/dev/loop0 on /run/live/rootfs/filesystem.squashfs type squashfs (ro,noatime,errors=continue)
tmpfs on /run/live/overlay type tmpfs (rw,noatime,mode=755,inode64)
overlay on / type overlay (rw,noatime,lowerdir=/run/live/rootfs/filesystem.squashfs/,upperdir=/run/live/overlay/rw,workdir=/run/live/overlay/work,redirect_dir=on)
tmpfs on /usr/lib/live/mount type tmpfs (rw,nosuid,nodev,noexec,relatime,size=757356k,mode=755,inode64)
/dev/sdb1 on /usr/lib/live/mount/medium type iso9660 (ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
/dev/loop0 on /usr/lib/live/mount/rootfs/filesystem.squashfs type squashfs (ro,noatime,errors=continue)
tmpfs on /usr/lib/live/mount/overlay type tmpfs (rw,noatime,mode=755,inode64)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12771)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,inode64)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=757356k,nr_inodes=189339,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/loop0 on /source type squashfs (ro,relatime,errors=continue)
/dev/sda3 on /target type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=256,subvol=/@)
/dev/sda3 on /target/home type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=257,subvol=/@home)
/dev/sda2 on /target/boot type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=5,subvol=/)
nach dem Neustart in die Installation
cat /etc/crypttab
# <target name>	<source device>		<key file>	<options>
cat /etc/fstab
#### Static Filesystem Table File
proc	/proc	proc	defaults	0	0
# /dev/sda3
UUID=b84bec73-29b9-4e62-a830-5069650680af	/	btrfs	defaults,subvol=@	00
UUID=b84bec73-29b9-4e62-a830-5069650680af	/home	btrfs	defaults,subvol=@home	0	0
# /dev/sda2
UUID=dea84151-1736-439a-8127-a45f2a7feb75	/boot	btrfs	defaults	0	0
# /dev/sda1
UUID=FDD2-C26F	/boot/efi	vfat	defaults	0	1
cat /etc/default/grub.d/61_live-installer.cfg

Erarbeitung Verschlüsslung und btrfs

https://forums.linuxmint.com/viewtopic.php?t=100659

meets

https://linuxmint.com/rel_faye.php

sudo live-installer-expert-mode

/target ist die das gewünschte Ziel! Alles Nachfolgende wird aber noch mit /mnt/target angegeben.

sudo mkdir /mnt/target
sudo mount -o subvol=@ /dev/mapper/lvmlmde-root /mnt/target
sudo mkdir /mnt/target/home
sudo mount -o subvol=home /dev/mapper/lvmlmde-root /mnt/target/home
sudo rsync -avz /run/live/medium/casper/filesystem.squashfs/ /mnt/target/
/dev/loop0
sudo mkdir /mnt/target/dev
sudo mount --bind /dev /mnt/target/dev
sudo mkdir /dev/pts /mnt/target/dev/pts
sudo mount --bind /dev/pts /mnt/target/dev/pts
sudo mkdir /mnt/target/dev/shm
sudo mount --bind /dev/shm /mnt/target/dev/shm
sudo mkdir /mnt/target/proc
sudo mount --bind /proc /mnt/target/proc
sudo mkdir /mnt/target/sys
sudo mount --bind /sys /mnt/target/sys
sudo mkdir /mnt/target/tmp
sudo mount --bind /tmp /mnt/target/tmp
sudo mkdir /mnt/target/
cp -f /etc/resolv.conf /mnt/target/etc/resolv.conf
chroot /mnt/target

Installation Debian

und dann Wechsel zu LMDE

https://forums.linuxmint.com/viewtopic.php?t=404823

(bevorzugte) Verwendung von zram aktivieren

Bei einer standardmäßigen Installation (ohne Verschlüsselung) mit btrfs wird anscheinend keine Partition (und keine Datei) für SWAP erstellt. (Gut! Stattdessen kann - zeitgemäßer - zram verwendet werden.)

apt install zram-tools

systemctl status zramswap.service

systemctl is-enabled zramswap.service
enabled
systemctl is-active zramswap.service
active

LMDE 6 meets OpenZFS

LMDE 6 OpenZFS Annahmen

Verwendung mehrerer Geräte für Massenspeicher
nicht notwendig

Für einen hohen Ansprch, soll die Konfiguration 2 Geräte für Massenspeicher vorsehen, um darzustellen, dass ein (nahezu) beliebiger Verbund an Geräte für Massenspeicher verwendet werden kann.

Deaktivierung Secure Boot

in der Verwaltung vom Gerät wikipedia:de:Unified Extensible Firmware Interface#Secure Boot deaktivieren

wegen der nachträglichen Installation ist der Schlüssel für das Modul für den Kernel für ZFS nicht valide, weswegen das Modul nicht benutzt werden kann
sudo modprobe zfs
modprobe: ERROR: could not insert 'zfs': Key was rejected by service


LMDE 6 OpenZFS Vorbereitung

mit dem Internet verbinden


whoami
mint
uname -a
Linux mint 6.1.0-12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 (2023-09-07) x86_64 GNU/Linux

LMDE 6 OpenZFS Einrichtung Umgebung Installation

apt update

sudo apt -y install ssh

sudo systemctl status ssh

Ersetzen vom nicht gesetzen Passwort

passwd

ip a


ssh mint@321.321.321.321


sudo nano /etc/apt/sources.list
#/etc/apt/sources.list
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
apt update

gsettings get org.gnome.desktop.media-handling automount
true
gsettings set org.gnome.desktop.media-handling automount false

apt -y install debootstrap gdisk zfsutils-linux
apt -y install gdisk zfsutils-linux

LMDE 6 OpenZFS Einrichtung Geräte für Massenspeicher

ls -la /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root   9 May 28 23:25 ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R -> ../../sda
lrwxrwxrwx 1 root root   9 May 28 23:25 ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M -> ../../sdb
lrwxrwxrwx 1 root root   9 May 28 23:25 usb-Kingston_DataTraveler_3.0_4CEDFB74A418B320F9950BCC-0:0 -> ../../sdc
lrwxrwxrwx 1 root root  10 May 28 23:25 usb-Kingston_DataTraveler_3.0_4CEDFB74A418B320F9950BCC-0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  10 May 28 23:25 usb-Kingston_DataTraveler_3.0_4CEDFB74A418B320F9950BCC-0:0-part2 -> ../../sdc2
lrwxrwxrwx 1 root root   9 May 28 23:25 wwn-0x5002538d41306eb7 -> ../../sdb
lrwxrwxrwx 1 root root   9 May 28 23:25 wwn-0x5002538d702e43f9 -> ../../sda
DISK0=/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R
DISK1=/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M
swapoff -a
cat /proc/mdstat
Personalities : 
unused devices: <none>
sudo wipefs -a $DISK0
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: 8 bytes were erased at offset 0x7470c05e00 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R: calling ioctl to re-read partition table: Success
sudo wipefs -a $DISK1
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M: 8 bytes were erased at offset 0x7470c05e00 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M: calling ioctl to re-read partition table: Success
sudo blkdiscard -f $DISK0
blkdiscard: Operation forced, data will be lost!
sudo blkdiscard -f $DISK1
blkdiscard: Operation forced, data will be lost!
sudo sgdisk --zap-all $DISK0
Creating new GPT entries in memory.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
sudo sgdisk --zap-all $DISK1
Creating new GPT entries in memory.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
sudo sgdisk -n2:1M:+512M -t2:EF00 $DISK0
Creating new GPT entries in memory.
The operation has completed successfully.
sudo sgdisk -n2:1M:+512M -t2:EF00 $DISK1
Creating new GPT entries in memory.
The operation has completed successfully.
sudo sgdisk -n3:0:+1G -t3:BF01 $DISK0
The operation has completed successfully.
sudo sgdisk -n3:0:+1G -t3:BF01 $DISK1
The operation has completed successfully.
sudo sgdisk -n4:0:0 -t4:BF00 $DISK0
The operation has completed successfully.
sudo sgdisk -n4:0:0 -t4:BF00 $DISK1
The operation has completed successfully.
sudo zpool create \
    -o compatibility=grub2 \
    -o ashift=12 \
    -o autotrim=on \
    -o cachefile=/etc/zfs/zpool.cache \
    -O devices=off \
    -O acltype=posixacl\
    -O xattr=sa \
    -O compression=lz4 \
    -O normalization=formD \
    -O relatime=on \
    -O canmount=off \
    -O mountpoint=/boot -R /mnt \
    bpool mirror \
    ${DISK0}-part3 \
    ${DISK1}-part3


zpool create \
    -O keylocation=prompt \
    -O keyformat=passphrase \
    -o ashift=12 \
    -o autotrim=on \
    -O encryption=on \
    -O acltype=posixacl \
    -O xattr=sa \
    -O dnodesize=auto \
    -O compression=lz4 \
    -O normalization=formD \
    -O relatime=on \
    -O canmount=off \
    -O mountpoint=/ -R /mnt \
    rpool mirror \
    ${DISK0}-part4 \
    ${DISK1}-part4


sudo zfs create -o canmount=off -o mountpoint=none rpool/ROOT
sudo zfs create -o canmount=off -o mountpoint=none bpool/BOOT
sudo zfs create -o canmount=noauto -o mountpoint=/ rpool/ROOT/debian
sudo zfs mount rpool/ROOT/debian
sudo zfs create -o mountpoint=/boot bpool/BOOT/debian
sudo zfs create rpool/home
sudo zfs create -o mountpoint=/root rpool/home/root
sudo chmod 700 /mnt/root
sudo zfs create -o canmount=off rpool/var
sudo zfs create -o canmount=off rpool/var/lib
sudo zfs create rpool/var/log
sudo zfs create rpool/var/spool
sudo zfs create -o com.sun:auto-snapshot=false rpool/var/cache
sudo zfs create -o com.sun:auto-snapshot=false rpool/var/lib/nfs
sudo zfs create -o com.sun:auto-snapshot=false rpool/var/tmp
sudo chmod 1777 /mnt/var/tmp
sudo zfs create rpool/srv
sudo zfs create -o canmount=off rpool/usr
sudo zfs create rpool/usr/local
sudo zfs create rpool/var/lib/AccountsService
sudo zfs create rpool/var/lib/NetworkManager
sudo zfs create -o com.sun:auto-snapshot=false rpool/var/lib/docker
sudo zfs create rpool/var/snap
sudo zfs create rpool/var/lib/flatpak
sudo zfs create rpool/var/www
sudo zfs create -o com.sun:auto-snapshot=false rpool/tmp
sudo chmod 1777 /mnt/tmp
cannot create 'rpool/ROOT': dataset already exists
cannot create 'bpool/BOOT': dataset already exists
cannot create 'rpool/ROOT/debian': dataset already exists
cannot mount 'rpool/ROOT/debian': filesystem already mounted
cannot create 'bpool/BOOT/debian': dataset already exists
sudo zfs create -o canmount=off -o mountpoint=none rpool/ROOT
cannot create 'rpool/ROOT': dataset already exists
sudo mkdir /mnt/run
sudo mount -t tmpfs tmpfs /mnt/run
mkdir /mnt/run/lock
sudo debootstrap bookworm /mnt/
I: Target architecture can be executed
I: Retrieving InRelease 
I: Checking Release signature
I: Valid Release signature (key id 4D64FEC119C2029067D6E791F8D2585B8783D481)
I: Retrieving Packages 
I: Validating Packages 
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
^CE: Interrupt caught ... exiting

LMDE 6 OpenZFS Installation LMDE GUI I

sudo ls /mnt/
boot  debootstrap  home  root  run  srv  tmp  usr  var
sudo rm -rf /mnt/
rm: cannot remove '/mnt/srv': Device or resource busy
rm: cannot remove '/mnt/tmp': Device or resource busy
rm: cannot remove '/mnt/root': Device or resource busy
rm: cannot remove '/mnt/boot': Device or resource busy
rm: cannot remove '/mnt/var/log': Device or resource busy
rm: cannot remove '/mnt/var/tmp': Device or resource busy
rm: cannot remove '/mnt/var/www': Device or resource busy
rm: cannot remove '/mnt/var/snap': Device or resource busy
rm: cannot remove '/mnt/var/lib/NetworkManager': Device or resource busy
rm: cannot remove '/mnt/var/lib/AccountsService': Device or resource busy
rm: cannot remove '/mnt/var/lib/docker': Device or resource busy
rm: cannot remove '/mnt/var/lib/nfs': Device or resource busy
rm: cannot remove '/mnt/var/spool': Device or resource busy
rm: cannot remove '/mnt/var/cache': Device or resource busy
rm: cannot remove '/mnt/run': Device or resource busy
rm: cannot remove '/mnt/usr/local': Device or resource busy
rm: cannot remove '/mnt/home': Device or resource busy
sudo ln -s /mnt /target
ls /boot/
config-6.1.0-12-amd64  grub  initrd.img-6.1.0-12-amd64  System.map-6.1.0-12-amd64  vmlinuz-6.1.0-12-amd64
ls /mnt/
bin/            home/           lib32/          mnt/            run/            target/         vmlinuz         
boot/           initrd.img      lib64/          opt/            sbin/           tmp/            vmlinuz.old     
dev/            initrd.img.old  libx32/         proc/           srv/            usr/            
etc/            lib/            media/          root/           sys/            var/            
ls /mnt/home/
vater
ls /target
bin   dev  home        initrd.img.old  lib32  libx32  mnt  proc  run   srv  target  usr  vmlinuz
boot  etc  initrd.img  lib             lib64  media   opt  root  sbin  sys  tmp     var  vmlinuz.old
ls /target/boot/
config-6.1.0-12-amd64  grub  initrd.img-6.1.0-12-amd64  System.map-6.1.0-12-amd64  vmlinuz-6.1.0-12-amd64
ls /target/etc/
Display all 240 possibilities? (y or n)
sudo mkdir /mnt/etc/zfs
sudo cp /etc/zfs/zpool.cache /mnt/etc/zfs/
cat /mnt/etc/hostname
localhost.localdomain
sudo hostname lab
sudo nano /mnt/etc/hostname


sudo mount --make-private --rbind /dev /mnt/dev
sudo mount --make-private --rbind /proc /mnt/proc
sudo mount --make-private --rbind /sys /mnt/sys
sudo chroot /mnt /usr/bin/env DISK0=$DISK0 bash --login
sudo chroot /mnt /usr/bin/env DISK1=$DISK1 bash --login

apt update
apt search console-setup
Warning: Invalid locale (please review locale settings, this might lead to problems later):
  locale::facet::_S_create_c_locale name not valid
i   console-setup                     - console font and keymap setup program       
v   console-setup:i386                -                                             
p   console-setup-freebsd             - FreeBSD specific part of console-setup      
i   console-setup-linux               - Linux specific part of console-setup        
p   console-setup-mini                - console font and keymap setup program - redu
apt install --yes console-setup locales
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
console-setup is already the newest version (1.221).
The following additional packages will be installed:
  libc-bin libc-dev-bin libc-l10n libc6 libc6-dev
Suggested packages:
  glibc-doc libnss-nis libnss-nisplus
Recommended packages:
  libc-devtools
The following packages will be upgraded:
  libc-bin libc-dev-bin libc-l10n libc6 libc6-dev locales
dpkg-reconfigure locales tzdata keyboard-configuration console-setup
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
Current default time zone: 'Etc/UTC'
apt -y install dpkg-dev linux-headers-generic linux-image-generic
apt install --yes zfs-initramfs
apt search systemd-timesyncd
i   systemd-timesyncd                 - minimalistic service to synchronize local ti
p   systemd-timesyncd:i386            - minimalistic service to synchronize local ti
apt search dosfstools
i   dosfstools                        - utilities for making and checking MS-DOS FAT
p   dosfstools:i386                   - utilities for making and checking MS-DOS FAT
</code>

: <code>nano /etc/fstab</code>
<pre>
#### Static Filesystem Table File
proc    /proc   proc    defaults        0       0
mkdosfs -F 32 -s 1 -n EFI ${DISK1}-part2
mkfs.fat 4.2 (2021-01-31)
mkdir /boot/efi
echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK1}-part2) \
   /boot/efi vfat defaults 0 0 >> /etc/fstab</code>

cat /etc/fstab
#### Static Filesystem Table File
proc    /proc   proc    defaults        0       0
/dev/disk/by-uuid/A7AA-5E96 /boot/efi vfat defaults 0 0
mount /boot/efi
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.

LMDE 6 OpenZFS Installation LMDE GUI II

LMDE 6 OpenZFS Konfiguration nach dem Neustart nach der Installation LMDE

DISK1=/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R
DISK2=/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M
ls -l $(cat /etc/fstab | grep efi | awk '{print $1}')
lrwxrwxrwx 1 root root 10 May 29 13:09 /dev/disk/by-uuid/A7AA-5E96 -> ../../sdb2
ls -l ${DISK1}-part2
lrwxrwxrwx 1 root root 10 May 29 13:09 /dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R-part2 -> ../../sdb2
ls -l ${DISK2}-part2
lrwxrwxrwx 1 root root 10 May 29 11:52 /dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M-part2 -> ../../sda2
sudo umount /boot/efi
sudo dd if=${DISK1}-part2 of=${DISK2}-part2
1048576+0 records in
1048576+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 9.31548 s, 57.6 MB/s
sudo efibootmgr -c -g -d ${DISK2}-part2 \
    -p 2 -L "lmde-1" -l '\EFI\debian\grubx64.efi'

sudo mount /boot/efi
anderes Schema zu Nummerierung
sudo nano /etc/fstab
#### Static Filesystem Table File
proc    /proc   proc    defaults        0       0
#/dev/disk/by-uuid/A7AA-5E96 /boot/efi vfat defaults 0 0
/dev/disk/by-id/ata-Samsung_SSD_750_EVO_500GB_S363NWAH718728R-part2 /efi0 vfat defaults 0 0
/dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S33DNX0H809148M-part2 /efi1 vfat defaults 0 0
diff /efi0/EFI/debian/grub.cfg /efi1/EFI/debian/grub.cfg
cat /boot/efi/EFI/debian/grub.cfg
search.fs_uuid cb660849086c6abf root hd0,gpt3 hd1,gpt3 
set prefix=($root)'/BOOT/debian@/grub'
configfile $prefix/grub.cfg