Oggi era il turno di disattivare la partizione swap per passare ad uno swapfile. Vi anticipo che ha funzionato, lo swap funziona come dovrebbe ma all'avvio ho un noioso messaggio che non riesco ad eliminare.
Da qualche parte è rimasto un richiamo alla vecchia partizione swap che non riesco a trovare...

Il mio SO è EndeavourOS, btrfs criptato con luks.
Vi riassumo i passaggi a grandi linee: ho creato il subvolume swap, creato al suo interno lo swapfile.
Codice: Seleziona tutto
sudo btrfs subvolume list -t /
ID gen top level path
-- --- --------- ----
256 38731 5 @_backup_20232408071029627
257 39006 5 @home
258 38966 5 @cache
259 39004 5 @log
260 4226 526 var/lib/portables
261 4226 526 var/lib/machines
264 38848 526 .snapshots
265 4235 264 .snapshots/1/snapshot
526 39006 5 @
625 38731 264 .snapshots/360/snapshot
626 38731 264 .snapshots/361/snapshot
627 38731 264 .snapshots/362/snapshot
628 38731 264 .snapshots/363/snapshot
629 38731 264 .snapshots/364/snapshot
630 38731 264 .snapshots/365/snapshot
631 38731 264 .snapshots/366/snapshot
632 38731 264 .snapshots/367/snapshot
633 38731 264 .snapshots/368/snapshot
634 38731 264 .snapshots/369/snapshot
635 38731 264 .snapshots/370/snapshot
636 38731 264 .snapshots/371/snapshot
637 38731 264 .snapshots/372/snapshot
638 38731 264 .snapshots/373/snapshot
639 38731 264 .snapshots/374/snapshot
640 38731 264 .snapshots/375/snapshot
641 38731 264 .snapshots/376/snapshot
642 38731 264 .snapshots/377/snapshot
643 38731 264 .snapshots/378/snapshot
644 38731 264 .snapshots/379/snapshot
645 38731 264 .snapshots/380/snapshot
646 38731 264 .snapshots/381/snapshot
647 38731 264 .snapshots/382/snapshot
648 38731 264 .snapshots/383/snapshot
649 38731 264 .snapshots/384/snapshot
650 38731 264 .snapshots/385/snapshot
651 38740 5 @swap
652 38794 264 .snapshots/386/snapshot
653 38796 264 .snapshots/387/snapshot
654 38823 264 .snapshots/388/snapshot
655 38825 264 .snapshots/389/snapshotHo provveduto a modificare il file /etc/fstab rimuovendo la riga relativa alla partizione ed inserendo il subvolume.
Codice: Seleziona tutto
cat /etc/fstab
UUID=BC78-4354 /boot/efi vfat defaults,noatime 0 2
/dev/mapper/luks-fd085464-4840-43bd-a55b-e1713c6c5a4f / btrfs subvol=/@,defaults,noatime,compress=zstd 0 0
/dev/mapper/luks-fd085464-4840-43bd-a55b-e1713c6c5a4f /home btrfs subvol=/@home,defaults,noatime,compress=zstd 0 0
/dev/mapper/luks-fd085464-4840-43bd-a55b-e1713c6c5a4f /var/cache btrfs subvol=/@cache,defaults,noatime,compress=zstd 0 0
/dev/mapper/luks-fd085464-4840-43bd-a55b-e1713c6c5a4f /var/log btrfs subvol=/@log,defaults,noatime,compress=zstd 0 0
# swapfile
/dev/mapper/luks-fd085464-4840-43bd-a55b-e1713c6c5a4f /swap btrfs noatime,subvol=@swap
/swap/swapfile none swap defaults 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0Codice: Seleziona tutto
cat /etc/dracut.conf.d/calamares-luks.conf
File: /etc/dracut.conf.d/calamares-luks.conf
# Configuration file automatically written by the Calamares system installer
# (This file is written once at install time and should be safe to edit.)
# Enables support for LUKS full disk encryption with single sign on from GRUB.
# force installing /etc/crypttab even if hostonly="no", install the keyfile
install_items+=" /etc/crypttab /crypto_keyfile.bin "
# enable automatic resume from swap
#add_device+=" /dev/disk/by-uuid/b7e0858a-5114-45d2-a976-7af690655243 "Codice: Seleziona tutto
cat /etc/default/grub
# GRUB boot loader configuration
GRUB_DEFAULT='0'
GRUB_TIMEOUT='5'
GRUB_DISTRIBUTOR='EndeavourOS'
GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES rd.luks.uuid=fd085464-4840-43bd-a55b-e1713c6c5a4f loglevel=3'
GRUB_CMDLINE_LINUX=""
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable booting from LUKS encrypted devices
GRUB_ENABLE_CRYPTODISK=y
# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY='true'
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND='/usr/share/endeavouros/splash.png'
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true
# Uncomment to disable submenus in boot menu
GRUB_DISABLE_SUBMENU='false'
# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=falseCodice: Seleziona tutto
systemctl status dev-disk-by\\x2duuid-b7e0858a\\x2d5114\\x2d45d2\\x2da976\\x2d7af690655243.device
○ dev-disk-by\x2duuid-b7e0858a\x2d5114\x2d45d2\x2da976\x2d7af690655243.device - /dev/disk/by-uuid/b7e0858a-5114-45d2-a976-7af690655243
Loaded: loaded
Active: inactive (dead)
set 03 18:43:06 macbookpro systemd[1]: dev-disk-by\x2duuid-b7e0858a\x2d5114\x2d45d2\x2da976\x2d7af690655243.device: Job dev-disk-by\x2duuid-b7e0858a\x2d5114\x2d45d2\x2da976\x2d7af690655243.device/start timed out.
set 03 18:43:06 macbookpro systemd[1]: Timed out waiting for device /dev/disk/by-uuid/b7e0858a-5114-45d2-a976-7af690655243.
set 03 18:43:06 macbookpro systemd[1]: dev-disk-by\x2duuid-b7e0858a\x2d5114\x2d45d2\x2da976\x2d7af690655243.device: Job dev-disk-by\x2duuid-b7e0858a\x2d5114\x2d45d2\x2da976\x2d7af690655243.device/start failed with result 'timeout'.Codice: Seleziona tutto
sudo grub-mkconfig -o /boot/grub/grub.cfg Codice: Seleziona tutto
sudo dracut-rebuild

