Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| scratch [2017/10/12 17:14] – admin | scratch [2019/03/10 13:03] (current) – [LUKS] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Maustasten belegen | + | ====== Maustasten belegen |
| + | |||
| + | ===== Linux Mint (bzw. Ubuntu) ===== | ||
| https:// | https:// | ||
| Line 20: | Line 22: | ||
| Und schließlich unter // | Und schließlich unter // | ||
| //Alt + F9// einstellen (sollte aber auch Default sein). | //Alt + F9// einstellen (sollte aber auch Default sein). | ||
| + | |||
| + | |||
| + | ===== Arch Linux ===== | ||
| + | xorg-xev, xbindkeys und xdotool installieren: | ||
| + | pacman -S xbindkeys xdotool xorg-xev | ||
| + | |||
| + | mit //xev// Button Nummer herausfinden. | ||
| + | |||
| + | Maustasten mit xbindkeys auf Tastendrücke legen: | ||
| + | ~./ | ||
| + | # Button 10 sends ALT+F9 | ||
| + | " | ||
| + | b:10 | ||
| + | |||
| + | xbindkeys automatisch beim Einloggen starten: | ||
| + | ~/ | ||
| + | xbindkeys & | ||
| + | |||
| + | In Desktop-Einstellungen ALT-F9 auf gewünschte Funktion, z.B. //Fenster minimieren// | ||
| + | |||
| ====== Mausgeschwindigkeit einstellen ====== | ====== Mausgeschwindigkeit einstellen ====== | ||
| Line 81: | Line 103: | ||
| '' | '' | ||
| + | ====== Git ====== | ||
| + | # # | ||
| + | # Command line # Bitbucket (prefered) | ||
| + | # # | ||
| + | | ||
| + | | ||
| + | ====================================== Create a new branch ===================================================== | ||
| + | | ||
| + | # Create and checkout branch | ||
| + | git checkout -b < | ||
| + | # Fetch the new branch and check it out | ||
| + | # Push (empty) branch to the remote repository | ||
| + | git push -u origin < | ||
| + | |||
| + | # Do the work: edit, add, ... | ||
| + | | ||
| + | # Commit the branch | ||
| + | git commit -m " | ||
| + | | ||
| + | # Push branch to the remote repository | ||
| + | # *********************************************************** | ||
| + | # Note: From Pro Git book: "In general the way to get the best of both worlds is to rebase local changes | ||
| + | # you’ve made but haven’t shared yet before you push them in order to clean up your story, but never rebase | ||
| + | # anything you’ve pushed somewhere. | ||
| + | # | ||
| + | # => so better first commit locally until finished, then rebase and then push to origin. | ||
| + | # *********************************************************** | ||
| + | git push # Specify upstream if not already done above: git push -u origin < | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | ====================================== Rebase ================================================================== | ||
| + | | ||
| + | # Update master copy | ||
| + | git checkout master | ||
| + | git pull | ||
| + | | ||
| + | # go to branch which should be merged to master and make sure that remote is equal with your copy | ||
| + | git checkout < | ||
| + | git pull # only if branch is already pushed to origin | ||
| + | | ||
| + | # Start rebase | ||
| + | git rebase master | ||
| + | | ||
| + | # solve conflicts with an editor e.g foo.cxx has a conflict | ||
| + | kate foo.cxx # remove conflict | ||
| + | git add foo.cxx | ||
| + | | ||
| + | # continue rebasing | ||
| + | git rebase --continue | ||
| + | | ||
| + | # if there are no other conflicts to solve, push your branch to remote otherwise solve conflicts | ||
| + | git push --force | ||
| + | | ||
| + | | ||
| + | ====================================== Merge the branch with master ============================================ | ||
| + | | ||
| + | git checkout master | ||
| + | git merge < | ||
| + | git push Bitbucket: Delete < | ||
| + | |||
| + | ====== LUKS ====== | ||
| + | https:// | ||
| + | | ||
| + | ################################# | ||
| + | ########## Preparation ########## | ||
| + | # - Boot a Linux from a USB stick or CD / DVD | ||
| + | # - Open a terminal | ||
| + | |||
| + | |||
| + | ################################# | ||
| + | ### Find the right partitions ### | ||
| + | lsblk -o name, | ||
| + | | ||
| + | # nvme0n1 | ||
| + | # ├─nvme0n1p1 vfat | ||
| + | # ├─nvme0n1p2 ext4 | ||
| + | # └─nvme0n1p3 swap 39,1G | ||
| + | | ||
| + | # Set boot and root partition names according to above output! | ||
| + | BOOTPART=/ | ||
| + | ROOTPART=/ | ||
| + | | ||
| + | | ||
| + | ############################### | ||
| + | ########### Encrypt ########### | ||
| + | | ||
| + | # Shrink root filesystem (NOT the partition) | ||
| + | sudo e2fsck -f $ROOTPART | ||
| + | sudo resize2fs -M $ROOTPART | ||
| + | | ||
| + | # Encrypt | ||
| + | sudo cryptsetup-reencrypt --type=luks2 --new --reduce-device-size 4M $ROOTPART | ||
| + | |||
| + | # resize the filesystem to its original size | ||
| + | sudo cryptsetup luksOpen $ROOTPART newcryptofs | ||
| + | sudo resize2fs / | ||
| + | | ||
| + | | ||
| + | ########################################################## | ||
| + | ### Make the system boot from the encrypted filesystem ### | ||
| + | | ||
| + | sudo mount / | ||
| + | sudo mount $BOOTPART /mnt/boot | ||
| + | | ||
| + | # Edit / | ||
| + | sudo nano / | ||
| + | # change MODULES=() to | ||
| + | MODULES=(nvidia_uvm nvidia_drm) | ||
| + | # set HOOKS to | ||
| + | HOOKS=(base systemd autodetect keyboard keymap sd-vconsole modconf block sd-encrypt filesystems fsck) | ||
| + | | ||
| + | # Backup old config files and create new ones | ||
| + | for f in / | ||
| + | echo -e " | ||
| + | echo -e "title Arch Linux\nlinux / | ||
| + | / | ||
| + | root=/ | ||
| + | echo -e "title Arch Linux Fallback\nlinux / | ||
| + | / | ||
| + | root=/ | ||
| + | | ||
| + | sudo chroot /mnt | ||
| + | mount -t proc proc /proc | ||
| + | mount -t sysfs sys /sys | ||
| + | mount -t devtmpfs udev /dev | ||
| + | | ||
| + | mkinitcpio -p linux | ||
| + | exit # leave chroot | ||
| + | | ||
| + | # reboot | ||
| + | sudo reboot | ||
| + | |||
| + | |||
| + | |||
| + | =============================================================================== | ||
| + | # Convert luks1 to luks2 (or vice versa) | ||
| + | sudo cryptsetup convert --type=luks2 $ROOTPART | ||
| + | | ||
| + | =============================================================================== | ||
| + | |||
| + | | ||