Difference between revisions of "FAQ/Howto"

From GalliumOS Wiki
< FAQ
Jump to: navigation, search
(Mount a USB drive to a predictable location)
(Move your /home to a flash drive)
Line 15: Line 15:
 
You should change /dev/sda for your device location. Be carefully, this may lead to data damage.
 
You should change /dev/sda for your device location. Be carefully, this may lead to data damage.
  
 +
===== Generate an encryption key =====
 +
 +
==== Create udev rules ====
  
 
(WIP: pasting content from https://paste.ubuntu.com/24558174/, please improve!)
 
(WIP: pasting content from https://paste.ubuntu.com/24558174/, please improve!)
Line 26: Line 29:
 
     ## values for serial, idVendor, and idProduct are visible in dmesg output:
 
     ## values for serial, idVendor, and idProduct are visible in dmesg output:
 
     ## run "dmesg -w" while inserting USB drive
 
     ## run "dmesg -w" while inserting USB drive
 +
 +
==== Create systemd service ====
 +
 +
==== Move the /home folders to the flashdrive ====
 +
 +
==== Create symlinks ====

Revision as of 19:53, 20 June 2017

Some frequently useful configuration options:

Move your /home to a flash drive

It is not recommended to mount your /home to a external an USB flash drive or a SD Card because if you lose it you gonna be in trouble. However you can move your /home folders to a external drive.

Encrypt your flash drive

Flash drives are easy to loose. If you don't want anyone looking around your data, you should encrypt your flash drive. I will not detail this part, as data encryption are complex and you have better and complete information at https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system

To encrypt the entire flash drive, do this:

   $ sudo cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --use-random luksFormat /dev/sda

You should change /dev/sda for your device location. Be carefully, this may lead to data damage.

Generate an encryption key

Create udev rules

(WIP: pasting content from https://paste.ubuntu.com/24558174/, please improve!)

   ## /etc/udev/rules.d/10-usbdrive.rules
   KERNEL=="sd*", ATTRS{serial}=="0340918060002807", ATTRS{idVendor}=="090c", ATTRS{idProduct}=="1000" SYMLINK+="usb/samsung%n"
   
   ## /etc/fstab
   /dev/usb/samsung1 /media/usb1 ext4 defaults,discard,relatime,nofail 0 2
   
   ## values for serial, idVendor, and idProduct are visible in dmesg output:
   ## run "dmesg -w" while inserting USB drive

Create systemd service

Move the /home folders to the flashdrive

Create symlinks