Note: The original forum thread contains additional information on configuring your internal USB drives for use with LVM in order to use two or more drives as one logical filesystem: Original forum thread
Now that you've installed extra internal storage, your OS needs a little configuring to use them properly. The USB drives, SDHC cards, etc. you've soldered in are permanent extra storage, unfortunately the OS is still treating them as removable USB sticks. This means that they won't always have the same device name across reboots, and if you're using GNOME or XFCE (dunno about KDE, sorry), they still show up on the desktop as removable drive icons. Here's how to fix that.
First, to give the devices persistent names and ensure they're mounted at boot, you need to add udev rules for them. Every device has certain unique identifiers, among them the serial number and the UUID. The serial number is unique to each drive, and the UUID is unique to each partition on each drive. To find out this information, open a terminal and, assuming you have a USB stick that is /dev/sdb (do “dmesg | grep sd” to determine which drive is which) and run “udevinfo -q env -n /dev/sdb1”. You should see a bunch of information, among which are lines that look like this:
ID_SERIAL_SHORT=ATA_SILICONMOTION_SM223AC ID_FS_UUID=48a1ece8-1bc9-42ad-b008-f46ebeb2edaf
Write all these down. The above is actually the info for my internal SSD, as this command will no longer work after you've set up the udev rules for your other drives. Now that you have the serial and UUID for the drive and partition, navigate to /etc/udev/rules.d (I'm using Ubuntu, this should be the same for Debian-based distros, others may vary) and create a file named 01-(yourname).rules (e.g. mine is named “01-nickca.rules”). You can actually name it whatever you want as long as it starts with 01- and ends with .rules. Here's my configuration, and the udev file I've set up:
8GB SDHC, never removed and mounted on /media/Documents 16GB internal USB, 15GB partition 1 for data, 1GB partition 2 for swap 16GB internal USB, single drive-spanning partition for data
And the udev file:
# Rules to ensure USB storage devices have persistent names and are mounted
# at boot.
# SD card reader
BUS=="usb", KERNEL=="sd*", SYSFS{serial}=="146030377350", NAME="SDHC", OPTIONS+="last_rule", RUN+="/bin/mount /dev/SDHC"
# Internal USB 1, partition 2 (swap)
BUS=="usb", KERNEL=="sd?2", SYSFS{serial}=="00000000002548", NAME="swap", OPTIONS+="last_rule", RUN+="/sbin/swapon /dev/swap"
# Internal USB 1, partition 1 (storage)
BUS=="usb", KERNEL=="sd?1", SYSFS{serial}=="00000000002548", NAME="USB16A", OPTIONS+="last_rule"
# Internal USB 2, partition 1 (storage)
BUS=="usb", KERNEL=="sd?1", SYSFS{serial}=="00000000003D46", NAME="USB16B", OPTIONS+="last_rule"
With this file, the SDHC is given the name /dev/SDHC, partiton 2 (swap) on USB stick A is /dev/swap, partition 1 (data) on USB stick A is /dev/USB16A, and USB stick B is /dev/USB16B. The SDHC and swap are automatically mounted (the “RUN” directive). I'm using serial numbers here, UUIDs are probably possible, but I couldn't get them to work. The KERNEL directives for the USB sticks are used to differentiate between the swap and data partitions since the serial number applies to the whole drive. So if USB stick A is recognized as /dev/sdb at boot, the data partition is /dev/sdb1 and swap is /dev/sdb2, and these rules map them to /dev/USB16A and /dev/swap. If you've got just 1 partition on your USB drive, you can dispense with this and just use “KERNEL==sd*” like I did with the SDHC card. Finally, add lines like these to /etc/fstab:
# For the SDHC card /dev/SDHC /media/Documents ext2 defaults,noatime 0 0 # For the swap /dev/swap swap swap defaults 0 0
I haven't added the other partitions as I'm setting them up in an LVM configuration and mounting it under /usr, which I haven't finished yet, but you get the idea.
Now that you've set this up, the drives will still appear on your desktop. Even the 1GB swap partition I made appears, which is obviously undesireable. GNOME and XFCE use a subsystem called HAL (hardware abstraction layer) to deal with removable drives and other peripherals such as cameras, MP3 players, etc. You might want them to appear, but if not, here's how to make your drives invisible to HAL. This is where the UUIDs you got eariler come into play, hopefully you wrote them down, since if you've added the udev rules and rebooted, you won't be able to get them with udevinfo anymore. If you need to get them again, comment out all the lines in your 01-(whatever).rules file and reboot. Anyway, UUIDs at the ready, edit the file /etc/hal/fdi/policy/preferences.fdi and add some lines that look like this:
<device>
<match key="volume.uuid" string="ff105bcd-9824-40bb-b661-493b1b6afdf6">
<merge key="volume.ignore" type="bool">true</merge>
</match>
<match key="volume.uuid" string="22d2c1a3-71cb-4b3f-a741-8231505fa545">
<merge key="volume.ignore" type="bool">true</merge>
</match>
<match key="volume.uuid" string="8dbfdbe8-3d9d-4cef-bcd0-17bfa5f5de7f">
<merge key="volume.ignore" type="bool">true</merge>
</match>
</device>
Add them at the end of the file above ”</deviceinfo>”. These are the uuids for my swap partition and the data partitions on the two USB drives. Now that you've added this, either reboot or run ”/etc/init.d/hal restart” and restart X. Presto, the removable drive icons no longer show up as “16G removable drive” or what have you. Now your new USB drives are, more or less, treated like permanent drives by the OS. Remember, all this is an example from my system, your configuration will be totally different, except you can use the udev rule for the SDHC if you like as the serial number is the same in all eeePCs.