Translations of this page:

Ubuntu 8.04 (Hardy Heron) on the Asus Eee PC

Ubuntu 8.04 was released in April 2008. It mainly works out of the box upon installation.

If you're looking for instructions on how to install Ubuntu, try the separate wiki page for this: Installing Ubuntu 8.04

(Note: When you're editing certain system files, you're required to be the root user. In order to become the root user, you must hold down Alt+F2. Then type in gksudo gedit. After gksudo gedit, type the file you're editing. For example: gksudo gedit /etc/default/halt. Then click run. You can now edit and save system files. However, for each system file you want to edit, you must hold down Alt+F2 and type in gksudo gedit (and the location of the file) each time you want to edit a system file.)

The bits you can't live without

Array.org Eeepc kernel

Adam McDaniel (also a user from eeeusers.com) has made a custom eeepc-optimized kernel available via synaptic/apt-get. This will setup your Wifi, Microphone, and eeepc_acpi modules instantly along with a few more features.

Using this custom kernel eliminates the need to manually compile the extra hardware modules, and fixes some common problems experienced with the generic Ubuntu kernel. For more information, see Array.org Eeepc Kernel for Ubuntu wiki page, or http://www.array.org/ubuntu.

NiceeePC

NiceeePC it's an automatization script written in Bash exclusively for the ASUS eeePC and Ubuntu GNU/Linux. Actually, it can fix almost every problem found in a standard installation of Ubuntu like ACPI support, Wifi, OSD keys, sound, bootup speed, etc. For more information visit: NiceeePC wiki page.

Enabling wifi (EeePC 900A and earlier)

Wireless internet does not work on the Eee after installation. To update the drivers, open a terminal window (Applications>Accessories>Terminal) and enter the following commands:

sudo apt-get update
sudo apt-get install build-essential
wget 'http://snapshots.madwifi.org/madwifi-hal-0.10.5.6-current.tar.gz'
tar zxvf madwifi-hal-0.10.5.6-current.tar.gz
cd madwifi-hal-0.10.5.6-*
make clean
make
sudo make install
sudo reboot

System updates (specifically, new generic kernels) will reverse these changes; simply repeat the above to make your wifi work again.

Optionally, the Array.org Eeepc Kernel for Ubuntu ships with the ath_pci.ko madwifi wireless module pre-built.

Enabling wifi (EeePC 900A and earlier)

[FIXME: add instructions for manually building the rt2860sta.ko module]

Optionally, the Array.org Eeepc Kernel for Ubuntu ships with the rt2860sta.ko wireless module pre-built.

Enabling wired ethernet (EeePC 901 and later)

Note, these steps are only necessary for the EeePC 901 and later. Ubuntu (Hardy Heron) support the ethernet card on the 900A and earlier, out of the box.

[FIXME: add instructions for manually building the atl1e.ko module]

Optionally, the Array.org Eeepc Kernel for Ubuntu ships with the atl1e.ko wireless module pre-built.

Common problems with the wired/wireless hardware

Problem: The network worked under Xandros, but after I installed Ubuntu and all the drivers, I cannot get a signal

Solution: Make sure the and LAN, WLAN options are enabled in the BIOS. (Asus actually shipped some EeePCs with these options disabled. Xandros actually ignored the setting!)

Problem: Ethernet interface stops working. The network adapter is picked up and I have enabled the restricted driver manager, but it just doesn't work, my router shows no link light when the eeePC is plugged in.

Solution: Unplug the eeePC and remove the battery, and then put the battery back in. Somehow this resets something in the eeePC and always gets the wired Ethernet to work again.

Make it shut down properly

Upon installation, Ubuntu does not shut down the Eee properly. Shutting down your Eee will make the screen go entirely blank, but does not cut the power, and you will have to hold the power button, for 5 seconds, to fully shut it down.

Fix #1:

Add the following line:

rmmod snd-hda-intel

to the end of the /etc/default/halt script in order to make the Eee shutdown completely.

Fix #2:
  1. Upgrade your BIOS to 0802 or later*
  2. Create a new file (or append to the existing file) /etc/modprobe.d/snd-hda-intel
options snd_hda_intel power_save=10 power_save_controller=Y

*In my case I upgraded my EeePC 900 BIOS from 0601 to 0802 using How to update your bios. Earlier versions than 0802 might be okay, but probably not versions earlier than 0601. YMMV

Stop Firefox hanging

You may find that Firefox regularly hangs or freezes. There's a way of fixing this, for now…

Choose Edit>Preferences>Security and turn *off* the attack and forgery warnings. That'll eliminate the issue entirely.

Additional tweaks to make it work perfectly

Do it the easy way with an all-in-one script...

ubuntueeetweak

The script found at http://www.x2on.de/eeepc/ubuntueeetweak.sh works great and will take care of most of the tasks listed in the sections below, and you can easily edit the script to remove the changes you don't want to make. The script enables the following changes:

  • Setting smaller font sizes,
  • Smaller toolbars (icons only),
  • Disabling UI sounds,
  • Fixing the mute key,
  • Enabling fullscreen with <Alt>-F11,
  • Setting suspend when closing lid, blank screen,
  • Getting rid of the battery warning that is constantly displayed at startup,
  • Fixing Compiz so that windows can be dragged (holding <Alt> while left clicking and dragging) beyond the top of the screen,
  • Installing the ACPI modules (so that the hotkeys will work),
  • Installing the madwifi driver to enable the internal wireless,
  • Installing the OSD (On-Screen Display) for the hotkeys (wireless toggle, mute, volume, etc.), and
  • Configuring sound.

(Thanks to http://www.x2on.de!!!!)

  • Eee PC 900 users will need to comment out lines 60-62 inclusive to prevent this script from breaking the sound.
  • Line 51 should be changed to read “cd madwifi-ng-r3366+ar5007”

RiceeeyTweak

There is another script at http://eee.ricey.co.uk/files/eee/RiceeeyTweak.sh, which includes the above script, and adds the following tasks:

  • Building the Eee overclocking driver,
  • Installing modules and driver (related to overclocking),
  • Installing overclock utilities,
  • Reducing drive writes, and
  • Fixing the shutdown problem

I have not used this script, and cannot speak to it's effectiveness and/or faults

(Thanks to http://eee.ricey.co.uk!!!)

Or, if you like to do it yourself...

Enabling processor scaling

Note: based on actual power measurements, there seems to be little reason to bother with frequency scaling. See Power consumption of the Eee PC. Read on if you want to try anyway.

At installation, Ubuntu will not perform processor scaling (which Xandros doesn't, incidentally). If you leave your computer on AC power all day, this is just fine; but if you don't, you may notice your machine's battery does not last anywhere near as long. It may also get much hotter.

Luckily, you can fix this: so that your processor runs much slower when you're just typing (and thus saves your battery life); this tweak also increases the processor speed when you're using Ubuntu for something more processor-heavy.

First, right click the far-left of the panel at the top of the screen, and choose “Add to panel”. Type 'scaling' into the search box, and add the CPU Frequency Scaling Monitor. You'll get an error that frequency scaling isn't enabled in your hardware (accept it), and it'll show that your processor is running at 630MHz.

Then, go into your terminal and type the following:

sudo apt-get remove powernowd
sudo apt-get install cpufrequtils sysfsutils
sudo modprobe p4_clockmod

You should spot at this point that your processor has slowed down. Hurray! You've just enabled processor scaling. We need to make this stick now, so you need to pop into a config file:

sudo nano /etc/sysfs.conf

…and add the following line:

devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand

…then, edit a different config file:

sudo nano /etc/modules

…and add these two lines:

p4_clockmod
cpufreq_ondemand

…create files for ACPI, so that it goes in full power mode as soon as you put on AC power:

sudo echo > /etc/acpi/ac.d/90-cpufreq.sh '#!/bin/sh'
sudo echo >> /etc/acpi/ac.d/90-cpufreq.sh '/usr/bin/cpufreq-selector -g performance'
sudo echo > /etc/acpi/battery.d/90-cpufreq.sh '#!/bin/sh'
sudo echo >> /etc/acpi/battery.d/90-cpufreq.sh '/usr/bin/cpufreq-selector -g ondemand'
sudo chmod +x /etc/acpi/ac.d/90-cpufreq.sh
sudo chmod +x /etc/acpi/battery.d/90-cpufreq.sh

…finally, reboot, just to make sure you've done the trick, using

sudo reboot

Your processor speed applet should still say it's running very slowly (125MHz on this machine), but doing anything CPU-intensive will kick it back up to full speed as required. You may notice the machine become a less responsive - it can take a few seconds for it to decide to increase the clock frequency.

You can change the minimum speed the governor will use by adding the following line to /etc/sysfs.conf:

devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 337000

This will make the governor a little less effective for a little more initial speed.

Note: with p4_clockmod loaded, the EEEPC will claim a top speed of 900MHz - a full 33% faster than it was doing. Unfortunately that's not true - benchmarks will report the same performace with and without the module, so it must still be limited to 630 Mhz. This is described in more detail elsewhere on the wiki - including EEE-specific kernel module(s) which may allow you to achieve 900Mhz.

[TODO: add linkies]

*I found that the processor scaling as enabled above actually slows down my Eee (4GB Surf 701 w/2GB ram) - the main menu is much slower to pop up and you can see weird artifacts in the graphic as the icons in the main menu are rendered. If you want to speed up your processor, I'd recommend searching the forums for the info on how to do this by flashing to a special version of the bios that enables you to enable performance mode (900Mhz). If I recall, after you enable 900Mhz, you can then flash to any other, newer, more stable bios, and the change in processor speed will remain, even after the new bios is installed.

Manual control of the processor scaling using speed applet

Non-root users can't adjust the CPU speed with the speed applet, you can take the security risk of providing the speed applet with root capabilities by doing

 sudo chmod +s /usr/bin/cpufreq-selector

… and now you left click with your mouse on speed applet and change the values as your desire.

All hotkeys

Just do as described on forum: http://forum.eeeuser.com/viewtopic.php?pid=354550#p354550 But, author has changed the address of the script, now it's address is:

http://www.informatik.uni-bremen.de/~elmurato/EeePC/Ubuntu_ACPI_scripts-EeePC_900A_901_1000.tar.gz

You'll got wokling wi-fi, sound, screen, process manager hotkeys, all with OSD.

As described in his post, you can change the commands, binded to 4 top keys (above the keybord). In the start of /etc/acpi/eeepc-actions.sh you can see this:

command1=/usr/bin/firefox

so, you can change it to what you want. In the end of the script we can see:

#su $user -c $command1 &

If you de-comment this line (removing #), your command will be executed. BTW, there's no need to rerun acpi-daemon after changes. And, of course, you can bind multiple actions on one hotkey.

ACPI - fix the hotkeys, camera, etc

To get proper support for hotkeys, turning off the camera, etc. you need the eeepc-acpi module.

Install it by:

sudo apt-get install module-assistant eeepc-acpi-source
sudo m-a a-i eeepc-acpi
sudo sh -c 'echo eeepc-acpi >> /etc/modules'

This installs the source files for the module and builds it for your running kernel. You have to repeat the m-a a-i eeepc-acpi part after you upgrade your kernel (as by using apt-get dist-upgrade)

Make sure the CAMERA option is enabled in the BIOS. (Asus actually shipped some EeePCs with this option disabled. Xandros actually ignored the setting!)

Optionally, the Array.org Eeepc Kernel for Ubuntu ships with the eeepc-acpi.ko module pre-built.

Startup

There have been a number of reports of long boot-up times that appear to trace back to a problem in the clocksource detection. To test, interrupt grub by pressing escape while it's counting down. Hit 'e' to edit the default boot option, then arrow down to the kernel line and hit 'e' again. At the end of the line (after the “quiet” and “splash” options), append:

clocksource=hpet

Hit enter, then hit 'b' to continue booting. Boot time could be 40+ seconds faster (for SSD installations).

To make this change permanent, after booting into Ubuntu, edit the file /boot/grub/menu.lst (you'll need root access, so sudo it). Find the following line:

# defoptions=quiet splash

Edit it to read as follows:

# defoptions=quiet splash clocksource=hpet

(Note: defoptions only changes the kernel options for the default boot option, and leaves the others alone. If you want to make the change for all options, including the recovery mode, use kopt instead, which is located a few sections above defoptions.)

Save the menu.lst file and exit, then from the terminal, run

sudo update-grub

Reboot, and your new option should take effect.

Audio: Internal Microphone Fix

EeePc 700-series ONLY

Important: DO NOT do this step if you have an EeePC 900 or later! If you do, it might temporarially break your sound recording/playback. Remove it and reboot!

Add:

options snd-hda-intel model=3stack-dig

to /etc/modprobe.d/snd-hda-intel (create this file, if it doesn't exist)

EeePc 900 and later

The internal microphone on these devices are controlled by the ALC662 (900) and ALC269 (901 and later) chipsets. Support was added for the 900-series in Alsa v1.0.17, and the 1000 & 1000H in v1.0.18 (un-released as of 2008-09-25). Ubuntu Hardy ships with Alsa v1.0.16.

It is possible to download v1.0.18rc3 to compile and install it manually, but the specific code that makes these devices work has been back-ported and is available in the Array.org Eeepc Kernel for Ubuntu.

Adjust mixer levels (all models)

Once you reboot with your appropriate fix, your internal microphone may need some adjustment. You can use the gnome-volume-control program, or open a terminal and run these commands:

amixer "Input Source" "Front Mic"
amixer "Capture" "80%" "cap" "unmute"
amixer "Front Mic Boost" "30%" "unmute"
amixer "Front Mic" "100%" "mute"

Note, that last command, “Front Mic” must be muted as this refers to the output channel. Unmuting this will result in some pretty nasty feedback!

Audio after suspend/resume

For some reason the sound doesn't always come back after resuming on EeePc 90x hardware. Alsa needs to be instructed to specifically suspend and resume its own modules before the OS does.

(Note: this doesn't appear to be a problem under EeePc 70x hardware, or for Gutsy, however I cannot confirm :)

Warning: After applying this hack you may see a warning message after resuming that says the gnome-mixer has quit unexpectedly. Just click the reload button each time, or hit cancel to remove the applet. Currently there is no work-around to this problem.

Note: This may not be a 100% solution. After the resuming, the sound device tests work (System –> Preferences –> Sound), audio on applications like Skype work, but the Gnome 'System Sounds' still do not work after resuming even after reloading the mixer (e.g. the 'logout' sound no longer plays). If you log out and log back in again (no reboot needed), the 'System Sounds' do come back, so perhaps some other Gnome item also needs to be restarted.

Step 1: Modify /etc/default/alsa and change “force_unload_modules_before_suspend” to:

force_unload_modules_before_suspend="snd_hda_intel"

Step 2: Create /usr/lib/pm-utils/sleep.d/45sound

#!/bin/bash

if [ ! -x /sbin/alsa ]; then
        exit 0;
fi

case "$1" in
        hibernate|suspend)
                /sbin/alsa suspend
                ;;
        thaw|resume)
                /sbin/alsa resume
                ;;
        *)
                ;;
esac

exit $?

Step 3: Make /usr/lib/pm-utils/sleep.d/45sound executable:

$ sudo chmod +x /usr/lib/pm-utils/sleep.d/45sound

OSD

Note: This section is obsolete for 90x series.

This tweaks dosn't work for me (but that's not the point). This tweaks will not bring you any kind of On Screen Display. But if you simply install this eee-osd-package you'll get everything to work. Every LED, any special key (except the LED/LCD: fn+f5) will work. And you get a nice On Screen Display. This package is worked around the original progemm from Xandros, as they released their source. There is a small bug I recognized, don't press the buttons not as quickly as you can, your OS will stumble.

However Adam is working the team from Ubuntu-Eee on a similar package. The package is still in development, but eventually will be released on the array.org repository as eeepc-config, but will also handle several other manual tweaks descried on this page.

ScreenResolution

There can be issues with the screen resolution with Hardy with 640×480 being the only display mode

sudo apt-get install 915resolution

Will fix this and allow 800×480 to be selected.

Alternatively, make sure you have installed and are using the new mode-setting intel driver, known as “intel”. The package names for the drivers are prefixed with “xserver-xorg-video-”.

Explanation: The old “i810” driver relies on the BIOS for mode-setting, requiring 915resolution to patch the BIOS image in-memory and add missing modes.

Note: If one installed on a 900, in safe video-mode, the X11 driver is set to Vesa by default, giving only 640×480 and 800×600 resolutions. Editing “vesa” to “intel” in /etc/X11/xorg.conf will fix the problem:

Section "Device"
      Identifier      "Configured Video Device"
      Driver          "intel"
EndSection

To be clear: 915resolution is not needed if you can successfully change the driver from “i810” to “intel”.

Ultra bright LCD

This hack is a way to set any brightness value supported. The default max value is ~50% of eee display panel documented brightness. (Text copied from http://www.ubuntu-eee.com/index.php5?title=How_to:_Ultra_Bright_LCD)

  • Open the console and type:
sudo setpci -s 00:02.1 f4.b=ff
  • Using the backlight control keys will reset it to default max of 80% again.

Don't know if it's a safe hack though….

Fixing Compiz

Unconstraining windows from moving beyond the top of the screen

The ability to move windows around on the Eee's small screen to view sections of the window that won't fit on the screen is a crucial function. This is accomplished by holding the <Alt> key while left clicking and dragging a window on the desktop.

However, with a new installation of Hardy, Compiz is, by default, enabled, and will not allow windows to be moved beyond the top of the desktop (screen). There are two options to remedy this problem: disable Compiz, or fix Compiz.

To fix this issue in Compiz, simply open a terminal and enter the following command:

gconftool-2 --set /apps/compiz/plugins/move/allscreens/options/constrain_y --type bool 0

Note: This fix will not work if you issue the above command as a root user (by placing sudo at the beginning of the above command).

Mail client launching, when AC is plugged in

This occurs because the asus-acpi module sends hotkey events when connecting to AC power with the wrong code (for the Eee; it's surely the right one on other Asus laptops).

Comment out all lines in /etc/acpi/events/asus-mail (by prepending a #), and restart acpid with sudo /etc/init.d/acpid restart.

USB Tethering Internet with G 3G

For some reason this seems to be more difficult to do than it should be, probably since it requires both devices to be configured correctly.

you need to build the rndis driver from svn

svn co https://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite
cd usb-rndis-lite/
make
sudo ./clean.sh
sudo make install

edit

sudo nano /etc/networking/interfaces
# USB xda-universal tethering
auto rndis0
iface rndis0 inet dhcp

I used an xda universal and configured an internet connection on the phone (details from your provider. I started internet connection sharing on the phone which didn't seem to be connecting so i started internet explorer and made sure the connection was active.

in a terminal i typed

sudo dhclient rndis0

which got me an ip address of 169.254.2.2 the phone took 169.254.2.1 I gave the IP of the phone as an additional dns server in networking. maybe this isn't necessary.

hmm this is strange i added a network monitor to the top bar for rndis0 it says my ip is 192.168.0.102 and broadcast ip 192.168.0.255 and its ethernet.

and then connected with firefox there was a little messing connecting and disconnecting the usb cable but it now works, the connection here is quite slow however its a g signal (3 bars) not 3g so i guess equivalent to dial up. T-mobile do data for £1 a day or £7.50 a month. cheaper than an internet cafe. hope this helps a little

incidentally virtualbox manages to use the connection too.

Root on SD/SDHC card Gnome keyring problem

(solution provided by knox)

The Bug #218434 only affect systems running their root filesystem from an external device - such as the eeePC's SD-card reader. Therefore i have adapted one of the given workarounds by making use of the hal policy mechanism:

$ sudo mousepad /etc/hal/fdi/policy/removable_root_fix.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> 
<deviceinfo version="0.2">

  <device>
    <match key="volume.mount_point" string="/">    
    <merge key="@block.storage_device:storage.removable" type="bool">false</merge>
    </match>
  </device>

</deviceinfo>
$ sudo invoke-rc.d hal restart

It perfectly resolves the issue for me.

Update: the gnome-keyring package has been updated and the above hack is no longer needed.

Get MMC/SD to Automount

You may get a error when the system attempts to automount your MMC/SD card. (Like it did with my 16GB Card)

To fix this,

Run the following command:

   sudo mkdir /media/MMCSD

Open '/etc/fstab' with a text editor.

Make the line that includes '/dev/sdb1' read the following:

    /dev/sdb1     /media/MMCSD     auto     user,auto,exec,rw     0     0

Eject, and re-insert the card, and it will automount.

Automount option is courtesy of William Ruckman (http://ruckman.net)

Encrpyt root partition

(Note: Documentation based on http://news.softpedia.com/news/Encrypted-Ubuntu-7-04-61312.shtml with help from http://de.gentoo-wiki.com/Root-Partition_mit_dm-crypt_&_cryptsetup_verschl%C3%BCsseln_-_Die_schnelle_Version . The code is adjusted to work with Ubuntu 8.04 (Hardy Heron) with kernel 2.6.24-19-generic)

Assuming you have the following configuration:
/dev/sda1: main root parition
/dev/sda2: boot partition (40 MB)
(I don't have a swap partition, since I have 2 GB RAM and this does not goes too well with the 4 GB HD on my 701)

STEP 1 – Boot from the Installation-USB-Stick

You most likely have installed Ubuntu using a bootable USB stick (or a CD-ROM, if you have). Boot from that media again, so that you see the desktop. When everyting has loaded, open up a terminal (Applications → Accessories → Terminal) and become root by typing:

sudo su

You will be permanently root from now on (that means you will not have to type sudo anymore, until you exit this session).

STEP 2 – Prepare the environment and backup the data

Let's prepare the system for the encryption process by loading some necessary modules into the kernel. Type, or copy / paste the following lines in the terminal window:

modprobe aes_i586
modprobe dm-crypt
modprobe dm-mod
modprobe sha256_generic

Install the cryptsetup package:

apt-get install cryptsetup

Create mountpoints for the current file systems and mount them:

cd /mnt
mkdir boot root
mount /dev/sda1 root
mount /dev/sda2 boot

And now backup the data:

cd /mnt/root
tar xjvf /media/disk/root.tar.bz2 .
cd ..

This last code will output a lot of text (the files that are being copied), so wait until it stops. It takes about 20 minutes (depending on the number of files). Note if you have the archive on a FAT partition: The file may not be larger than 2 GB there. If you use compression (j option) and have a freshly installed Ubuntu, this should work.

STEP 3 – Encrypt the filesystem

Good, now that the backup has finished, umount the drive with:

umount root

And encrypt the filesystem with the following command:

cryptsetup -c aes-xts-plain -y -s 320 luksFormat /dev/sda1

WARNING: All the data will be permanently erased!

Type YES when asked, and enter a strong password (twice). Note: yes must be all in uppercase (This is bold, because I did not realize this for several hours. If not, the you just get the message “Command failed.”) Then type:

cryptsetup luksOpen /dev/sda1 root
mkfs.ext2 /dev/mapper/root
mount /dev/mapper/root root

Now let's copy back the data from the temporary folder to the newly created encrypted root partition:

cd root
tar xjvf /media/disk/root.tar.bz2

Same as above, it will output a lot of text, so wait until it finishes and remove the temporary folder:

rm /media/disk/root.tar.bz2
cd ..

STEP 4 – Final adjustments

The filesystem is encrypted now, but it will not work until you do some final adjustments. Type, or copy / paste the following lines:

mkdir root/boot
mount /dev/sda2 root/boot
mount -o bind /dev root/dev
chroot root

At this moment, you are “virtually” in your root partition, and you can make modifications to it. Let's begin by installing the cryptsetup software:

apt-get update
apt-get install cryptsetup

Then let's add the necessary kernel modules to the /etc/initramfs-tools/modules file, so that they can be loaded at boot time (see http://blog.rootserverexperiment.de/2008/04/29/eeepc-ubuntu-804-initramfs-tuning/ to get an even slimmer initramfs):

nano etc/initramfs-tools/modules

And add the following lines to the end of the file:

aes_i586
dm-crypt
dm-mod
sha256_generic

Hit CTRL+O to and then ENTER to save the file. Hit CTRL+X to close the nano editor.

You must adjust the /etc/fstab file to mount the correct encrypted root partition:

nano etc/fstab

And change the line that looks like this (the UUID is just an example… yours will be different):

# /dev/sda3 UUID=4565t675-6c67-56hg-hg7j-67g5jk00b562 / ext3 defaults,errors=remount-ro 0 1

To look like this one:

/dev/mapper/root / ext2 noatime,errors=remount-ro 0 1

So basically, you just replace (# /dev/sda3 UUID=4565t675-6c67-56hg-hg7j-67g5jk00b562) with (/dev/mapper/root).

Hit CTRL+O and then ENTER to save the file. Hit CTRL+X to close the nano editor.

Now you must edit the /etc/crypttab file:

nano etc/crypttab

And add the following line at the end of the file:

root /dev/sda1 none luks,retry=1,cipher=aes-cbc-essiv:sha256

Hit CTRL+O and then ENTER to save the file. Hit CTRL+X to close the nano editor.

And now you have to edit the /boot/grub/menu.lst file:

nano boot/grub/menu.lst

Search the line that looks like this (the UUID is just an example… yours will be different):

# kopt=root= UUID=4565t675-6c67-56hg-hg7j-67g5jk00b562 ro

And change it to look like this:

# kopt=root=/dev/mapper/root ro

Hit CTRL+O and then ENTER to save the file. Hit CTRL+X to close the nano editor.

Do some Fixes:

cp /usr/share/initramfs-tools/hooks/cryptroot /etc/initramfs-tools/hooks/cryptroot
cp /usr/share/initramfs-tools/scripts/local-top/cryptroot /etc/initramfs-tools/scripts/local-top/cryptroot

Update GRUB with the following command:

grub-install --recheck hd0,1
update-grub
grub-install hd0

And check the /boot/grub/menu.lst file to see if the entries changed like this:

title Ubuntu 8.04, kernel 2.6.24-19-generic
root (hd0,1)
kernel /vmlinuz-2.6.24-19-generic root=/dev/mapper/root ro quiet splash clocksource=hpet
initrd /initrd.img-2.6.24-19-generic
quiet
savedefault

Make sure that you have root=/dev/mapper/root option. If so, then you can update initramfs with the following command:

update-initramfs -u All

Exit the chrooted environment and reboot the system with:

exit
reboot

When the system starts, you will see the Ubuntu boot splash, which will disappear after a few seconds and all you'll be able to see is a blinking line on the top left side of your monitor. Now you should type the password you've setup when you encrypted the filesystem and hit ENTER. You will notice that (if you typed the password correctly), the system continues to boot. That's it folks, your whole Ubuntu 7.04 is now fully encrypted!

Save hd space: compress /usr

By compressing the /usr folder you can gain about 1 GB hd space. The basic idea is to compress the folder using squashfs. However, squashfs is read only. So we need to put an overlay file system like unionfs on top of it, to keep up with the changes.

A very good description how to set up squashfs and unionfs is here: http://po-ru.com/diary/linux-liposuction-or-xubuntu-in-under-a-gig-on-the-eee-pc/

Questions: How to recompress? Is it better / What is the advantage of compressing the whole file system? Is cloop + aufs better (if so: what are the advantages)?

Note: Compressed /usr folder goes well with encrypted root partition (see above; the compressed image is part of the root file system and therefore encrypted as well).

To do...

USB_Persist

There is still a problem when home is mounted on an SD card with sleep and hibernation. Essentially the EEE forgets where /home is as it disconnects the card when it goes to sleep and fails to reconnect it when it awakens. Apparently it can be fixed if USB_Persist is enabled in the kernel. Step by Step instructions are needed for most users (including me). /var could be moved to an SD card to reduce writes to the SSD and make some space on the ssd drive.

The problem still with generic kernel. However, timauton's patch has been installed on the array.org repository's kernel version 2.6.24-20-eeepc, as of 16 jul 2008.

Compiz & xgl

At first glance compiz doesn't appear to work as it did in Xubuntu 7.10 after a dist-upgrade to 8.04 and application of RiceeeyTweak.sh mentioned at the top of the page. With the same xorg.conf settings using either the intel or i810 driver, executing the command compiz –replace results in Checking for Xgl: not present and other errors. Attempts to fix this by installing the following packages simply resulted in screen artifacts and freezing of X. $ sudo apt-get install xserver-xgl libglitz-glx1 libglitz1 To recover simply <CTR><ALT><F1> and remove those packages. Oddly enough 915resolution appears to still work and glxgears returns > 700 FPS so graphics acceleration appears to be working fine. I guess I'll just live without compiz as it was mostly used as a quick method for showing off the graphics.

*With a clean installation of Ubuntu 8.04, Hardy Heron, out of the box, on a 4GB Surf 701 with 2GB ram, Hardy recognizes and displays the correct resolution (800×480) on the Eee, even though this resolution is not listed in the display settings. Also, on this clean install, Compiz is working great, after performing the small fix mentioned above re: moving windows above the top of the desktop by holding <Alt> while left-click dragging the window.

 
getting_ubuntu_8.04_to_work_perfectly.txt · Last modified: 2008/10/12 06:55 by devgru
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
This website is no longer under a Creative Commons license.
All rights are reserved by Eeeuser.com and each individual author
If you want to reproduce content, all individual contributers must be identified and you must seek permission from Eeeuser.com