WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: HOWTO: Install and tweak Tiny Core for the Eee 900  (Read 24069 times)

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
HOWTO: Install and tweak Tiny Core for the Eee 900
« on: October 27, 2009, 09:53:39 PM »
Installing Tiny Core Linux on the Eee 900 20 GB (or other similar computers)

A strong argument can be made that Tiny Core Linux is the fastest-booting and most efficient operating system currently available--especially for netbook computers that are used for web browsing and cloud computing. The following paragraphs describe my installation of Tiny Core Linux on an Eee 900 20 GB netbook, but they should be applicable with minor variations on a wide variety of other netbooks and laptops.

Assumptions:
You have access to a working version of linux.
You have about 100 MB of free space on sda1 (or your computer's boot partition).

Steps:
1. Create two directories on sda1 for your Tiny Core installation. Name one of them "tiny" and name the other "tce." Within the "tce" directory create another directory named "optional".

2. Download the Tiny Core iso from http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/
The advice in this tutorial is based on Tiny Core 2.3. It works with very few (and largely self-evident) changes on the most recent versions.

3. Use an archive manager (FileManager in Xandros) to extract "bzImage" and and "tinycore.gz" from the Tiny Core iso. Put both of them in your "tiny" directory on sda1. If you don't have access to an archive manager, you can download "bzImage" and "tinycore.gz" directly from the following site:
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/distribution_files/

4. Use a file editor with root privileges to find and open your GRUB "menu.lst". You should be able to locate it in /boot/grub on sda1. Check that the GRUB menu is set to display during boot-up by commenting-out the "hiddenmenu" entry. (I.e., put a # at the beginning of that line.) Next give yourself some time to select your choice of operating system during the boot process; initially, I recommend that you set "timeout=5", but you can later reduce that to 1 or even 0 to speed boot time. Then, scroll to the end of the file and type in the following text:
Quote
                 title Tiny Core Linux
                         root (0x80,0)
                         kernel /tiny/bzImage quiet tce=sda1 home=sdb1 opt=sdb1 nodhcp
                         initrd /tiny/tinycore.gz
 

     (NOTE: "root (0x80,0)" is the sda1  partition on my Eee 900 and it is used in each of the other three grub entries for the standard Xandros installation. If the boot partition is described in some other way on your machine, then use that designation. For example, on some hard drives it is "root (hd0,0)". Use whatever is the standard for your other grub items.)
    
     At this point, save the changes you have made to menu.lst and reboot your computer. If all has gone well, you should be able to reboot into Tiny Core Linux. To add software and continue building your operating system, you will need to have a wired (ethernet) connection to the internet. Usually, this is as simple as plugging the appropriate wire either into the ethernet ports on your Eee and your router, or into the usb ports on both machines.
    Now you are ready to build a fully functional system. I am going to recommend the smallest setup that provides wifi access, a browser, a couple of text editors, a couple of file managers, a music player, a video player, a flashplayer, and an ebook reader. Tiny Core Linux uses two different types of packaged programs: tce and tcz. While both types work in version 2.3, tcz's are preferred for version 2.4 of Tiny Core and may be required in 2.5 and 2.6.
    So, begin by using Apps (the gears button at the bottom-center of your display) to mount 915resolution.tcz (for better screen display on some Eee pc's with Intel chipsets), opera.tcz (a browser), mc.tcz (a file manager and file editor), wireless-tools.tczl (wireless), wireless-2.6.29.1-tinycore.tczm (wireless), wpa-supplicant.tcz (wireless), OSS.tczm (sound), cpufreq.tczl (cpu speed control), beaver.tczl (a graphical editor), conky.tcz (systems reporting), and xmms-musepack-1.2.1.tcz (for music), and fbreader.tczl (an ebook reader). This will download the relevant files (and their dependencies) to the tce directory on your sda1 partition.
    Now, click on Aterm (the screen button at the bottom-center of your display) and type in "sudo mc" without the parentheses. This will open Midnight Commander your file-manager/file-editor. Find your way to the /opt directory and highlight the bootlocal.sh file. This is a file that automatically executes commands every time you reboot your computer. We will use it to connect to wifi and to set the cpu  speed. Push the F4 key to open the file for editing. Enter the following lines:
Quote
         sudo iwconfig wlan0 essid any
          sudo udhcpc -i wlan0
          sudo modprobe p4-clockmod
          sudo cpufreq-set -g performance
          sudo mount -t auto /dev/sdb1 /mnt/sdb1
    Push F2 to save the changes you have made to bootlocal.sh. The first two commands assume that you are going to be using a public wifi signal (i.e., no password needed). If you will normally be using a password-protected network, you can modify the lines appropriately. For example, to connect automatically to a wep-wifi, you will need the following:
Quote
         sudo iwconfig wlan0 essid your-essid-name
          sudo iwconfig wlan0 mode managed key your-password
          sudo udhcpc -i wlan0
    Similarly, cpufreq-set can be changed to "conservative" for the improved battery life or to "ondemand" for flexible performance, but the suggested setting gets the maximum from your cpu. This can also be changed anytime you wish while using your computer by opening a terminal and typing in "sudo cpufreq-set -g ondemand" . . . or "sudo cpufreq-set -g conservative." (NOTE: When you are in the terminal window, you can push the up-arrow to cycle through the commands you have recently used, sparing you the need to retype many commands.) Having made these changes to bootlocal.sh, shut down your computer. Note that the first time you shut down Tiny Core, you will be prompted to select a location for a backup file. You can select any location--sdb1, for example.
     Reboot your computer. If all has gone well, it will automatically connect to wifi. (If it doesn't immediately connect, open a terminal and type in "sudo iwlist scanning." It should show either ath0 or wlan0 with an ESSID name and other info. Based on what you find, edit your bootlocal.sh and try again.) Try out your Opera browser, your graphical editor (Beaver), and your mp3 player (Xmms). Now we are going to reboot the computer one more time before installing your flashplayer, your pdf reader, and another file manager. While we are at it, we will also set up conky to monitor your computer's performance.
     By now you should be getting used to how quickly Tiny Core Linux boots up. (On my Eee 900 it takes less than 30 seconds to boot and acquire a wifi signal.) Once again, use Apps to mount the following files: getFlash10.tgz, emelfm.tgz (a graphical file manager), Mplayer-nodeps.tcz (a video player), and xpdf-3.02p12.tcz. These are some hefty applications and they may take a bit of time to download and mount. Once they have done so, you should open a new desktop (hit Ctrl-F2) and put your mouse somewhere on the screen. Then click the right  mouse button, scroll down to Applications, and run getFlash10. After it does its thing, switch back to your first desktop (Ctrl-F1) and shut down your computer. Boot again, go to youtube.com, and test your ability to play flash video.
     The three somewhat bulky programs you installed in the previous paragraph may have somewhat slowed your computer's boot time and/or eaten up too much ram. You can cure this by moving these programs and their dependencies into the /tce/optional directory. After you have done that, they will no longer load into ram when you reboot your computer, but you can invoke them at will by using Apps>File and mounting them from their directory.
     Now there is a little more tweaking to be done. First, let's set up Opera so that it invokes xmms to play streaming audio. Start Opera and go to Tools>Preferences>Advanced>Downloads. Click Add and insert in the Mime box "audio/x-scpls" --  and insert in the Open box "xmms %s" (without the quotes). Use Opera to go to www.publicradiofan.com and see if you can play streaming audio through xmms. While we are configuring Opera, let's reduce its demands on flash drives. Go to Tools>Preferences>Advanced>History and change Memory Cache to 40 megabytes, switch Disk Cache to off, and tick the box for Empty on Exit.
     Next we need a good default configuration for conky. Create a new file with Beaver and paste in the following text:
Quote
           # maintain spacing between certain elements
            use_spacer yes

            # set to yes if you want tormo to be forked in the background
            background no

            # X font when Xft is disabled, you can pick one with program xfontsel
            #font 5x7
            #font 6x10
            #font 7x13
            #font 8x13
            font 9x15
            #font *mintsmild.se*
            #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

            # Xft font when Xft is enabled
            xftfont Verdana:size=12:bold

            # Text alpha when using Xft
            xftalpha 0.8

            # Xft font when Xft is enabled
            use_xft no
            # Draw shades?
            draw_shades yes

            # Draw outlines?
            draw_outline no # amplifies text

            # Draw borders around text
            draw_borders no

            # Text alignment, other possible values are commented
            alignment top_left
            #alignment top_right
            #alignment bottom_left
            #alignment bottom_right
            TEXT
            ${color #FF0000}$nodename - $sysname $kernel
            ${color #0000FF}Uptime: $uptime
            RAM: $memperc% ${membar 8}
            Swap:$swapperc% ${swapbar 8}
            CPU: $cpu% ${cpubar 8}
            CPU Temp: ${acpitemp}C
            CPU Speed: ${freq}MHz
            ${color #FFFF00}/ ${fs_used /}/${fs_size /}${alignr}${fs_used_perc /}%
            ${fs_bar 8 /}
            /home ${fs_used /home}/${fs_size /home}${alignr}${fs_used_perc /home}%
            ${fs_bar 8 /home}
            ${color2}Battery ${color1}${battery}
            ${battery_bar}
Save this file as ".conkyrc" (without the quotes, but using the period at the front of the filename). Open a terminal window and type in "conky" (without the quotes). Close the terminal window. Now you can monitor cpu temperature and speed, as well as other features of the operating system. Many different configurations of conky are possible if you do a bit of reading on the internet.
    Finally, I recommend one final modification--but it is entirely optional. Each time you shut down your computer, Tiny Core makes a backup file. But we have installed it in a way that creates persistent directories so that it is unnecessary and undesirable to load the backup file each time you reboot your computer. I recommend that you copy your current "mybackup.gz" to a removable usb stick and change the installation so that backups are not automatically made and loaded with each boot. To do so, open a terminal window, type in "sudo mc", scroll down to ".profile" and highlight it. Push F4 to edit the file. Scroll down to the line that starts "export BACKUP" and edit it to "exportBACKUP=0." Push F2 to save your changes. Bingo. Tiny Core will no longer automatically backup and reload your system, but can still be made to do so if you desire it.
     This is the way I have set up my Eee 900 for optimal use for most daily tasks. Enjoy modifying your own installation. If you make a mistake, it is easy to reinstall everything in this small, efficient Linux version.
« Last Edit: February 02, 2010, 01:31:56 PM by OldAdamUser2 »

Offline eeepc1

  • Newbie
  • *
  • Posts: 3
Re: HOWTO: Instal and tweak Tiny Core for the Eee 900
« Reply #1 on: November 17, 2009, 08:29:54 PM »
Hey great tutorial,

I have on question. I used these directions exept Im installing from a usb. Can you post what its looks like in menu.lst if your doing it that way. If you cant were is sda1 in the file manager.

thanks :)

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: HOWTO: Instal and tweak Tiny Core for the Eee 900
« Reply #2 on: November 21, 2009, 05:46:29 PM »
Are you booting Tiny Core from a usb first and then trying to install to sda1, or are you booting Xandros Linux and trying to copy the Tiny Core files from sda1?

If you boot Tiny Core from usb, start Midnight Commander ("sudo mc"  in a terminal). Then scroll to the top ( .. ) and hit Enter. Do that one more time, and you should ten be in the root directory (/). Scroll down to "mnt" and hit Enter. Now you'll see your various drives listed.

If you are using FileManager in Xandros, you may not see sda1 listed at all since the OS combines sda1 and sdb1 in some manner. I'd recommend booting Tiny Core to do the various steps of the install.

Offline venomous

  • Newbie
  • *
  • Posts: 1
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #3 on: January 13, 2010, 09:06:57 AM »
Nice tutorial.
 I also looked at the installation guide given by tinycorelinux.com
I did all the things mentioned there. But when i reboot i get this message saying that /boot/bzimage file missing error no 15.
 I know for sure that the file is there. I did check it, to make sure.
 Can you please help me out with this.
Thanks.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #4 on: January 13, 2010, 12:54:09 PM »
Perhaps a typo? "bzImage" vs "bzimage" is a common error.
The only barriers that can stop you are the ones you create yourself.

Offline spence91

  • Jr. Member
  • **
  • Posts: 80
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #5 on: January 15, 2010, 05:48:13 AM »
This tutorial is probably generic enough to be considered a guide for most netbooks out there.

Did you get anywhere with the eee-specific stuff? like the hardware toggles (turn wireless modules on/off, volume, screen brightness etc)?

i'm currently trying to find a way to turn the wireless module on and off for my EEEpc, but i'm really struggling with it.

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #6 on: January 15, 2010, 01:56:21 PM »
I'm pleased that you think the tutorial is helpful, Spence. On my Eee some of the function keys work fine. Screen brightness works fine--but its helpful to know the code for "overclocking" the brightness:

sudo setpci -s 00:02.1 f4.b=ff

Sound can be adjusted using flit.

Suspend does not work, and sleep (which can be enabled with a bit of code) doesn't save any battery power so its not useful. TC boots up and shuts down so quickly that I just deal with it that way.

I don't know how to implement a software switch for the wifi radio. It would be handy, but I usually want wifi on anyway.


Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #7 on: January 15, 2010, 11:47:21 PM »
Hi OldAdamUser2 !
Thanks ! You have done a very decent job here, a very thorough and detailed Tuts for everyone - newbees & ecperiennced as well !! You can be a good teacher and Tech. Writer, I think !

Although many have given How to set-up TCl here,If you add-up:
Dial-up setup, wget, rsysnc, sendmail/Qmail, fetchmail, ftp, firewall, printer-setup and some often used little apps here, I think - it will be a complete TCL tutorial for everyone !

Carry-on pl. - if time permits you and interested to do so! :)

~ Pats

Offline spence91

  • Jr. Member
  • **
  • Posts: 80
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #8 on: January 18, 2010, 07:31:54 AM »
I had a quick look at getting the wireless toggle to work over the weekend. It looks like it will require several modules that the standard TCL kernel is missing.

I don't know an awful lot about building modules but i'll have a go this evening, see if i get anywhere.

Once that is done then it may be worth building a package that can configure TCL to run well on the eeepc range of devices.

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #9 on: January 27, 2010, 04:50:49 PM »
This tutorial is probably generic enough to be considered a guide for most netbooks out there.

Did you get anywhere with the eee-specific stuff? like the hardware toggles (turn wireless modules on/off, volume, screen brightness etc)?

i'm currently trying to find a way to turn the wireless module on and off for my EEEpc, but i'm really struggling with it.

sringh and jemimah at eeeuser.com modified some code for Puppy Linux that allows wireless to be toggled on and off. The script needs to be run as root (i.e., sudo) and the last two lines of code before esac may not be needed for the Eee 700 but are necessary for my 900:

Quote
#!/bin/sh

#RADIO_CONTROL='/sys/devices/platform/eeepc/rfkill/rfkill0/state'
RADIO_CONTROL=$(find /sys/devices/ | grep ASUS | grep rfkill | grep state)
RADIO_STATE=$(cat $RADIO_CONTROL);

#WIFI_IF=$(cat /etc/acpi/wifi-interface)
WIFI_IF='wlan0'
#WIFI_DRIVER=$(cat /etc/acpi/wifi-driver)
WIFI_DRIVER='ath5k'


case $RADIO_STATE in
    1)
    #killall yaf-splash
        #yaf-splash -display :0 -margin 2 -bg lightblue -placement top -font "9x15B" -outline 0 -timeout 1 -text "Shutting Down $WIFI_IF"
  echo "Shutting Down $WIFI_IF"
    #wpa_cli terminate
    /usr/local/sbin/dhcpcd -k $WIFI_IF
        ifconfig $WIFI_IF down 2>/dev/null
        sleep 1
    rmmod $WIFI_DRIVER
    sleep 1
           echo 0 > $RADIO_CONTROL
    ;;
    0)
#    killall yaf-splash
#        yaf-splash -display :0 -margin 2 -bg lightblue -placement top -font "9x15B" -outline 0 -timeout 1 -text "Bringing Up $WIFI_IF"
  echo "Bringing Up $WIFI_IF"
        echo 1 > $RADIO_CONTROL
        sleep 1
        modprobe $WIFI_DRIVER 2>/dev/null
        sleep 1
    #/usr/local/Pwireless2/start-wpa&
    iwconfig wlan0 essid any
    udhcpc -i wlan0
        ;;
esac

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #10 on: April 27, 2011, 10:35:26 AM »
UPDATE: In Tiny Core 3.5 or above the grub.conf entry should be the following:


Quote
title Tiny Core
        root (0x80,0)
   kernel /tiny/bzImage quiet psmouse.proto=imps xvesa=1024x600x32 tce=sda1 home=sdb1 opt=sdb1 nodhcp
   initrd /tiny/tinycore.gz
title Tiny Core
        root (0x80,0)
   kernel /tiny/bzImage quiet psmouse.proto=imps xvesa=1024x600x32 tce=sda1 home=sdb1 opt=sdb1 nodhcp
   initrd /tiny/tinycore.gz

In addition, one needs to modify 915 resolution by doing the following:

- Drop down or boot up in text mode.
- run "sudo 915resolution 50 1024 600 32"
- run xsetup and the 1024x600 mode should now appear
« Last Edit: April 27, 2011, 10:43:32 AM by OldAdamUser2 »

Offline andrewb

  • Full Member
  • ***
  • Posts: 121
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #11 on: June 26, 2011, 10:36:18 AM »
With cpufrequtils the module suggested doesn't appear to work for the eeepc 900AX. For this model the acpi-cpufreq module needs to be loaded.

Process to get cpu frequency control on eeepc900ax is:

Add cpufrequtils.tcz to the OnBoot list of extensions

In bootlocal.sh put the lines:

Code: [Select]
modprobe acpi-cpufreq
modprobe cpufreq-conservative
cpufreq-set -g conservative
cpufreq-set -g conservative -c1

Note the need to set the governor for both cores separately.

The p4-clockmod module reports a possible lower minimum frequency (200MHz), but it doesn't allow any governor other than performance to work. acpi-cpufreq report a minimum frequency of 800MHz through cpufreq-info, but does allow the conservative governor to work.

Edit: 29/6/11 - EEEPC 900AX noticeably cooler in use with above settings. CPU frequency can be seen scaling between 800MHz & 1.66 GHz using cpufreq-info in aterm when running other applications, including flash in Firefox. No jitter or delay.
« Last Edit: June 28, 2011, 08:14:24 PM by andrewb »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #12 on: June 26, 2011, 01:32:24 PM »

The p4-clockmod module reports a possible lower minimum frequency (200MHz), but it doesn't allow any governor other than performance to work.


It is a well known issue with certain type of CPU's. One suggested workaround to set minimum frequency manually with cpufreq-set first before using ondemand or conservative. It doesn't work with my notebook, but who knows.

Use Google to learn more about.

You can try one of the daemons like cpufreqd from the repo, using userspace governor too.
« Last Edit: June 26, 2011, 01:39:34 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline andrewb

  • Full Member
  • ***
  • Posts: 121
Re: HOWTO: Install and tweak Tiny Core for the Eee 900
« Reply #13 on: June 26, 2011, 10:50:33 PM »
This looks interesting & relevant to the discussion:

http://codemonkey.org.uk/2009/01/18/forthcoming-p4clockmod/

Looks like the p4-clockmod module isn't perhaps the best to use for reducing your power consumption.

Offline ZvyaginzevaE

  • Newbie
  • *
  • Posts: 1
  • Елена Звягинцева. Пишит.РФ :)
    • Вы серьезно?   - Елена
HOWTO Install and tweak Tiny Core for the Eee 900
« Reply #14 on: July 07, 2011, 06:19:25 PM »
which all r the books and e-books that one should follow to prepare for the SCJP pepration
i also need some sites or tutroials which have good number of examples that explains each concepts of the core java
Елена Звягинцева.  Пишит.РФ :)