Tiny Core Linux: Difference between revisions
(separate Commands section, refer to How to backup your XO) |
No edit summary |
||
(29 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Tiny Core Linux is a minimal Linux distribution, designed for on-demand software loading. This page describes builds of Tiny Core Linux for the OLPC XO |
Tiny Core Linux is a minimal Linux distribution, designed for on-demand software loading. This page describes builds of Tiny Core Linux for the OLPC XO. For more information on Tiny Core Linux, see [http://tinycorelinux.com http://tinycorelinux.com] |
||
People involved: |
People involved: |
||
* [[User:Quozl|James Cameron]] |
* [[User:Quozl|James Cameron]], |
||
* Yioryos Asprobounitis |
* Yioryos Asprobounitis, |
||
* George Hunt and; |
|||
* Jerry Vonau. |
|||
== Core 4.7.7 2015-11-14 == |
|||
Announcing a build of Tiny Core Linux for OLPC XO. |
|||
== microcore 3.4 for XO-1 and XO-1.5 == |
|||
Useful for testing and diagnosis without touching the internal storage. |
|||
Announcing a build of Tiny Core Linux for XO-1 and XO-1.5. |
|||
== Features == |
|||
Useful for testing and diagnosis without touching the internal storage. Added recently are combined XO-1 and XO-1.5 support, a few scripts for backing up, restoring, and reverting laptops. |
|||
* runs on XO-1, XO-1.5, XO-1.75, or XO-4, |
|||
=== Features === |
|||
* |
* configured for a single root shell in text mode, with alternate consoles available for login, |
||
* |
* based on Core 4.7.7 (XO-1, XO-1.5) and Core 4.7.5 (XO-1.75, XO-4), uses the OLPC kernel from [[Release_notes/13.2.6|13.2.6-18]], and includes corresponding signed Open Firmware versions for automatic upgrade, |
||
* includes |
* includes wireless firmware for each laptop, and wireless tools from Tiny Core Linux. |
||
== Downloads == |
|||
* includes [[How_to_backup_your_XO|xo-backup, xo-repart, and xo-restore scripts]], (these may be destructive, look at them before you use them), |
|||
* [http://dev.laptop.org/~quozl/tinycore/core-4.7.7-xo-2015-11-14.zip core-4.7.7-xo-2015-11-14.zip] (50 MB) (md5sum b578d9dbd6ece520e47730166d84d46d) |
|||
* includes [[/Reversion|reversion]] server and client, for rapidly undoing filesystem changes made by laptop use, in test collections or shared classrooms. |
|||
== Prepare USB Drive == |
|||
* XO-1 and XO-1.5, [http://dev.laptop.org/~quozl/tinycore/microcore-3.4-xo-2011-01-18.tar microcore-3.4-xo-2011-01-18.tar] (15 MB) (md5sum b2b69b4b2c73e713d9b6c062d627f780) |
|||
=== Prepare USB Drive === |
|||
* select a USB drive of at least 128 MB capacity, (it may have either a FAT or ext2 filesystem), |
* select a USB drive of at least 128 MB capacity, (it may have either a FAT or ext2 filesystem), |
||
=== Linux - GNOME and Firefox === |
|||
* insert the USB drive, |
* insert the USB drive, |
||
* click on the |
* click on the zip file link above, and a dialog window will appear asking you what you want done with the download, |
||
* accept the default to open it in Archive Manager, and the Archive Manager window will appear, |
* accept the default to open it in Archive Manager, and the Archive Manager window will appear, |
||
Line 52: | Line 51: | ||
* eject the USB drive. |
* eject the USB drive. |
||
=== Linux - Terminal === |
|||
* download the |
* download the zip file using the link above, to the USB drive: |
||
cd /media/FRED |
cd /run/media/olpc/FRED |
||
wget ${URL} |
wget ${URL} |
||
* extract the |
* extract the zip file, at the top of the USB drive: |
||
cd /media/FRED |
cd /run/media/olpc/FRED |
||
unzip core-4.7.7-xo-2015-11-14.zip |
|||
* delete the zip file if you like, it is not required further, |
|||
rm core-4.7.7-xo-2015-11-14.zip |
|||
* eject the USB drive: |
* eject the USB drive: |
||
umount /media/FRED |
umount /run/media/olpc/FRED |
||
=== Mac OS X === |
|||
* insert the USB drive, |
* insert the USB drive, |
||
Line 74: | Line 76: | ||
* change ''Where'' to the name of the USB drive, usually ''Untitled'', then click on ''Save'', the dialog will go away, |
* change ''Where'' to the name of the USB drive, usually ''Untitled'', then click on ''Save'', the dialog will go away, |
||
* switch tasks to ''Finder'', display the USB drive, |
* switch tasks to ''Finder'', display the USB drive, |
||
* double-click on the |
* double-click on the zip file, and the contents will be expanded, a new folder ''boot'' will be created, |
||
* delete the |
* delete the zip file if you like, it is not required further, |
||
* eject the USB drive. |
* eject the USB drive. |
||
=== Windows === |
|||
* download the |
* download the zip file, |
||
* insert the USB drive, |
* insert the USB drive, |
||
* use WinZip or other operating system features to expand it onto the USB drive, |
* use WinZip or other operating system features to expand it onto the USB drive, |
||
* eject the USB drive. |
* eject the USB drive. |
||
== Prepare laptop == |
|||
* |
* ensure the laptop is [[Activation_and_developer_keys|unsecured]], or sign the kernel and initrd files with your deployment keys, |
||
* insert the USB drive into the laptop, |
|||
ok '''boot u:\boot\olpc.fth''' |
|||
== Boot laptop == |
|||
* after a short wait you will see the system prompt: |
|||
* turn on the laptop, and the USB drive will be automatically read, |
|||
* after a short wait you will see the Tiny Core Linux system prompt: |
|||
root@box:~# |
root@box:~# |
||
* you may remove the USB drive. |
|||
Tiny Core Linux is now ready for your commands. |
|||
=== Useful commands === |
|||
== Configure wireless == |
|||
root@box:~# '''iwlist eth0 scan''' |
|||
root@box:~# '''iwconfig eth0 essid '''''mynetwork'' |
|||
wifi.sh |
|||
* a DHCP client is in the background waiting to act when a network interface comes up, it may take a few seconds, |
|||
The script scans for available networks, lists them, and allows you to choose one, and enter a password if necessary. |
|||
== Configure wired USB ethernet after boot == |
|||
When a USB ethernet adapter is connected before boot, if drivers are present it will be configured and be ready for use. When the adapter is added after boot, configure the interface using DHCP: |
|||
udhcpc |
|||
== Installing additional utilities == |
|||
* additional utilities needed for a task can be installed: |
* additional utilities needed for a task can be installed: |
||
su -c 'tce-load -wi rsync' tc |
|||
See the Tiny Core Linux documentation for more detail. |
|||
== Additional shells == |
|||
* additional shells can be started using Alt/F2, username tc. |
* additional shells can be started using Alt/F2, username tc. |
||
== Access to XO-1 filesystem == |
|||
* you can mount and investigate the XO's flash file system, for example on an XO-1 with the [[JFFS2]] file system: |
|||
# '''cat /proc/mtd''' |
|||
* you can mount and investigate the XO's [[JFFS2]] flash filesystem, for example: |
|||
# '''mkdir /mnt/MY_XO_FS |
|||
cat /proc/mtd |
|||
# '''mount -t jffs2 mtd0 /mnt/MY_XO_FS''' |
|||
mkdir /mnt/root |
|||
mount -t jffs2 mtd0 /mnt/root |
|||
== Access to XO-1.5, XO-1.75 and XO-4 filesystem == |
|||
* you can mount and investigate the XO's eMMC or microSD filesystems, for example: |
|||
cat /proc/partitions |
|||
mkdir /mnt/boot /mnt/root |
|||
mount /dev/mmcblk0p2 /mnt/boot |
|||
mount /dev/mmcblk0p2 /mnt/root |
|||
== Backup and Restore == |
|||
See [[Backup]] for how to use Tiny Core Linux for backup and restore of a laptop. |
|||
See [[/Save Journal|Save Journal]] for how to use Tiny Core Linux for backup of the Sugar Journal on multiple laptops. |
|||
== Reversion == |
|||
See [[/Reversion|Reversion]] for how to use Tiny Core Linux to revert an XO with OLPC OS to a pristine filesystem configuration, as if it had just been installed. This can be used to quickly clean a set of class specific or loaned laptops. |
|||
* The XO version of Tiny Core Linux has backup and restore scripts, see [[How to backup your XO]] |
|||
== Remote Diagnosis == |
|||
== tinycore 2.8 with GUI for XO-1 and XO-1.5 == |
|||
* connect a USB ethernet adapter or [[#Configure_wireless|configure wireless]], |
|||
In January 2010 a version based on microcore 2.8 [http://lists.laptop.org/pipermail/devel/2010-January/027364.html was announced] for both the [[XO-1]] and [[XO 1.5]]. |
|||
* run our script: |
|||
xo-remote |
|||
* respond to the password change prompts for the user {{Code|tc}}, |
|||
* wait for script to complete, and note the IP address of the laptop: |
|||
* set up inbound port forwarding on router if required, |
|||
* connect your OpenSSH client, |
|||
ssh tc@$IP |
|||
See also [[Firmware/Remote|remote diagnosis using firmware only]]. |
|||
Ready version of Tiny Core Linux for the [[XO-1]] are available [http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/ here] and instructions for installation (for tc_xo_mm) [http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/older_versions/Instructions.txt here] |
|||
== Boot from JFFS2 on XO-1 == |
|||
[http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/older_versions/tinycore_xo.tar.bz2 tinycore_xo] is the minimal installation with just Xfbdev for display driver |
|||
Mount the JFFS2 filesystem, save the original boot directory, and make a new one: |
|||
[http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/older_versions/tc_xo_with_apps.tar.bz2 tc_xo_with_apps] adds a file manager, basic applications and Opera web browser |
|||
mkdir /mnt/root |
|||
[http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/older_versions/tc_xo_mm.tar.bz2 tc_xo_mm] adds sound, audio and video players |
|||
mount -t jffs2 mtd0 /mnt/root |
|||
mv /mnt/root/boot /mnt/root/boot.orig |
|||
mkdir /mnt/root/boot |
|||
Mount the USB drive, and copy the required files to the JFFS2 filesystem: |
|||
[http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/older_versions/tc_xo_X.tar.bz2 tc_xo_X] adds Xorg and functioning game keys |
|||
mount /dev/sda1 /mnt/sda1 |
|||
[http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/ tc-xo_01] in 3 flavors is now available. See the [http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/Announce%20tc-xo_01%20for%20the%20XO-1.txt build announcement] for more |
|||
cp /mnt/sda1/boot/olpc.fth /mnt/root/boot/ |
|||
cp /mnt/sda1/boot/initrd.x86 /mnt/root/boot/ |
|||
cp /mnt/sda1/boot/vmlinuz.0 /mnt/root/boot/ |
|||
Release the filesystems, remove the USB drive, and reboot: |
|||
The [http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/ tc-xo_02] based on tinycore v2.10 and unmodified OLPC kernel is now available. See the [http://ftp.cc.uoc.gr/mirrors/linux/TinyCore_for_XO1/Announce%20tc-xo_02%20for%20the%20XO-1.html v02 build announcement] for more |
|||
umount /mnt/sda1 |
|||
For further discussion of this variant check [http://www.olpcnews.com/forum/index.php?topic=4730.msg31395#msg31395 this forum thread] |
|||
umount /mnt/root |
|||
reboot |
|||
== References |
== References == |
||
* Tiny Core Linux http://www.tinycorelinux.com/ |
* Tiny Core Linux http://www.tinycorelinux.com/ |
||
* |
* [http://dev.laptop.org/git/users/quozl/mktinycorexo mktinycorexo git repository] |
||
* |
* get the source: {{code|git clone git://dev.laptop.org/users/quozl/mktinycorexo}} |
||
[[Category:Linux distributions]] |
[[Category:Linux distributions]] |
Latest revision as of 01:04, 14 November 2015
Tiny Core Linux is a minimal Linux distribution, designed for on-demand software loading. This page describes builds of Tiny Core Linux for the OLPC XO. For more information on Tiny Core Linux, see http://tinycorelinux.com
People involved:
- James Cameron,
- Yioryos Asprobounitis,
- George Hunt and;
- Jerry Vonau.
Core 4.7.7 2015-11-14
Announcing a build of Tiny Core Linux for OLPC XO.
Useful for testing and diagnosis without touching the internal storage.
Features
- runs on XO-1, XO-1.5, XO-1.75, or XO-4,
- configured for a single root shell in text mode, with alternate consoles available for login,
- based on Core 4.7.7 (XO-1, XO-1.5) and Core 4.7.5 (XO-1.75, XO-4), uses the OLPC kernel from 13.2.6-18, and includes corresponding signed Open Firmware versions for automatic upgrade,
- includes wireless firmware for each laptop, and wireless tools from Tiny Core Linux.
Downloads
- core-4.7.7-xo-2015-11-14.zip (50 MB) (md5sum b578d9dbd6ece520e47730166d84d46d)
Prepare USB Drive
- select a USB drive of at least 128 MB capacity, (it may have either a FAT or ext2 filesystem),
Linux - GNOME and Firefox
- insert the USB drive,
- click on the zip file link above, and a dialog window will appear asking you what you want done with the download,
- accept the default to open it in Archive Manager, and the Archive Manager window will appear,
- click on Extract, and a dialog window will appear asking you where to extract to,
- click on the USB drive in the Places list, then click on the Extract button, a dialog window will appear to tell you it worked,
- close the dialog window,
- close the Archive Manager window,
- close the Downloads window,
- eject the USB drive.
Linux - Terminal
- download the zip file using the link above, to the USB drive:
cd /run/media/olpc/FRED wget ${URL}
- extract the zip file, at the top of the USB drive:
cd /run/media/olpc/FRED unzip core-4.7.7-xo-2015-11-14.zip
- delete the zip file if you like, it is not required further,
rm core-4.7.7-xo-2015-11-14.zip
- eject the USB drive:
umount /run/media/olpc/FRED
Mac OS X
- insert the USB drive,
- control-click on the link above, select Download Linked File As ..., and a Save As dialog will appear,
- change Where to the name of the USB drive, usually Untitled, then click on Save, the dialog will go away,
- switch tasks to Finder, display the USB drive,
- double-click on the zip file, and the contents will be expanded, a new folder boot will be created,
- delete the zip file if you like, it is not required further,
- eject the USB drive.
Windows
- download the zip file,
- insert the USB drive,
- use WinZip or other operating system features to expand it onto the USB drive,
- eject the USB drive.
Prepare laptop
- ensure the laptop is unsecured, or sign the kernel and initrd files with your deployment keys,
- insert the USB drive into the laptop,
Boot laptop
- turn on the laptop, and the USB drive will be automatically read,
- after a short wait you will see the Tiny Core Linux system prompt:
root@box:~#
- you may remove the USB drive.
Tiny Core Linux is now ready for your commands.
Configure wireless
wifi.sh
The script scans for available networks, lists them, and allows you to choose one, and enter a password if necessary.
Configure wired USB ethernet after boot
When a USB ethernet adapter is connected before boot, if drivers are present it will be configured and be ready for use. When the adapter is added after boot, configure the interface using DHCP:
udhcpc
Installing additional utilities
- additional utilities needed for a task can be installed:
su -c 'tce-load -wi rsync' tc
See the Tiny Core Linux documentation for more detail.
Additional shells
- additional shells can be started using Alt/F2, username tc.
Access to XO-1 filesystem
- you can mount and investigate the XO's JFFS2 flash filesystem, for example:
cat /proc/mtd mkdir /mnt/root mount -t jffs2 mtd0 /mnt/root
Access to XO-1.5, XO-1.75 and XO-4 filesystem
- you can mount and investigate the XO's eMMC or microSD filesystems, for example:
cat /proc/partitions mkdir /mnt/boot /mnt/root mount /dev/mmcblk0p2 /mnt/boot mount /dev/mmcblk0p2 /mnt/root
Backup and Restore
See Backup for how to use Tiny Core Linux for backup and restore of a laptop.
See Save Journal for how to use Tiny Core Linux for backup of the Sugar Journal on multiple laptops.
Reversion
See Reversion for how to use Tiny Core Linux to revert an XO with OLPC OS to a pristine filesystem configuration, as if it had just been installed. This can be used to quickly clean a set of class specific or loaned laptops.
Remote Diagnosis
- connect a USB ethernet adapter or configure wireless,
- run our script:
xo-remote
- respond to the password change prompts for the user tc,
- wait for script to complete, and note the IP address of the laptop:
- set up inbound port forwarding on router if required,
- connect your OpenSSH client,
ssh tc@$IP
See also remote diagnosis using firmware only.
Boot from JFFS2 on XO-1
Mount the JFFS2 filesystem, save the original boot directory, and make a new one:
mkdir /mnt/root mount -t jffs2 mtd0 /mnt/root mv /mnt/root/boot /mnt/root/boot.orig mkdir /mnt/root/boot
Mount the USB drive, and copy the required files to the JFFS2 filesystem:
mount /dev/sda1 /mnt/sda1 cp /mnt/sda1/boot/olpc.fth /mnt/root/boot/ cp /mnt/sda1/boot/initrd.x86 /mnt/root/boot/ cp /mnt/sda1/boot/vmlinuz.0 /mnt/root/boot/
Release the filesystems, remove the USB drive, and reboot:
umount /mnt/sda1 umount /mnt/root reboot
References
- Tiny Core Linux http://www.tinycorelinux.com/
- mktinycorexo git repository
- get the source: git clone git://dev.laptop.org/users/quozl/mktinycorexo