Linux

Why?

Advantages

Handicaps

More

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

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
  2. ddrescue -s50M /dev/hdc hdimage.bin logfile.log - rescue most important parts first: copy first 50 MB
  3. ddrescue -s1M -r3 -d /dev/hdc hdimage.bin logfile.log - rescue important, try hard: copy first 1 MB, max-retries 3 times, direct access
  4. ddrescue -i39G -s1G /dev/hdc hdimage.bin logfile.log - rescue end of disk (example disk would have a size of 40 GB)
  5. ddrescue -i19G -s2G /dev/hdc hdimage.bin logfile.log - rescue middle of disk (example disk would have a size of 40 GB)
  6. ddrescue -n /dev/hdc hdimage.bin logfile.log - rescue whole disk quickly: no-split (stop after trimming, saves much time)
  7. ddrescue -dr3 /dev/hdc hdimage.bin logfile.log - rescue whole disk thoroughly: direct access, max-retries 3
  8. ddrescue -dRT /dev/hdc hdimage.bin logfile.log - re-try everything exhaustively: direct access, re-trim, try-again
  9. then you can make a backup copy of the image and mount it
  10. 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