Chris on July 21st, 2010

Preseeds are poorly documented. This is a note to myself on how to reproduce an install

sudo apt-get install debconf-utils # It is part of the debconf-utils package.
debconf-get-selections –installer > somefile.txt
debconf-get-selections >> somefile.txt “

via [ubuntu] preseeding installation 8.10 – how to preseed “encrypted directory” prompt? – Ubuntu Forums.

Chris on March 4th, 2010

Useful reference on building a dpkg from source:  Rolling your own Debian packages part 2.

Chris on October 27th, 2009

So there is a bug in Synergy where if you’ve got a Windows box as a synergy client, and you attempt to rdp/rdesktop to another windows box from that windows-synergy-client box, the Right Shift key doesn’t work.

The following command will map the right shift to the left shift in X and work around this bug:

xmodmap -e “keycode 62 = Shift_L NoSymbol Shift_L NoSymbol Shift_L”

You may want to run xev and make sure your right-shift is keycode 62.

Useful Reference: http://www.columbia.edu/~djv/docs/keyremap.html

Chris on February 20th, 2008

How to mount a filesystem inside a harddrive image

# losetup /dev/loop0 /path/to/diskimage
# fdisk -l /dev/loop0
(example)
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1044 8385898+ c W95 FAT32 (LBA)
/dev/sdb2 1045 19457 147902422+ 83 Linux

suppose you want to mount the partition on sdb2, the offset for that
would be 8225280 * 1045 = 8595417600.

detach the disk image
# losetup -d /dev/loop0
and setup the loop for the partiion
# losetup -o8595417600 /dev/loop0 /path/to/diskimage
and mount it
# mount -t fstype /dev/loop0 /path/to/mountdir