Project: Linux on solid state flash laptop


I want to create a new linux project. The laptop have a solit state flash drive with only 128mb ram.

The following must run:
– Debian\Ubuntu as main OS
– Xwindow manager (Flux box, Enlightenment, ICEWM or XFCE)
– PPTP VPN connections
– Remote desktop program for Windows RDP

The main problem of solid state flash is that you can write the disk not forever. So the log & temporary files must be run in the RAM. I found the following solution:


tmp     /tmp            tmpfs   noexec,nosuid,rw,size=1024K     0       0
vartmp  /var/tmp        tmpfs   noexec,nosuid,rw,size=1024K     0       0
varlog  /var/log        tmpfs   noexec,nosuid,rw,size=2048K     0       0


My Distro choice is DSL (damn small linux) because that is a very small distro including window manager.

The first big problem is that i have only a 64mb SSD disk. I must create 57mb for my “fragile” installation. A have 7 MB for my home & swap. I’ll have try it without swap but DSL was very unstable on my laptop.


I found a solution (DSL Create own CD(PDF)) to create a my own installation CD. When I re-mastering the distro I can add items. But soon I’ll try this manner to strip the distribution to a smaller one 🙂


When I remastered the DS, I seen one big KNOPPIX file. Now I must rebuild te KNOPPIX enviroment instead of the DSL. The KNOPPIX file is like a ISO. I must mount the file before i can edit these.

I found the following steps on the internet:

Uncompress the DSL-N *.iso and ‘unpack” the knoppix image

# mkdir /ramdisk/image
# mount /path-to-file/dsl-n-01RC4.iso /ramdisk/image -t iso9660 -o loop,ro
# mkdir /ramdisk/unpack
# mount /ramdisk/image/KNOPPIX/KNOPPIX /ramdisk/unpack -t iso9660 -o ro,loop=/dev/cloop50

Prepare a place to put the files for the re-mastered knoppix image

# mkdir /ramdisk/source
# mkdir /ramdisk/newcd
# mkdir /ramdisk/newcd/KNOPPIX
# cp -Rp /ramdisk/unpack/* /ramdisk/source
# cp -Rp /ramdisk/unpack/.bash_profile /ramdisk/source

Copy additional files to be added to the new knoppix image

# cp /path-to-file/file /ramdisk/source/path-to-file/file
# etc etc

“Pack” the new knoppix image

# mkisofs -R /ramdisk/source | create_compressed_fs – 65536 > ramdisk/newcd/KNOPPIX/KNOPPIX

I’ll try the mount and this works 🙂 So now I must find the big files and strip these. My following step is find a tool like KDirStat to find these files.

Ubuntu 30-Mount Check Annoyance

If you’ve used Ubuntu Linux for longer than a month, you’ve no doubt realized that every 30 times you boot up you are forced to run a filesystem check. This filesystem check is necessary in order to keep your filesystem healthy. Some people advise turning the check off completely, but that is generally not a recommended solution. Another solution is to increase the number of maximum mounts from 30 to some larger number like 100. That way it’s about 3 times less annoying. But this solution is also not recommended. Enter AutoFsck.

AutoFsck is a set of scripts that replaces the file system check script that comes shipped with Ubuntu. The difference is that AutoFsck doesn’t ruin your day if you are so unfortunate to encounter the 30th mount. The most important difference is that AutoFsck does its dirty work when you shut your computer down, not during boot when you need your computer the most!The 30th time you mount your filesystem, AutoFsck will wait until you shut down your computer. It will then ask you if it is convenient for you to check your filesystem. If it is convenient for you, then AutoFsck will restart your computer, automatically execute the filesystem check, and then immediately power down your system. If it is not convenient for you to check your filesystem at that moment, then AutoFsck will wait until the next time you shut down your computer to ask you again. Being prompted for a file system check during shutdown is infinitely more convenient than being forced to sit through a 15 minute check during boot up.

Official Site:


Hi everyone,
this is a simple Howto for owners of laptops with Intel 2200 or 3945 wifi cards. Using these commands will use laptop-mode automatically at bootup to improve your battery life. Additionnaly, there are two scripts to be added to laptop-mode so that it manages the power saving modes on the intel wifi cards. This howto assumes you already have a working wireless setup, there are other threads on getting you wifi working, please keep this thread about power management.

To use laptop-mode by default:


sudo gedit /etc/default/acpi-support

Scroll down change laptop-mode to true:



For some reason, laptop-mode is only started when the AC is unplugged. This might seem fine unless you bootup the laptop on the battery, in which case laptop-mode never gets started. Thus, to enable laptop-mode at boot (taken from a lost thread):


sudo update-rc.d laptop-mode multiuser

Now that laptop-mode is started automatically, we can make sure it manages the power saving on the intel wireless cards (ipw3945 & iwp2200) this way.

To use the power management, you will need to install the wireless tools:


sudo apt-get install linux-restricted-modules-generic wireless-tools

For both intel 3945 (ipw3945 driver) and 2200 (ipw2200 driver) cards:

First, create the helper function file (taken from largecat’s post on page 2 of this thread):


sudo gedit /etc/acpi/

copy & paste this code in the editor, save and exit.


# Power saving setting for the Intel 3945 and 2200 wireless adaptor
# This script relies upon the name of the driver.



SET_I3945_AC_PARMS="set_power 6"
SET_I3945_BAT_PARMS="set_power 7"

SET_I2200_AC_PARMS="power off"
SET_I2200_BAT_PARMS="power on"

# Find all the wireless devices using the supplied driver names.
# Place the interface names on the list WIFI_IFNAMES.
function findWifiIfsByDriver {
    local DEVICE;
    local LINK_TARGET;

    for DEVICE in /sys/class/net/*; do
	if [ -d $DEVICE/wireless ]; then
# See if the driver for $DEVICE matches the supplied one by checking the link to
# the driver.
	    if [ -h $DEVICE/device/driver ]; then
		LINK_TARGET=`readlink $DEVICE/device/driver | sed 's/.*\///'`

		if [ $LINK_TARGET == $1 ]; then

# add the interface name to the list
		    WIFI_IFNAMES=$WIFI_IFNAMES" "`echo -n $DEVICE | sed 's/.*\///'`

# Set all the adaptors using the supplied driver into the supplied
# power saving mode
# $1 - driver name
# $2 - power command
# $3 - power command arguments
function setWifiPwrSave {
    local DEVICE;
    findWifiIfsByDriver $1;

    for DEVICE in $WIFI_IFNAMES; do
#	echo "Would execute $2 $DEVICE $3"
	$2 $DEVICE $3

function intel3945_BatPwrSave {
    setWifiPwrSave "$I3945_DRIVERNAME" "$IWPRIV" "$SET_I3945_BAT_PARMS"

function intel3945_AcPwrSave {
    setWifiPwrSave "$I3945_DRIVERNAME" "$IWPRIV" "$SET_I3945_AC_PARMS"

function intel2200_BatPwrSave {
    setWifiPwrSave "$I2200_DRIVERNAME" "$IWCONFIG" "$SET_I2200_BAT_PARMS"

function intel2200_AcPwrSave {
    setWifiPwrSave "$I2200_DRIVERNAME" "$IWCONFIG" "$SET_I2200_AC_PARMS"

Then we will create 2 scripts. The first will run when the laptop is unplugged, the later when it runs on AC.

On battery:


sudo gedit /etc/laptop-mode/batt-start/

Then copy and paste this code into the editor, save and exit:



# source the helper script
. /etc/acpi/

# set Battery power saving

Make it executable:


sudo chmod +x /etc/laptop-mode/batt-start/

On AC:


sudo gedit /etc/laptop-mode/batt-stop/

Then copy and paste this code into the editor, save and exit:



# source the helper script
. /etc/acpi/

# set Battery power saving

Make it executable:


sudo chmod +x /etc/laptop-mode/batt-stop/

That’s it, you can give it a try by plugging and unplugging the AC and running iwconfig to verify that the Power management: on/off changes (this can take up to 15 seconds to change)