Adams Bros Blog

11Aug/090

MMC/SDHC Card Readers and Gentoo Linux

Author: Trenton

So, I had a need to use my SDHC card in my Dell Studio 17 (1737) notebook.  So, I set out to find out why it wasn't working.  I ended up finding out that I needed to load mmc_block and sdhci-pci in order to get it to work.  Here's what I did.

16Jun/091

Quick Guide to LUKS Encrypted Home Volumes

Author: Trenton

If you search for information on how to do LUKS encrypted home volumes, you're likely to get these big fluffy documents on how to do it.  Well, if you're like me, you'd like to skip all that fluff, and get straight to the point.  That's what I try to do here.  If you like, you can completely ignore what I'm saying here, and just use the commands; it really isn't complex.

Keep in mind that this will only work for a maximum of 8 users per system.  Anything more than that, and you will have to resort to either full disk encryption, or some other method of encrypting your /home files.

I would try this out on a 1G volume or something just for fooling around.  Then once you've got that working, do it to your actual home directory.  I use LVM with mine, but it could also be a raw partition if you prefer that.  If it is a removable drive, I HIGHLY recommend using LVM, because you will be able to reference it by lvm "name".  Using a partition for external drives becomes difficult, because you cannot name an encrypted volume.

Filed under: Crypto, Linux Continue reading
14Jun/093

Linux Macbook Function Key Mode – fnmode

Author: Trenton

So, I couldn't figure out how to get my Macbook function keys to default to function keys under Linux, rather than media keys such as brightness, volume control, etc.  I searched all over the net for information on this feature, and could only find stuff about pb_fnmode (which doesn't appear in the latest kernels).  So, I finally resorted to grepping "fnmode" out of the sources, and found the location that sets this.  Then, I noticed that the kernel module that handles Mac key mappings had a parameter that could be changed, called "fnmode".  Well, that gave me a clue that it may be in /sys/ somehwere.  So, I searched, and sure enough, it was there.  The following command will set the function keys to be the default action, rather than media keys.

echo 2 > /sys/module/hid_apple/parameters/fnmode

The valid values are (0 = disabled, [1] = fkeyslast, 2 = fkeysfirst)

This effectively reverses the function key/media key mappings.

Filed under: Hardware, Linux 3 Comments
3Jun/098

vmware modules 2.6.30-rc3

Author: Trenton

If you are using VMware-Workstation-6.5.1-126130.x86_64, you will find that it does not work on kernels greater than or equal to 2.6.29.  The vmware modules will not load.  I found one patch for vmware to work with the Linux kernel 2.6.29 on the vmware forums, and I came up with another patch for 2.6.30-rc3 on my own.  If you know who made the original patch (as I have lost the link to the forum), please let me know who that is so I can give credit where credit is due.  Below are the results.

I have tried these changes on 2.6.30-rc3, and 2.6.30-rc7, and they seem to work fine.  I would imagine that they would work on 2.6.30-rc3, 2.6.30-rc4, 2.6.30-rc5, 2.6.30-rc6, and 2.6.30-rc7, but I have not confirmed.  They may also work on 2.6.30 versions that are less than rc3.

30May/0913

Recover LVM Volume Groups and Logical Volumes WITHOUT Backups

Author: Trenton

I recently had a misfortune, in that somehow my volume group meta-data got corrupted, and LVM would not enable the volume group. Essentially, I lost my LVM volume disk. This happened after I resized a volume, and had done a file system check before and after. So, I knew my data was still there.

I did an lvextend on my primary logical volume. Normally this is a routine task, but for some reason, things went very badly for me this time around. I did an "fsck -f" before and after extending the volume and the filesystem (with resize2fs). Everything checked out just fine, so I thought everything was done, and ready to reboot.

Filed under: LVM, Linux Continue reading