tachtler:ubuntu-_minimal_server_installation_-_snapper_-_grub-btrfs
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
tachtler:ubuntu-_minimal_server_installation_-_snapper_-_grub-btrfs [2022/03/14 06:18] – [Installation: grub-btrfs] klaus | tachtler:ubuntu-_minimal_server_installation_-_snapper_-_grub-btrfs [2022/03/14 07:02] (aktuell) – [Neustart] klaus | ||
---|---|---|---|
Zeile 116: | Zeile 116: | ||
root@ubuntu: | root@ubuntu: | ||
</ | </ | ||
- | |||
- | ===== Installation: | ||
- | |||
- | Damit aus dem mit [[http:// | ||
- | * [[https:// | ||
- | erforderlich. | ||
- | |||
- | Mit nachfolgendem Befehlen, | ||
- | * können die Voraussetzungen für eine Installation von [[https:// | ||
- | * kann [[https:// | ||
- | |||
- | **Voraussetzungen zur Installation von [[https:// | ||
- | < | ||
- | root@ubuntu: | ||
- | Reading package lists... Done | ||
- | Building dependency tree | ||
- | Reading state information... Done | ||
- | git is already the newest version (1: | ||
- | git set to manually installed. | ||
- | vim is already the newest version (2: | ||
- | vim set to manually installed. | ||
- | The following additional packages will be installed: | ||
- | binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 gcc-9-base | ||
- | libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 libbinutils | ||
- | libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl libfakeroot libfile-fcntllock-perl | ||
- | libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev libtsan0 libubsan1 | ||
- | linux-libc-dev make manpages-dev | ||
- | Suggested packages: | ||
- | binutils-doc cpp-doc gcc-9-locales debian-keyring g++-multilib g++-9-multilib gcc-9-doc gcc-multilib autoconf | ||
- | automake libtool flex bison gdb gcc-doc gcc-9-multilib glibc-doc bzr libstdc++-9-doc make-doc | ||
- | The following NEW packages will be installed: | ||
- | binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 | ||
- | gcc-9-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 | ||
- | libbinutils libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl libfakeroot | ||
- | libfile-fcntllock-perl libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev | ||
- | libtsan0 libubsan1 linux-libc-dev make manpages-dev | ||
- | 0 upgraded, 41 newly installed, 0 to remove and 0 not upgraded. | ||
- | Need to get 45.4 MB of archives. | ||
- | After this operation, 202 MB of additional disk space will be used. | ||
- | Do you want to continue? [Y/n] Y | ||
- | ... | ||
- | ... | ||
- | ... | ||
- | root@ubuntu: | ||
- | </ | ||
- | |||
- | **Code von [[https:// | ||
- | < | ||
- | root@ubuntu: | ||
- | Cloning into ' | ||
- | remote: Enumerating objects: 844, done. | ||
- | remote: Counting objects: 100% (151/151), done. | ||
- | remote: Compressing objects: 100% (125/125), done. | ||
- | remote: Total 844 (delta 95), reused 42 (delta 26), pack-reused 693 | ||
- | Receiving objects: 100% (844/844), 257.99 KiB | 4.45 MiB/s, done. | ||
- | Resolving deltas: 100% (494/494), done. | ||
- | root@ubuntu: | ||
- | </ | ||
- | |||
- | **In das geklonte Verzeichnis wechseln:** | ||
- | < | ||
- | root@ubuntu: | ||
- | </ | ||
- | |||
- | **Kompilieren und Installieren: | ||
- | < | ||
- | root@ubuntu: | ||
- | GNU Make 4.2.1 | ||
- | Built for x86_64-pc-linux-gnu | ||
- | Copyright (C) 1988-2016 Free Software Foundation, Inc. | ||
- | License GPLv3+: GNU GPL version 3 or later < | ||
- | This is free software: you are free to change and redistribute it. | ||
- | There is NO WARRANTY, to the extent permitted by law. | ||
- | Reading makefiles... | ||
- | Reading makefile ' | ||
- | Updating makefiles.... | ||
- | ... | ||
- | ... | ||
- | ... | ||
- | Successfully remade target file ' | ||
- | root@ubuntu: | ||
- | </ | ||
- | |||
- | **Verlassen des geklonte Verzeichnisses: | ||
- | < | ||
- | root@ubuntu: | ||
- | root@ubuntu: | ||
- | </ | ||
- | |||
- | Die Konfiguration für das Programm [[https:// | ||
- | * ''/ | ||
- | |||
- | :!: **HINWEIS** - **Anpassungen müssen hier __keine__ erfolgen!** | ||
===== Installation: | ===== Installation: | ||
Zeile 754: | Zeile 661: | ||
root@ubuntu: | root@ubuntu: | ||
</ | </ | ||
+ | |||
+ | ===== Installation: | ||
+ | |||
+ | Damit aus dem mit [[http:// | ||
+ | * [[https:// | ||
+ | erforderlich. | ||
+ | |||
+ | Mit nachfolgendem Befehlen, | ||
+ | * können die Voraussetzungen für eine Installation von [[https:// | ||
+ | * kann [[https:// | ||
+ | |||
+ | **Voraussetzungen zur Installation von [[https:// | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | Reading package lists... Done | ||
+ | Building dependency tree | ||
+ | Reading state information... Done | ||
+ | git is already the newest version (1: | ||
+ | git set to manually installed. | ||
+ | vim is already the newest version (2: | ||
+ | vim set to manually installed. | ||
+ | The following additional packages will be installed: | ||
+ | binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 gcc-9-base | ||
+ | libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 libbinutils | ||
+ | libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl libfakeroot libfile-fcntllock-perl | ||
+ | libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev libtsan0 libubsan1 | ||
+ | linux-libc-dev make manpages-dev | ||
+ | Suggested packages: | ||
+ | binutils-doc cpp-doc gcc-9-locales debian-keyring g++-multilib g++-9-multilib gcc-9-doc gcc-multilib autoconf | ||
+ | automake libtool flex bison gdb gcc-doc gcc-9-multilib glibc-doc bzr libstdc++-9-doc make-doc | ||
+ | The following NEW packages will be installed: | ||
+ | binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 | ||
+ | gcc-9-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 | ||
+ | libbinutils libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl libfakeroot | ||
+ | libfile-fcntllock-perl libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev | ||
+ | libtsan0 libubsan1 linux-libc-dev make manpages-dev | ||
+ | 0 upgraded, 41 newly installed, 0 to remove and 0 not upgraded. | ||
+ | Need to get 45.4 MB of archives. | ||
+ | After this operation, 202 MB of additional disk space will be used. | ||
+ | Do you want to continue? [Y/n] Y | ||
+ | ... | ||
+ | ... | ||
+ | ... | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | **Code von [[https:// | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | Cloning into ' | ||
+ | remote: Enumerating objects: 844, done. | ||
+ | remote: Counting objects: 100% (151/151), done. | ||
+ | remote: Compressing objects: 100% (125/125), done. | ||
+ | remote: Total 844 (delta 95), reused 42 (delta 26), pack-reused 693 | ||
+ | Receiving objects: 100% (844/844), 257.99 KiB | 4.45 MiB/s, done. | ||
+ | Resolving deltas: 100% (494/494), done. | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | **In das geklonte Verzeichnis wechseln:** | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | **Kompilieren und Installieren: | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | GNU Make 4.2.1 | ||
+ | Built for x86_64-pc-linux-gnu | ||
+ | Copyright (C) 1988-2016 Free Software Foundation, Inc. | ||
+ | License GPLv3+: GNU GPL version 3 or later < | ||
+ | This is free software: you are free to change and redistribute it. | ||
+ | There is NO WARRANTY, to the extent permitted by law. | ||
+ | Reading makefiles... | ||
+ | Reading makefile ' | ||
+ | Updating makefiles.... | ||
+ | ... | ||
+ | ... | ||
+ | ... | ||
+ | Successfully remade target file ' | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | **Verlassen des geklonte Verzeichnisses: | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | Die Konfiguration für das Programm [[https:// | ||
+ | * ''/ | ||
+ | |||
+ | :!: **HINWEIS** - **Anpassungen müssen hier __keine__ erfolgen!** | ||
+ | |||
+ | ===== Konfiguration: | ||
+ | |||
+ | Nachfolgender **'' | ||
+ | * ''/ | ||
+ | auf Änderungen und erstellt daraufhin die Konfigurationsdaten für den **" | ||
+ | |||
+ | :!: **HINWEIS** - **Falls ein anderes Verzeichnis als ''/ | ||
+ | * ''/ | ||
+ | |||
+ | :!: **HINWEIS** - Eine Vorlage für den Inhalt, hält die Konfigurationsdatei ''/ | ||
+ | |||
+ | :!: **ACHTUNG** - **Hier ist aktuelle keine Anpassung an der Konfigurationsdatei '''' | ||
+ | |||
+ | ==== grub-btrfs.path.service-Dienst/ | ||
+ | |||
+ | Um den **grub-btrfs.path.service**-Dienst/ | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | Created symlink / | ||
+ | </ | ||
+ | |||
+ | Eine Überprüfung, | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | grub-btrfs.service | ||
+ | </ | ||
+ | bzw. | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | static | ||
+ | </ | ||
+ | |||
+ | Abschließend kann der **grub-btrfs**-Dienst/ | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | Eine Überprüfung ob der **grub-btrfs.path.service**-Dienst/ | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | ● grub-btrfs.path - Monitors for new snapshots | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Mar 14 05:21:26 ubuntu systemd[1]: Started Monitors for new snapshots. | ||
+ | </ | ||
+ | |||
+ | ==== grub-btrfs-update.service-Dienst/ | ||
+ | |||
+ | Damit nach jeder Erstellung eines updates und Neustarts auch im **GRUB-Bootmenü** die jeweils letzten Einträge von erstellten **Snapshots** zur Verfügung stehen, kann nachfolgendes '' | ||
+ | |||
+ | * //Quelle: [[https:// | ||
+ | |||
+ | Zu Erstellung eines neuen '' | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | und mit nachfolgendem Inhalt erstellt werden: | ||
+ | <code ini> | ||
+ | [Unit] | ||
+ | Description=Update grub-btrfs.cfg before reboot/ | ||
+ | Before=poweroff.target | ||
+ | |||
+ | [Service] | ||
+ | Type=oneshot | ||
+ | # Set the possible paths for `grub-mkconfig` | ||
+ | Environment=" | ||
+ | # Load environment variables from the configuration | ||
+ | EnvironmentFile=/ | ||
+ | RemainAfterExit=true | ||
+ | ExecStart=/ | ||
+ | # Regenerate just '/ | ||
+ | ExecStop=bash -c 'if [ -s " | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | Anschließend muss das n eu erstellte '' | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | Um den **grub-btrfs-update.service**-Dienst/ | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | Created symlink / | ||
+ | </ | ||
+ | |||
+ | Eine Überprüfung, | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | grub-btrfs-update.service | ||
+ | </ | ||
+ | bzw. | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | enabled | ||
+ | </ | ||
+ | |||
+ | ===== Grub-Konfiguration ===== | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Damit nach dem Neustart unter [[https:// | ||
+ | * ''/ | ||
+ | nachfolgende Anpassungen durchgeführt werden: | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | <code ini> | ||
+ | # If you change this file, run ' | ||
+ | # / | ||
+ | # For full documentation of the options in this file, see: | ||
+ | # info -f grub -n ' | ||
+ | |||
+ | GRUB_DEFAULT=0 | ||
+ | # Tachtler | ||
+ | # default: GRUB_TIMEOUT_STYLE=hidden | ||
+ | GRUB_TIMEOUT_STYLE=menu | ||
+ | # Tachtler | ||
+ | # default: GRUB_TIMEOUT=0 | ||
+ | GRUB_TIMEOUT=5 | ||
+ | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` | ||
+ | GRUB_CMDLINE_LINUX_DEFAULT="" | ||
+ | GRUB_CMDLINE_LINUX="" | ||
+ | |||
+ | # Uncomment to enable BadRAM filtering, modify to suit your needs | ||
+ | # This works with Linux (no patch required) and with any kernel that obtains | ||
+ | # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) | ||
+ | # | ||
+ | |||
+ | # Uncomment to disable graphical terminal (grub-pc only) | ||
+ | # | ||
+ | |||
+ | # 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 `vbeinfo' | ||
+ | # | ||
+ | |||
+ | # Uncomment if you don't want GRUB to pass " | ||
+ | # | ||
+ | |||
+ | # Uncomment to disable generation of recovery mode menu entries | ||
+ | # | ||
+ | |||
+ | # Uncomment to get a beep at grub start | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | **__Erklärungen__**: | ||
+ | |||
+ | * <code ini> | ||
+ | |||
+ | Einstellung, | ||
+ | |||
+ | * <code ini> | ||
+ | |||
+ | Einstellung des '' | ||
+ | |||
+ | Damit die Änderungen auch bein nächsten Neustart wirksame werden, muss dies mit nachfolgendem Befehl in die **GRUB**-Konfiguration umgewandelt, | ||
+ | < | ||
+ | root@ubuntu: | ||
+ | Sourcing file `/ | ||
+ | Sourcing file `/ | ||
+ | Generating grub configuration file ... | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Detecting snapshots ... | ||
+ | No snapshots found. | ||
+ | If you think an error has occurred, please file a bug report at " | ||
+ | Unmount / | ||
+ | done | ||
+ | root@ubuntu: | ||
+ | </ | ||
+ | |||
+ | :!: **HINWEIS** - **Alternativ, | ||
+ | |||
+ | ===== Neustart ===== | ||
+ | |||
+ | :!: **HINWEIS** - **Am einfachsten ist es wenn zur Überprüfung der Einrichtung, | ||
+ | |||
+ | Anschließend sollte nachfolgendes **GRUB-Bootmenü** nach einem Neustart zum Vorschein kommen: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Mit der nach unten **[⇓]**-Pfeil-Taste kann auf den **GRUB-Bootmenü**-Punkt **Ubuntu snapshots** gewechselt werden und die **[Enter/ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Eine Rückkehr in das vorherige **GRUB-Bootmenü**, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Ein abschließender Neustart des Betriebssystem, | ||
+ | |||
+ | {{: | ||
tachtler/ubuntu-_minimal_server_installation_-_snapper_-_grub-btrfs.txt · Zuletzt geändert: 2022/03/14 07:02 von klaus