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

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 TrueCrypt volume

  1. truecrypt -d crypted.tc - dismount if mounted
  2. truecrypt --filesystem=none crypted.tc - mount the volume without mounting its filesystem
  3. truecrypt -l - list mounted volumes
    output will be: /dev/mapper/truecrypt0 (or similar)
  4. sudo fsck -fC /dev/mapper/truecrypt0 - do the check
  5. truecrypt -d crypted.tc - dismount
  6. truecrypt --fs-options=rw,noatime crypted.tc 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. ddrescuelog -l- -b4096 logfile.log > badblocks - prints a list of affected sectors when file system block size is 4096
  10. blkstat hdimage.raw 123456789 - determines the allocation status of the file system sector number (from badblocks); tool from sleuthkit
  11. ifind hdimage.raw 123456789 - determines the inode associated with the sector (can take some time and CPU)
  12. istat hdimage.raw 7654321 - shows affected file properties (maybe name, depends on file system) and its list of inodes
  13. fls -rFp hdimage.raw > filelist.txt - prints a complete list of files
  14. then you can make a backup copy of the image and mount it
  15. 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

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

Shopping

Other