"mkinitcpio" needed for "snapper-support" and "btrfs-assistant"?

Ich wollte mir Snapper installieren und einrichten. Hier im Forum bin ich auf die Anleitung von @lorebett gestoßen und wollte danach vorgehen.

Beim Ausführen des folgenden Befehls erhalte ich eine Fehlermeldung.

yay -S snapper-support btrfs-assistant

Sync Explicit (2): snapper-support-1.1.2-3, btrfs-assistant-2.1.1-1.2
Abhängigkeiten werden aufgelöst …
Nach in Konflikt stehenden Paketen wird gesucht …

Paket (5)                    Neue Version  Netto-Veränderung

extra/grub-btrfs             4.13-2                 0,10 MiB
extra/snap-pac               3.0.1-3                0,04 MiB
extra/snapper                0.12.0-1               3,24 MiB
chaotic-aur/btrfs-assistant  2.1.1-1.2              0,50 MiB
chaotic-aur/snapper-support  1.1.2-3                0,00 MiB

Gesamtgröße der installierten Pakete:  3,88 MiB

:: Installation fortsetzen? [J/n] 
(5/5) Schlüssel im Schlüsselbund werden geprüft                          [----------------------------------------] 100%
(5/5) Paket-Integrität wird überprüft                                    [----------------------------------------] 100%
(5/5) Paket-Dateien werden geladen                                       [----------------------------------------] 100%
(5/5) Auf Dateikonflikte wird geprüft                                    [----------------------------------------] 100%
:: Paketänderungen werden verarbeitet …
(1/5) Installiert wird snapper                                           [----------------------------------------] 100%
Optionale Abhängigkeiten für snapper
    pam: pam_snapper [Installiert]
(2/5) Installiert wird snap-pac                                          [----------------------------------------] 100%
(3/5) Installiert wird grub-btrfs                                        [----------------------------------------] 100%
Optionale Abhängigkeiten für grub-btrfs
    snapper: For snapper support [Installiert]
    inotify-tools: For grub-btrfsd daemon
(4/5) Installiert wird snapper-support                                   [----------------------------------------] 100%
Using default grub snapshot submenu name
Enabling automatic rebuild of grub-btrfs when snapshots are taken
Created symlink '/etc/systemd/system/multi-user.target.wants/grub-btrfs-snapper.path' → '/usr/lib/systemd/system/grub-btrfs-snapper.path'.
Created symlink '/etc/systemd/system/timers.target.wants/snapper-cleanup.timer' → '/usr/lib/systemd/system/snapper-cleanup.timer'.
Creating snapper config for root
grep: /etc/mkinitcpio.conf: Datei oder Verzeichnis nicht gefunden
sed: /etc/mkinitcpio.conf kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
Fehler: Befehl konnte nicht korrekt ausgeführt werden
(5/5) Installiert wird btrfs-assistant                                   [----------------------------------------] 100%
Optionale Abhängigkeiten für btrfs-assistant
    snapper [Installiert]
    btrfsmaintenance
:: Post-transaction-Hooks werden gestartet …
(1/6) Reloading system manager configuration...
(2/6) Arming ConditionNeedsUpdate...
(3/6) Reloading system bus configuration...
(4/6) Updating icon theme caches...
(5/6) Updating the desktop file MIME type cache...
(6/6) Performing snapper post snapshots for the following configurations...
==> root: 1

Fehler:

Creating snapper config for root
grep: /etc/mkinitcpio.conf: Datei oder Verzeichnis nicht gefunden
sed: /etc/mkinitcpio.conf kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
Fehler: Befehl konnte nicht korrekt ausgeführt werden

Ich wunderte mich, warum das Paket “mkinitcpio” nicht installiert ist und habe es nachinstalliert. Danach ließ sich Snapper installieren.

Allerdings bin ich dann hier im Forum darauf gestoßen, dass in EndeavourOS “mkinitcpio” entfernt und “dracut” nun installiert ist.

Wie lassen sich die Pakete “snapper-support” und “btrfs-assistant” nun installieren, ohne dass ich “dracut” entfernen und “mkinitcpio” installieren muss? Geht das überhaupt? Oder muss ich zwingend “mkinitcpio” für Snapper nutzen?

Hier noch mein System, falls benötigt:

$ inxi -Fz
System:
  Kernel: 6.12.8-zen1-1-zen arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.2.5 Distro: EndeavourOS
Machine:
  Type: Desktop Mobo: Micro-Star model: MAG X570 TOMAHAWK WIFI (MS-7C84)
    v: 1.0 serial: <superuser required> UEFI: American Megatrends LLC. v: 1.I1
    date: 09/02/2024
CPU:
  Info: 12-core model: AMD Ryzen 9 3900X bits: 64 type: MT MCP cache:
    L2: 6 MiB
  Speed (MHz): avg: 3703 min/max: 550/4673 cores: 1: 3703 2: 3703 3: 3703
    4: 3703 5: 3703 6: 3703 7: 3703 8: 3703 9: 3703 10: 3703 11: 3703 12: 3703
    13: 3703 14: 3703 15: 3703 16: 3703 17: 3703 18: 3703 19: 3703 20: 3703
    21: 3703 22: 3703 23: 3703 24: 3703
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 32 [Radeon RX 7700 XT /
    7800 XT] driver: amdgpu v: kernel
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu
    resolution: 3440x1440
  API: EGL v: 1.5 drivers: kms_swrast,radeonsi,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.3.3-arch1.1
    renderer: AMD Radeon RX 7800 XT (radeonsi navi32 LLVM 18.1.8 DRM 3.59
    6.12.8-zen1-1-zen)
  API: Vulkan v: 1.4.303 drivers: N/A surfaces: xcb,xlib,wayland
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 31 HDMI/DP Audio
    driver: snd_hda_intel
  Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio
    driver: snd_hda_intel
  API: ALSA v: k6.12.8-zen1-1-zen status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active
Network:
  Device-1: Realtek RTL8125 2.5GbE driver: r8169
  IF: enp38s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth driver: btusb type: USB
  Report: btmgmt ID: hci0 state: up address: <filter> bt-v: 5.2
Drives:
  Local Storage: total: 7.51 TiB used: 2.48 TiB (33.1%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 1TB size: 931.51 GiB
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 2TB
    size: 1.82 TiB
  ID-3: /dev/sda vendor: Samsung model: SSD 850 EVO 1TB size: 931.51 GiB
  ID-4: /dev/sdb vendor: Western Digital model: WD20EZBX-00AYRA0
    size: 1.82 TiB
  ID-5: /dev/sdc vendor: Western Digital model: WD20EZBX-00AYRA0
    size: 1.82 TiB
  ID-6: /dev/sdd vendor: Samsung model: SSD 850 PRO 256GB size: 238.47 GiB
Partition:
  ID-1: / size: 921.71 GiB used: 22.5 GiB (2.4%) fs: btrfs dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 1022 MiB used: 588 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-3: /home size: 921.71 GiB used: 22.5 GiB (2.4%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-4: /var/log size: 921.71 GiB used: 22.5 GiB (2.4%) fs: btrfs
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme0n1p3
Sensors:
  System Temperatures: cpu: 40.4 C mobo: N/A gpu: amdgpu temp: 38.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 1
Info:
  Memory: total: 32 GiB available: 31.26 GiB used: 5.13 GiB (16.4%)
  Processes: 507 Uptime: 2h 11m Shell: Bash inxi: 3.3.36

I’m mentioned here, but I don’t speak German I’m afraid.

1 Like

Sorry, that I didn’t write in English … But let me explain in English again. :wink:

I just found your “tutorial” to install Snapper and grub-btrfs and I wanted to use it to install Snapper in EndeavourOS. But I noticed that “mkinitcpio” was switched to “dracut” some months ago.

That’s why there is the following error when trying to use yay -S snapper-support btrfs-assistant.

Creating snapper config for root
grep: /etc/mkinitcpio.conf: Datei oder Verzeichnis nicht gefunden
sed: /etc/mkinitcpio.conf kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
Fehler: Befehl konnte nicht korrekt ausgeführt werden

The issue is that “/etc/mkinitcpio.conf” does not exist.

So, my question is if there is a need to install “mkinitcpio” to get Snapper and Btrfs Assistant to work. In EndeavourOS there is “dracut” now. I don’t know if it is possible to install Snapper with the help of your steps in latest EndeavourOS. :confused:

Do you have any idea?

You do not need mkinitcpio, nor do you need the snapper-support package at all (which is what is trying to interact with mkinitcpio). If you are installing Btrfs Assistant, that is enough for setting up and managing your Snapper configs.

The document you have linked is a mix of many different ideas. If you are trying to set up Snapper to take snapshots and Grub to be able to boot the snapshots, this post may be a more concise and straightforward summary of how to set that set up:

1 Like

You can just ignore that message. It should work fine. Dracut doesn’t need any changes like mkinitcpio does.

1 Like

As already answered, you can ignore that message.

1 Like

What is the snapper-support package for and what is missing if I don’t install this package?

EDIT: Found that here:

It seems like it is what I want - create snapshots manually and pre and post pacman installations and be able to select created snapshots in Grub.

Sounds good! :slight_smile:

I’ll compare the differences of both documents from @dalto and @lorebett . Thanks @BluishHumility for linking to @dalto .

1 Like

@dalto
Thanks for your guide to install snapper and btrfs assistant and to configure pre- and post-snapshots. Your guide is working fine. :+1:

When I want to include /home into snapshots, do I just have to create a config for /home and a snapshot will be created then? And how to restore snapshots for both configs then? Do I have to restore root and home one after the other?

I mount other drives into /mnt via fstab. Do I have to set an exclusion for /mnt when taking snapshots, so that files and folders from mounted drives are not restored?

Sorry for asking such questions. :wink:

You have to create a config and decide how to create the snapshots. I always recommend taking snapshots of /home on a schedule. It doesn’t really make sense to take snapshots during updates since updates never touch /home.

Yes. Although, again, there aren’t many situations where it would make practical sense to restore both at the same time.

No. Snapshots are not filesystem backups. When you take a snapshot of /, you are taking a snapshot of the subvolume mounted at /. Since the things you mount at /mnt, aren’t part of that subvolume, they won’t be included in the snapshots.

1 Like

Never thought about that … But you are right. /home only changes when apps created their config files in there. So a schedule makes much more sense in that case. :+1:

Great! That’s what I wanted to read. Thanks again!

How about restoring a snapshot of /root. Do I have to boot into the specific snapshot first, before I restore that snapshot? Or can I just restore the snapshot no matter if I booted into that one?

I noticed that you disabled the timeline timer above. Make sure you re-enable that. Those instructions were for a person’s specific use case, you wouldn’t generally disable the timeline snapshots.

You can restore the snapshot whenever you want. As soon as you restore a snapshot, you need to reboot though.

The only time you should boot into a snapshot is if your system isn’t bootable normally.

Didn’t think about that … Done now! Thanks! :+1:

Snapper settings look like this now:

Great! Thanks, too.

Makes sense … :wink:

Again, thank you very much, @dalto ! :heart:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.