Difference between revisions of "User:Whnr"

From ArchWiki
Jump to navigation Jump to search
(Snapshot creation and restoring)
Line 5: Line 5:
 
* Took the cryptsetup from [[Dm-crypt/Device_encryption#Encryption_options_for_LUKS_mode]]
 
* Took the cryptsetup from [[Dm-crypt/Device_encryption#Encryption_options_for_LUKS_mode]]
 
* Then tried to fix the S3 sleep with https://delta-xi.net/#056
 
* Then tried to fix the S3 sleep with https://delta-xi.net/#056
** systemd-boot needs two initrd lines in the arch.conf
+
** systemd-boot needs two{{ic|initrd}} lines in the{{ic|arch.conf}}
 
** s3 works now very well
 
** s3 works now very well
 
* Energy consumption
 
* Energy consumption
 
** Measured with custom script. Basically determining idle power consumption at different screen brightnesses
 
** Measured with custom script. Basically determining idle power consumption at different screen brightnesses
** Enabled tlp.service and tlp-sleep.service => no problems with trackpoint and touchpad after waking up
+
** Enabled{{ic|tlp.service}} and{{ic|tlp-sleep.service}} => seldom problems with trackpoint and touchpad after waking up
 
* SSD: TRIM is disencouraged for NVMe SSDs by Intel says: https://wiki.archlinux.org/index.php/Solid_State_Drive/NVMe#Discards
 
* SSD: TRIM is disencouraged for NVMe SSDs by Intel says: https://wiki.archlinux.org/index.php/Solid_State_Drive/NVMe#Discards
 
* Making the system a bit more secure
 
* Making the system a bit more secure
** Disable root login
+
** Set a proper root password
 
** Change default umask to 077
 
** Change default umask to 077
* Enable ntp time synchronization: timedatectl set-ntp true
+
* Enable ntp time synchronization:{{ic|timedatectl set-ntp true}}
 
* Use ZSH and oh-my-zsh
 
* Use ZSH and oh-my-zsh
 
* Undervolting
 
* Undervolting
Line 22: Line 22:
 
** s-tui for stress testing logging and monitoring.
 
** s-tui for stress testing logging and monitoring.
 
** First Results: Unstable after about 10 minutes with s-tui stress mode at -130mv on GPU and core (-120mv on rest)
 
** First Results: Unstable after about 10 minutes with s-tui stress mode at -130mv on GPU and core (-120mv on rest)
*** GPU HANG caused the instability.
+
*** GPU hang caused the instability.
 
*** => Backing off to -110mv on everything.
 
*** => Backing off to -110mv on everything.
* Created a nice .dotfiles repo and started configuring vim tmux zsh
+
* Created a nice{{ic|.dotfiles}} repo and started configuring vim tmux zsh
* Printing with cups
+
* Printing with{{ic|cups}}
 
** Add yourself to the sys group
 
** Add yourself to the sys group
 
** Use gutenprint drivers
 
** Use gutenprint drivers
 
** Add printer through the web interface
 
** Add printer through the web interface
* Setting up system snapshots that show up during boot
+
 
** Goal: Create an automatic or manual snapshot that can be restored during boot, if needed
+
=== System restore snapshots ===
** Creation: sudo lvcreate --snapshot --size 30G --name root-snap /dev/vg0/root
+
 
** Restore: sudo lvconvert --merge /dev/vg0/root-snap => Will automatically merge the snapshot back at the next reboot.
+
Setting up system snapshots that can be restored if e.g. an update fails
 +
* Goal: Create an automatic or manual snapshot that can be restored if needed
 +
* Creation:
 +
** Create a backup of the boot folder, as it is not covered by the lvm =>{{ic|cd /boot}} =>{{ic|sudo tar -cvf boot-snap.tar.gz *}}
 +
**{{ic|sudo lvcreate --snapshot --size 30G --name root-snap /dev/vg0/root}}
 +
* Restore:
 +
** Check if the boot partition has changed:{{ic|cd /boot}} =>{{ic|sudo tar --compare boot-snap.tar.gz}} => If yes recreate the old state by extracting files
 +
**{{ic|sudo lvconvert --merge /dev/vg0/root-snap}} => Will automatically merge the snapshot back at the next reboot => This does hang at some point (FIXME), a reboot works.
 +
* Or remove:{{ic|sudo lvremove /dev/vg0/root-swap}}
  
 
== ToDo / Wishlist ==
 
== ToDo / Wishlist ==

Revision as of 14:38, 1 September 2018

I am using this page to keep track of "stuff". I'm new with Arch. My Lenovo ThinkPad X1 Carbon (Gen 6) just arrived. Time to move away from MacOS once and for all (initial idea mainly because of the new Apple keyboards).

Installation

System restore snapshots

Setting up system snapshots that can be restored if e.g. an update fails

  • Goal: Create an automatic or manual snapshot that can be restored if needed
  • Creation:
    • Create a backup of the boot folder, as it is not covered by the lvm =>cd /boot =>sudo tar -cvf boot-snap.tar.gz *
    • sudo lvcreate --snapshot --size 30G --name root-snap /dev/vg0/root
  • Restore:
    • Check if the boot partition has changed:cd /boot =>sudo tar --compare boot-snap.tar.gz => If yes recreate the old state by extracting files
    • sudo lvconvert --merge /dev/vg0/root-snap => Will automatically merge the snapshot back at the next reboot => This does hang at some point (FIXME), a reboot works.
  • Or remove:sudo lvremove /dev/vg0/root-swap

ToDo / Wishlist

  • Stability testing
    • systester-cli -gausslg 16M -threads 8 -bench -turns 50 -log (first try with -120mv ran for 1 minute before crashing)
    • Settled to -100mv on CPU (as -110 had 3 errors after 60 Minutes), -110 on GPU => No graphic failiures with unigine-haven and systester at the same time
  • Changing the thermal paste?