Linux

Why?

Advantages

Handicaps

More

Findings

Basics

Keys and Shortcuts

Shell

Files and Streams

System

Debian Package Management

User

Network

Devices

Graphics

Shell Programming

Programming

Configuration

Software Packages


Advanved

System Info

Live CPU/RAM/Swap Monitoring

Mainboard

...

CPU

Memory

Graphics

...

Network

...

Storage

Devices

...

Software

Summary Script

Check Integrity

Check Performance

Modules

Backup

Fault Recovery

Set root password

Access from other system (e.g. Live CD)

Run fsck on a VeraCrypt (TrueCrypt) volume

  1. veracrypt -d crypted.hc - dismount if mounted
  2. veracrypt --filesystem=none crypted.hc - mount the volume without mounting its filesystem
  3. veracrypt -l - list mounted volumes
    output will be: /dev/mapper/veracrypt1 (or similar)
  4. sudo fsck -fC /dev/mapper/veracrypt1 - do the check
  5. veracrypt -d crypted.hc - dismount
  6. veracrypt --fs-options=rw,noatime crypted.hc mountpoint/ - remount

Copy disk to virtual disk

  1. # dd if=/dev/sdc bs=1M | pv -s $(blockdev --getsize64 /dev/sdc) -B 1M | VBoxManage convertfromraw stdin mydisk.vdi $(blockdev --getsize64 /dev/sdc)
  2. see also How to migrate existing Windows installations to VirtualBox

Make a compressed image of a dmcrypt partition

  1. TODO

Overwrite a disk with zeroes for secure deletion, and show a progress bar

Data Recovery

Recovery from Physically Damaged Drive

  1. apt-get install gddrescue - gddrescue with logfiles allows to be called multiple times and rescues only what is left untried; don't mistake for dd_rescue. See "info ddrescue" for good explanations and examples, e.g., how to find out which files are in bad areas of a disc.
  2. ddrescue -s50M /dev/hdc hdimage.raw logfile.log - rescue most important parts first: copy first 50 MB
  3. ddrescue -s1M -dr3 /dev/hdc hdimage.raw logfile.log - rescue important, try hard: copy first 1 MB, direct access, max-retries 3 times
  4. ddrescue -i39G -s1G /dev/hdc hdimage.raw logfile.log - rescue end of disk (example disk would have a size of 40 GB)
  5. ddrescue -i19G -s2G /dev/hdc hdimage.raw logfile.log - rescue middle of disk (example disk would have a size of 40 GB)
  6. ddrescue -n /dev/hdc hdimage.raw logfile.log - rescue whole disk quickly: no-scrape (stop after trimming, saves time, reverses automatically)
  7. ddrescue -dr3 /dev/hdc hdimage.raw logfile.log - rescue whole disk thoroughly: direct access, max-retries 3
  8. ddrescue -dM /dev/hdc hdimage.raw logfile.log - re-try everything exhaustively: direct access, re-trim
  9. ntfsinfo -m [-f] [device] - get NTFS information, e.g. cluster size, use -f if volume dirty, might have to mount via loopback
  10. ddrescuelog -l- -b4096 logfile.log > badblocks.txt - prints a list of affected sectors/clusters when file system block (cluster) size is 4096
  11. ntfscluster [-f] -c 206573-206585 [device] 2>> /dev/null - show file name for range of clusters, use -f if volume dirty, might have to mount via loopback
  12. blkstat hdimage.raw 123456789 - determines the allocation status of the file system sector number (from badblocks); tool from sleuthkit
  13. ifind hdimage.raw 123456789 - determines the inode associated with the sector (can take some time and CPU)
  14. istat hdimage.raw 7654321 - shows affected file properties (maybe name, depends on file system) and its list of inodes
  15. fls -rFp hdimage.raw > filelist.txt - prints a complete list of files
  16. then you can make a backup copy of the image and mount it
  17. see also: magicrescue to scan for lost files

Move /home to another mountpoint

  1. check size of /home: du -sh /home
  2. create an empty formatted partition that is large enough
  3. log off, use terminal
  4. find new partition: fdisk -l
  5. mount new partition: mkdir /mnt/tmp; mount /dev/sda6 /mnt/tmp
  6. sync content: rsync -avx --progress /home/ /mnt/tmp (cp is faster but don't guarantees consistency)
  7. mount new /home: mount /dev/sda6 /home
  8. check result: du -sh /home; mount|grep /home
  9. unmount tmp: umount /home
  10. remove old data: rm -rf /home/* (don't remove the folder itself)
  11. get UUID of new partition: blkid|grep sda6
  12. enter line to /etc/fstab: UUID=f72aac23-092f-4484-b35c-f222c106d716 /home ext3 defaults 0 2
  13. leave chroot: exit
  14. reboot

Hide partion from Nautilus

Mount GMX Mediacenter

SSH Tunneling

VNC over SSH

Internet Connection Sharing

TV Cards

Powersave

SSD Optimization

Use old OSS application with PulseAudio

  1. padsp <program>

Tweaks

Network issues

Configure EFI

Misc Issues

Flash Problems


File System Hierarchy

Info

/bin

/boot

/dev

/etc

/lib

/lost+found

/media

/mnt

/opt

/proc

/root

/sbin

/sys

/tmp

/usr

/var

~


Distribution Specific

Ubuntu

Xubuntu

Knoppix


Game Equivalents/Clones


Links

Linux

Ubuntu

Hardware support

Other