*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: [1] 2 3 4 ... 8
Print
Author Topic: Microcore linux for the XO-1 and XO-1.5  (Read 60219 times)

Microcore linux for the XO-1 and XO-1.5

metal.lunchbox
Senior Contributor
**
Posts: 149


January 28, 2010, 01:44:07 PM

Want a super portable linux system you can fit on your otherwise useless 32mb usb key, try microcore linux, a minimalist variant of tinycore. Its boots to a single-user console and has the unix tools you need, and pretty much nothing more. There is no desktop environment and no graphical apps, but it could be useful for testing, killing free time, and development. Wireless-tools already installed so its ready to go. Here it is, you figure out what you might possibly need it for.

Download from here

a.  unpack the tar file,

b.  place the boot directory on an ext2 formatted USB stick or SD
card,

c.  boot from the media.

I am not the developer of this potentially useful software. I'm just the only relaying the info from the olpc devel mailing list. Thanks to James Cameron and the developers of Tinycore/Microcore.
Logged

xoxoxoxoxo

#1 Re: Tinycore linux for the XO-1

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


January 29, 2010, 04:03:38 PM

I made a tiny core version for the XO-1 with GUI. Grin

Update a newer version is available with some basic apps and Opera
and yet another one with Sound, and Video
and one with Xorg (and all the other apps)
... and we reached v0.1 in 3 flavors Smiley
... and the improved v02 is here





Is very spartan and only for the people that want to play with it and have some idea about tiny core linux.
I had to use a modified 2.6.31 OLPC kernel and Xfbdev from tinycore to run X in frame buffer.
I also included nano so you can do some easy editing. So...

1) Download the 11MB (tiny...!) tinycore_xo.tar.bz2 file (md5sum 9a2a3a33b11cb272e53eae9e55cf9d0c) and unzip it in the root of an ext2/ext3 formatted usb stick or card. You'll see 3 folders and a file. Is ok to have other files/folders in the stick as long as none is named "boot", "opt", "tce", "connect" or "mydata.tgz" (the last you generate later)

2) Open /boot/olpc.fth and replace all "LABEL=stick_name" with the actual name of your usb stick. (type "blkid -s LABEL /dev/dsa1" in the terminal to see its name). While you are there adjust "tz=GMT+1" as needed for your time zone

3) Edit the included "connect" script with the name and key of your wireless access point.
Load the stick on your XO-1 and powerup. Done!

When you get in the GUI jiggle your finger on the toucpad a bit because it may take a couple of seconds to respond the first time.
To connect open the terminal and type
Code:
sudo sh /mnt/sda1/connect
then open the app finder and customize your installation (I tried opera -NOT opera10-, works nicely and fast  Grin)
You'll see that the fonts are pretty small in the apps. Should be some way to increase them altogether adjusting the dpi but I could not find anything easily. If you know the trick for tinycore running in Xfbdev, please let us know.
To turn it off right-click on the desktop and select logout. Will generate a mydata.tgz file at the root of the stick and save your changes in

As always with non-official-OLPC OSs you have to disable security and update to the latest q2e41 firmware.

Pls share your improvements Grin

Edit Last night was way too late Grin so the originally uploaded zip file may not had the folder structure correctly. The new one (tinycore_xo.tar.bz2) has the correct file/folder structure.

« Last Edit: April 29, 2010, 11:59:26 PM by mavrothal » Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#2 Re: Microcore linux for the XO-1 and XO-1.5

quickboot
Contributor
*
Posts: 39


January 30, 2010, 04:15:03 AM

Mavrothal and metal.lunchbox, I am SO going to be trying this! I've already started downloading your Microcore. As a start to a likely series of naive Linux questions, is there a startup folder or script file to which we could add the "connect" command line to? So that upon booting, it automatically tries connecting to our home network. Nice work guys!
Logged

I'm running Teapot's Ubuntu 8.10 on my XO. Boots in about a minute!

#3 Re: Microcore linux for the XO-1 and XO-1.5

metal.lunchbox
Senior Contributor
**
Posts: 149


January 30, 2010, 04:34:32 AM

most linux systems start /etc/init.d/networking upon start up. this script look to /etc/network/interfaces to see what to connect to. if the network details are correct in this file your system should quickly and automatically connect at startup.

if you are conecting to a wep wireless network you could add the following lines
auto eth0
iface eth0 inet dhcp
  wireless-essid NAMEOFNETWORK
  wireless-key HEXADECIMALKEYTONETWORK

you can also google /etc/network/interfaces for more examples and info
Logged

xoxoxoxoxo

#4 Re: Microcore linux for the XO-1 and XO-1.5

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


January 30, 2010, 05:41:21 AM

Tiny core is VERY different than other Linux distros.
I would not recommend it for anything else other than development or playing.
This ones that runs X in the frame buffer is very fragile and many of the tinycore linux apps that require X-dependent libraries/fonts will brake it.
So...  think before you try it. Grin
If you do... add also the argument "local=LABEL=stick_name" in the command line arguments of /boot/olpc.fth.
Have fun, because what ever works works really fast, but then again no many things do Grin
Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#5 Re: Microcore linux for the XO-1 and XO-1.5

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


January 30, 2010, 11:58:28 AM

... having said that... Smiley
If you try it this is a list of apps that can be safely installed and provide browsing, basic editing and image/file/pdf viewing and still have a stable system. mc -midnight commander- provides both file browsing and search. (Xbfdev and nano are already included)

 Xfbdev.tcz
 Xlibs_support.tcz
 bash.tcz
 expat2.tcz
 fontconfig.tcz
 fox.tcz
 glib2.tcz
 gsfonts.tcz
 libiconv.tcz
 libxp.tcz
 mc.tcz
 nano.tcz
 opera.tcz
 slang.tcz
 xfi.tcz
 xfv.tcz
 xfw.tcz
 xpdf-3.02pl2.tcz
Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#6 Re: Microcore linux for the XO-1 and XO-1.5

quickboot
Contributor
*
Posts: 39


January 30, 2010, 12:15:49 PM

...also the argument "local=LABEL=stick_name"
Ok, I think I'm 99% of the way there. I think I'm missing one, simple thing.
Everything seems to load correctly for the first 45 seconds or so, then I get:
Invalid device
Press enter to continue:

this occurs right after the colorful:
Possible swap partitions enabled,
Loading Tiny Core Applications Extensions .....Done

When I hit Enter, all I get is a frozen blank screen.

I thought I had correctly named my USB memory stick. Edit: I hadn't!
Using Ubuntu, when I enter blkid -s LABEL /dev/dsa1 in terminal after mounting the USB stick, all that happens is an error free command prompt again. If I type df, then I get:
     Filesystem           1K-blocks      Used Available Use% Mounted on
     /dev/mmcblk0p1         1953804   1366572    487984  74% /
     .....<other volumes>.....
     /dev/sda1               118448     17407      94926  16% /media/disk
So I'm pretty certain my USB memory stick's label is "disk"(which I formated to Ext 3)
So here is my current olpc.fth contents:
\ olpc.fth
setup-smbios
unfreeze
dcon-unfreeze
visible
.( -- Tiny Core Linux boot script for OpenFirmware    ) cr
.(    by quozl<at symbl>laptop.org, 2010-01-29              -- ) cr cr
" fbcon=font:SUN12x22 waitusb=5 tce=disk restore=disk home=disk local=disk opt=disk  vga=788 tz=GMT+8" to boot-file
" u:\boot\vmlinuz" to boot-device
" u:\boot\tinycore.gz" to ramdisk
boot

What foolish, incorrect naming have I done?
metal.lunchbox, thanks for the Linux networking boot file locations. I know I'll be looking into them with Ubuntu or Deborah.
« Last Edit: January 31, 2010, 01:42:46 PM by quickboot » Logged

I'm running Teapot's Ubuntu 8.10 on my XO. Boots in about a minute!

#7 Re: Microcore linux for the XO-1 and XO-1.5

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


January 30, 2010, 01:31:51 PM

...also the argument "local=LABEL=stick_name"

" fbcon=font:SUN12x22 waitusb=5 tce=disk restore=disk home=disk local=disk opt=disk  vga=788 tz=GMT+8" to boot-file

Should be "....tce=LABEL=disk...." etc. "LABEL" must be there in all cases

However, your stick DOES NOT have a name, since the blkid command gave nothing.
Ubuntu names unlabeled sticks "disk"
To name it, while not mounted but present in eg /dev/sda1, as su/sudo  type
tune2fs -L stick_name /dev/sda1
« Last Edit: January 30, 2010, 01:59:35 PM by mavrothal » Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#8 Re: Microcore linux for the XO-1 and XO-1.5

quickboot
Contributor
*
Posts: 39


January 30, 2010, 04:35:12 PM

Nice! That did the trick!  I'm posting this from Opera within Tiny Core.

Pretty cool!

Is there a reason people don't clone their images with Opera pre-installed? I presume the method for disabling password prompt at login is the same as for Ubuntu.
« Last Edit: January 30, 2010, 04:58:55 PM by quickboot » Logged

I'm running Teapot's Ubuntu 8.10 on my XO. Boots in about a minute!

#9 Re: Microcore linux for the XO-1 and XO-1.5

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


January 31, 2010, 11:46:12 AM

A very nice feature of Tinycore is that when you get/download apps through the Apps control panel you can either "install"  them or have them "OnDemand". The latter means that the .tcz files are downloaded but not configured to run on startup.
This has two advantages if the new app is not running or brakes your installation is going to recover on next reboot. More important (for limited resources systems like the XO-1) you do not load anything unless you really need it Wink
The drawback is that every time you want to use it you must open the apps control panel and select File->Install Local.

BTW, The LXDE desktop also runs fine in Tinycore_xo so if you want a more traditional file manager, text editor and configurable terminal, you are set. If you want a full word processor, Abiword installs and runs fine (OnDemand)

This thing is growing on you... Grin
« Last Edit: January 31, 2010, 12:56:25 PM by mavrothal » Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#10 Re: Microcore linux for the XO-1 and XO-1.5

quickboot
Contributor
*
Posts: 39


January 31, 2010, 01:39:13 PM

It does grow on you!
Although for some reason, every other time I reboot into Microcore I end up in a terminal asking me to select 0-1 for Xvesa. The only accepted input is q (for quit), and it then boots to the frozen blank screen. Power button for 7 seconds and a second attempt then boots up fine.

I really like its snappiness (probably since it runs entirely in RAM?), but I do need to change the default font size to double the current. Midnight Commander is unfortunately utterly useless because of this.

The bottom flowing task bar is very slick. If only it were easy to add launch items to it (Opera nicely automatically installed itself into it!)

Does LXDE take any longer to load? Thanks for the On Demaand tip, I'll definitely be trying abiword at some point.

Wish list priority A:
                             -Double font size system wide
                             -Stable network manager, ideally able to display available networks
                             -Quicklaunch icon for Gedit or equivalent
Priority B:
                 -Thunar like GUI file system manager
                 -Battery monitor of some kind, a clock would be nice too

At some point it would be nice to install this (or the next faster variant   Wink   ) to boot off of the faster SD card, or internal SSD, ideally with GRUB (or equivalent) giving us a 2 second option defaulting to fastest OS, with Ubuntu and Sugar as alternates. (Wish lists are so easy to write-- actually figuring things out is another matter entirely)
« Last Edit: January 31, 2010, 01:59:15 PM by quickboot » Logged

I'm running Teapot's Ubuntu 8.10 on my XO. Boots in about a minute!

#11 Re: Microcore linux for the XO-1 and XO-1.5

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


January 31, 2010, 10:10:21 AM

The startup issues are probably related to the quality of the stick. It happens to me too but probably 1 out of 20.
For quick launch just right click ->apps->pick what you want

I do not think that the Aterm terminal fonts will be fixed anytime soon since its using bitmap fonts. Look around though you may find something.
However you could also run the normal LXDE desktop in startup. Just go to panel->apps audit->maintenance->onboot and pick LXDE. Next boot you run LXDE and tailor it to your needs.  

Consider though that all the GUI nice things come at a performance cost. Just try a "df" in minimal and loaded system. The first is loading 15-17 loops and a full one (LXDE with Flash) >55!
If you start loading up, is not becoming any better/faster that any other distro. Stay with Ubuntu Grin
As I said, I do not think is a general-use OS. No OS can make the XO do both everything and do it fast at the same time.
Have to pick what suits you better. See if you can tailor tinycore to your needs. That's the nice thing about it.

Regarding the rest of your wish list,... It's up to you Grin
« Last Edit: January 31, 2010, 03:19:25 PM by mavrothal » Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#12 Re: Microcore linux for the XO-1 and XO-1.5

quickboot
Contributor
*
Posts: 39


February 01, 2010, 02:10:26 PM

Okay! I've partially implemented my wishlist! and I've uploaded a clone of my Micro Core Linux image here with "Easy Install" instructions:
http://wdsuperhero.com/xo-laptop/

I've basically added Opera, LeafPad and the Rox-Filer file manager. However I can't learn on it because the font is unreadable for me. I've tried to find a replacement font, but have basically given up. Although this gives me hope.
Is there a way I can simply change the system screen resolution from ~800 down to ~600 or even ~480 so that everything will be much bigger?

(I know it might break Opera and some other apps that need higher resolutions).

I'm also still trying to find where to insert metal.lunchbox's network connectivity scripts into this non-standard Linux distro, so I always have to spend a valuable minute or two entering Terminal and manually launching the "connect" script.

I also wonder if there is a way to modify the cool launcher in Xbfdev so that when it launches Rox-Filer, I can add the equivalent of gksudo to the launch script. Changes to the /usr/local/tce.wbar config file and to the files in the tce.menu folder files get rewritten over on each boot. This rewriting, or inability to make permanent changes to system files, may also be what is stumping me in my futile font setting attempts.
« Last Edit: February 01, 2010, 03:37:33 PM by quickboot » Logged

I'm running Teapot's Ubuntu 8.10 on my XO. Boots in about a minute!

#13 Re: Microcore linux for the XO-1 and XO-1.5

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


February 01, 2010, 11:32:31 PM

Is there a way I can simply change the system screen resolution from ~800 down to ~600 or even ~480 so that everything will be much bigger?
Try to see if from the console (press ctrl+alt+del) either of these commands will execute w/o errors and get you to the desktop when you enter it as sudo.
Code:
Xfbdev -dpi 200 -mouse /dev/input/mice,5 &
export DISPLAY=:0.0
# and/or
Xfbdev -screen 1200x900x16 -mouse /dev/input/mice,5 &
export DISPLAY=:0.0
startx
change the -dpi value to something  smaller (150) and/or the -screen option in the second case. See how it goes. I'm not sure that the framebuffer can support different resolutions on the XO but try it just the same.
« Last Edit: February 02, 2010, 01:30:09 AM by mavrothal » Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#14 Re: Microcore linux for the XO-1 and XO-1.5

quickboot
Contributor
*
Posts: 39


February 02, 2010, 02:40:32 PM

Unfortunately I wasn't able to get any of those to work.   Cry
All of them, including various permutations resulted in the following error line:
Code:
root@box:~# Could not init font path element /usr/lib/X11/fonts/100dpi/, removing from list!
I did try different "-dpi" of 200, 150, 100 and resolutions of 1200x900, 800x600, and 640x480, all with exactly the same output results.
Logged

I'm running Teapot's Ubuntu 8.10 on my XO. Boots in about a minute!
Pages: [1] 2 3 4 ... 8
Print
Jump to:  

Members
Total Members: 2406
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 28
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 20
Total: 20