View arch-boot.txt
This deceptively simple thing is much more trouble than it seems. Its difficulty can be distilled down to two main reasons:
####Removable device woes
Windows only being able to read from the first partition on a device that is identified as a removable drive.
More on the removable media bit from [WHDC — FAQ for Driver and Hardware Developer](http://msdn.microsoft.com/en-us/windows/hardware/gg487419.aspx#EWD):
> The removable media device setting is a flag contained within the SCSI Inquiry Data response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the Removable Media Bit (RMB). An RMB set to zero indicates that the device is not a removable media device. An RMB of one indicates that the device is a removable media device. Drivers obtain this information by using the **StorageDeviceProperty** request.
####BIOS troubles
“Error 18: Selected cylinder exceeds maximum supported by BIOS” when attempting to boot from the second partition with GRUB bootloader.
This second reason is curious indeed
View sftp-proftpd.txt
Debian sid’s proftpd (1.3.4) still seems to have iffy Unicode support, so one way to get UTF8 working reliably in proftpd is to use an SFTP connection. The first thing to do is ensure a UTF8 locale is in use:
$ locale
LANG=en_GB.utf8
If you do not see “.utf8” appended to the LANG shell variable, execute the following:
# export LC_ALL=en_GB.utf8
# export LANG=en_GB.utf8
To ensure this is applied at every boot, add it to `/etc/profile`.
View linux-power-management
## Preamble
There are lots of tools out there that set power management, some more transparent (powertop), some less so (laptop-mode). Often it is hard to know what exactly the tool is doing to improvement power management. Here I would like to document some of the things I do to improve power efficiency and sometimes performance as well.
/etc/sysctl.d/99-sysctl.conf
> # To fix Dropbox not being able to handle too many files
> fs.inotify.max_user_watches = 524288
>
> # VM writeback timeout (suggestion from powertop: In hundredths of a second, this is how often pdflush wakes up to write data to disk.)
> vm.dirty_writeback_centisecs = 1500
View repetier-printrbotSM
## Setup
Straightforward. Install repetier-host package in AUR.
## Menu shortcut
The menu shortcut does not work; it runs a different command from /usr/bin/repetierHost. Copy the command over from /usr/bin/repetierHost to the menu shortcut using a menu editor.
## Connecting
Trying to connect to the Printrbot in RepetierHost on a clean install produces this error:
View disk-tweaking
A quick reference and note to self. May be fleshed out in greater detail in future.
**NCQ queue depth**: `/sys/block/sd*/device/queue_depth`
**readahead blocks**: `/sbin/blockdev --getra /dev/md* (or /dev/sd*)`
**stripe cache size**: `/sys/block/md*/md/stripe_cache_size`
**[edit]** A fuller version has been posted on [Ubuntu forums](http://ubuntuforums.org/showpost.php?p=11105148&postcount=7). The tuneraid script I use is as follows:
```bash
#!/bin/bash
###############################################################################
View xbindkeys-rat7
Earlier, I had written [a guide to getting the Logitech MX Revolution working in Linux](http://writoscope.me/2010/02/06/logitech-mx-revolution-in-arch-linux/ "Logitech MX Revolution in Arch Linux"). Some time ago the friction-free scroll mode broke down on me, so I decided to switch to a new mouse: the RAT 7 (this happened quite some time ago; I just got lazy in writing this). I won’t argue my purchase decision — you either like it or you don’t — but if you have one and want to get it working, then read on.
Details of how to use `xbindkeys` and `xmacro` are detailed in the above-linked guide, and I will not repeat it here.
#### The cursor doesn’t respond!
From [a very informative bug report](https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/615892/comments/13 "Bug #615892 “Madcatz Cyborg R.A.T. 7 focus issues” : Bugs : “xserver-xorg-input-evdev” package : Ubuntu") on `xorg-xserver-input-mouse`, the problem was tracked down to the mode selection button next to the left-click button. App
View advanced-format-drives
As some hard drive buyers might be aware, [4K-sector](http://www.anandtech.com/show/2888) hard drives have already appeared in the market. Anandtech has [a quick primer on these Advanced Format drives](http://www.anandtech.com/storage/showdoc.aspx?i=3691), and how they're different.
One point to nitpick on, though: while Linux is capable of creating aligned partitions, not all its partitioning tools do so by default. [GParted](http://en.wikipedia.org/wiki/Gparted) creates an `msdos` [partition table](http://en.wikipedia.org/wiki/Partition_table) on new drives by default, and it starts at LBA 63. The result of this is a noticeable slowdown in file transfer to and from the Advanced Format drive.
At the time of this post, the only drives available with 4K-sectors are the [Western Digital Caviar Green Series](http://www.wdc.com/en/products/products.asp?DriveID=773), designated with the model name EARS (the older models are labelled EADS). If you are using one of these new drives under Linux, you should personal
View xbindkeys-logitech
There is a multitude of guides out there describing various ways of getting the [Logitech MX Revolution](http://www.logitech.com/en-nz/mice_pointers/mice/devices/130) mouse working in various flavours of Linux. I figured one more guide wouldn't hurt.
Here, I describe one method using `xbindkeys` and `xmacro`.
#### xbindkeys
From the man page:
> XbindKeys is a program that grab keys and mouse button events in X and starts associated shell command.