Showing posts with label boot time. Show all posts
Showing posts with label boot time. Show all posts

Tuesday, June 30, 2009

Re-installing EEEbuntu (3.0) on an eeePC

The experience with EEEbuntu 2.0 was not completely satisfactory. I'm trying now with version 3.0, with the hope for more boot speed and performance.
Dual boot configuration with Xandros (which is on /dev/sda2, with "home" partition on /dev/sdb1).
  1. get EEEbuntu Base;
  2. run the eeebuntu ("base" cd version) installer:Link
    • install / (root) folder on /dev/sda1;
    • install /usr folder on /dev/sdb2 (no space left on sda);
  3. reboot (boot time 45 sec.);
  4. install better network manager "wicd";
  5. install OpenOffice;
  6. take a snapshot of /dev/sda1 and /dev/sdb2 with partimage (record 1);
  7. install a faster kernel (eeepc-lean) from array.org;
  8. reboot (boot time 33 sec.);
  9. remove some virtual consoles (tty7 is for X and tty1 is for text, Knowledge76 article):
    # rm /etc/event.d/tty2
    ..
    # rm /etc/event.d/tty6
  10. add "rootfstype=ext2" to grub boot instructions (avoid kernel very little guessing time, Debian Italia post);
  11. add "noresume" options to grub boot instructions (if hibernation disabled, avoid kernel looking for resume image Debian Italia post);
  12. replace the bash shell with the faster (for scripts) dash shell (Ubuntu wiki):
    # apt-get install dash
    # dpkg-reconfigure dash
  13. improve performance by setting "noatime" option (instead of "relatime" or "atime") in fstab entries (same Debian User forum post);
  14. remove create_floppy_devices, pcmcia-check-broken-cis, pcmcia-socket-startup from /lib/udev;
  15. improve boot time by disabling some services (same Knowledge76 article);
  16. reboot (boot time 32 sec.);
  17. install mc and set it to use the internal editor (mcedit) through Options->Configuration;
  18. install gimp;
  19. install totem;
  20. install moonlight plugin for firefox;
  21. install Adobe flash player plugin for firefox;
  22. enable archive.canonical.com ("Third party") repositories
  23. install acroread
  24. install Medibuntu repositories and non-free codecs (Ubuntu help)
  25. install wine;
  26. install exifer (win32);Link
  27. install xnview (win32);
  28. update kernel to version 2.6.29-1-netbook;
  29. reboot (boot time 28 sec.);
  30. take a snapshot of /dev/sda1 and /dev/sdb2 with partimage (record 2);
  31. install eeepc-laptop-dkms (to make Fn-F2 work again);
  32. install PalmDesktop (win32) and DocumentsToGo (win32) (my way, coming soon);
  33. fix broken "Scroll Lock" (Fn+F12) button (EEEbuntu forum);
  34. install some plug-in ("Terminal here", "Open as administrator") for nautilus via Synaptic;
  35. install GDM theme ("Simply Grace");
  36. configure login windows (users, faces, timed login);
  37. install AbiWord;
  38. install TrueCrypt;
  39. install GnoCHM;
  40. ...

Tuesday, February 24, 2009

Re-installing EEEbuntu (2.0) on an eeePC

Due to some limitations of the preinstalled Xandros, I'm switching to EEEbuntu. I hope to get this ubuntu-based distribution boot faster with some tweaking. In the meanwhile I'm also keeping Xandros, because I like its 15 sec. boot time. My 900 model has two SSDs, 4GB (faster) and 16GB (slower); so I'm planning to boot both Xandros and EEEbuntu from the first small but faster device: I'll have to split the EEEbuntu installation across two partitions on two different devices.
  1. get EEEbuntu Base;
  2. install in a partition on the 16GB one (let's say /dev/sdb2);
  3. reboot (boot time 46 sec., from grub menu to welcome sound with autologin);
  4. take a snapshot of /dev/sdb2 with partimage (record 1);
  5. shrink the Xandros partition to make room for an EEEbuntu partition (let's say /dev/sda3);
  6. move everything except /usr from /dev/sdb2 to /dev/sda3;
  7. on /dev/sdb2, move everything in /usr to the parent directory (/);
  8. on /dev/sda3, make a new /usr folder;
  9. on /dev/sda3, edit /etc/fstab to mount /dev/sdb2 to /usr;
  10. fix grub boot instructions accordingly (grub root is now "(hd0,2)", kernel option "root=/dev/sda3");
  11. reboot (boot time 40 sec.);
  12. if ok, take a snapshot of /dev/sda3 and /dev/sdb2 with partimage (record 2);
  13. install a faster kernel (eeepc-lean) from array.org;
  14. fix grub boot instructions accordingly;
  15. reboot (boot time 38 sec.);
  16. fix some hardware (Fn-) keys issues (EEEbuntu forum #1) with eee-control installed from synaptic;
  17. run eee-control tray applet at startup (System -> Control center -> Sessions -> Add, fill with /usr/bin/eee-control-tray);
  18. install TuxOnIce (my way);
  19. improve boot time by disabling some services (Knowledge76 article):
    als-utils
    anacron
    apmd
    apparmor
    apport
    atd
    bluetooth
    bootlogd
    cron
    dns-clean
    pcmciautils
    ppp-dns
    rmnologin
    rsync
    stop-bootlogd
    stop-bootlogd-single
    sysklogd
    ufw
    usplash
  20. remove cron, logrotate, sysklogd (Debian WiKi):
    # apt-get remove cron logrotate sysklogd
  21. remove "splash" option from grub boot instructions (usplash service is removed);
  22. add "rootfstype=ext2" to grub boot instructions (avoid kernel very little guessing time, Debian Italia post);
  23. add "noresume" options to grub boot instructions (if hibernation disabled, avoid kernel looking for resume image Debian Italia post);
  24. remove some virtual consoles (tty7 is for X and tty1 is for text, same Knowledge76 article):
    # rm /etc/event.d/tty2
    ..
    # rm /etc/event.d/tty6
  25. replace the bash shell with the faster (for scripts) dash shell (Ubuntu wiki):
    # apt-get install dash
    # dpkg-reconfigure dash
  26. reorder boot scripts with right dependencies (Debian User forum post):
    # apt-get install insserv
    # dpkg-reconfigure insserv
  27. reboot (boot time 35 sec.);
  28. remove create_floppy_devices, pcmcia-check-broken-cis, pcmcia-socket-startup from /lib/udev;
  29. fix hwclock time out (Debian WiKi);
  30. improve performance by setting "noatime" option (instead of "relatime" or "atime") in fstab entries (same Debian User forum post);
  31. boot once with "profile" option in grub entry, to update the profile for "readahead";
  32. reboot (boot time 34 sec.);
  33. install mc and mcedit;
  34. set mcedit as default editor for mc, by setting "use internal editor" under Option ->Configuration of mc (Ubuntu launchpad);
  35. take a snapshot of /dev/sda3 (record 3);
  36. no real benefit from "readahead", remove it by disabling some services (same Knowledge76 article):
    readahead
    readahead-desktop
    stop-readahead
  37. re-run insserv;
  38. reboot (boot time 33 sec.);
  39. install LXDE:
    # apt-get install lxde
  40. make LXDE the default desktop manager instead of GNOME (from login menu, after hitting ctrl-alt-bkspc);
  41. reboot (boot time 31 sec.);
  42. prepend "exit" to /etc/init.d/hwclock.sh and to /etc/init.d/hwclockfirst.sh (the scripts are called but nothing is done);
  43. install compiz (Ubuntu Help);
  44. install avant-window-navigator (AWN);
  45. fix compiz and AWN startup (my way);
  46. set AWN bar position through gconf-editor (this post);
  47. reboot (boot time sec. 33);
  48. install xcompmgr and make it autostart;
  49. install cairo-dock and make it autostart;
  50. take a snapshot of /dev/sda3 and /dev/sdb2 with partimage (record 4);
The EEEbuntu experience is not completely satifactory: wireless networking troubles, external monitor resolution troubles, slow boot.. I'm leaving..
[..]
I'm trying now with version 3.0.

Wednesday, September 24, 2008

Installing finit-mod on an eeePC with default Xandros

finit-mod is a reimplementation of fastinit used by asus in the eeePCs. I struggled a lot before having it working, and I'd like to share my efforts. My steps are referring to an eeePC 900 (bought in Italy) and I don't know if they fit to other models/localizations.

My actual configuration is:


I struggled a lot before having it working, because finit-mod (ver 0.5):

  • requires to launch "/bin/openvt" (which is missing);
  • does not mount user partition (uses folder "/home/user" on "/dev/sda1" instead);
  • does not properly shutdown (power led remains on).


My steps were:

  1. download finit sources from http://helllabs.org/finit/#download;
  2. unpack sources;
  3. edit "finit-mod.c" by adding a mount statement (the bold line) at the end of the "Mount filesystems" section:

    /*
    * Mount filesystems
    */
    mount("proc", "/proc", "proc", 0, NULL);
    mount("sysfs", "/sys", "sysfs", 0, NULL);
    mount("devpts", "/dev/pts", "devpts", 0, "gid=5,mode=620");
    mount("tmpfs", "/dev/shm", "tmpfs", 0, NULL);
    mount("tmpfs", "/tmp", "tmpfs", 0, "mode=1777,size=128m");
    mount("tmpfs", "/var/run", "tmpfs", 0, "mode=0755");
    mount("tmpfs", "/var/lock", "tmpfs", 0, "mode=1777");
    mount("/mnt", "/", NULL, MS_MOVE, NULL);
    mount("/dev/sdb1", "/home", "ext3", 0, NULL);
  4. edit "Makefile" to declare "user" as default login user;
  5. compile;
  6. install "console-tools" (contains the missing "openvt" program);
  7. install "lsof" (used to fix shutdown);
  8. in /sbin, edit "fastshutdown.sh" (as stated here) by inserting kill process and remove module statements (the bold lines):

    #!/bin/sh

    if [ "$1" = "--ask" ]
    then
    zenity --question && sudo $0
    exit $?
    fi

    [ `id -u` = "0" ] || echo "Must be root."

    killall -9 -w `lsof +c 15 /dev/dsp | awk {print $1}`
    killall -9 -w `lsof +c 15 /dev/snd/* | awk {print $1}`

    rmmod snd_hda_intel

    /usr/bin/killall --wait usbstorageapplet

    /bin/kill -USR2 1
  9. in /sbin, copy "fastinit" to "fastinit.orig" (to make a spare copy);
  10. copy the just compiled finit-mod over fastinit (use -f to force, "cp -f finit-mod /sbin/fastinit");
  11. reboot.


You should see finit-mod booting now.
You should also be able to shutdown properly (leds off) from Easy Mode.

If you want (why not?) to shutdown properly from Advanced Mode too:

  1. switch to Advanced Mode (Full desktop);
  2. go to "Control Center", then "Login Manager" and change the shutdown command from "halt" to "fastshutdown.sh".

Booting time is only slightly shorter than using original fastinit but it makes some improvements (as stated here), so I'm keeping it.