Showing posts with label EeePC 4G. Show all posts
Showing posts with label EeePC 4G. Show all posts

Sunday, November 8, 2009

Install win2k in my EeePC 4G

After waiting for more than 2 years, finally I got win2k installed to my EeePC 4G this weekend.

This has been a long story. Since I bought my EeePC 4G in Oct 2007, I have been thinking about dual boot Windows and Linux in my EeePC. But due to the limitation of disk space with the 4GB SSD, the idea was to boot either one of them from USB.

Initially, I wanted to boot win2k from USB because I expect to use Linux more often. But after studying the possibility, I finally turned to working on Booting Xandros from USB, because chances are that Linux can more probably be customized. Indeed, after working with other forum members of the EeeUser Forum, we worked out a solution to Boot Xandros from USB. And then I further worked out the hack to mount a SDHC as the USER partition of the union filesystem of the EeePC, so I could spare the 2nd partition of the SSD (/dev/sda2) for win2k. It was then I have purchased this copy of Windows 2000 Professional.

I wanted to install Windows on my EeePC because I own quite a number of commerical music softwares that are Windows only, and I wanted to make use of my EeePC as a portable music workstation. In fact, this was also the reason why I have purchased a copy of winxp for my desktop after having abandoned Windows for so many years. But after working some time with my EeePC 4G, I realized that the CPU and hardware is just not powerful enough to make any decent music. So I didn't bother to install win2k anymore.

Recently, after having installed the 16 GB 2nd SSD from my brother, there is now plenty of disk space in my EeePC and so I am tempted to work on this again. And so this Sunday, I spent the afternoon doing this.


With an USB CDROM and the win2k install CD which I have prepared 2 years ago slipstreamed with SP4 as per instructions here: Making a Bootable Windows 2000 CD with Service Pack Integrated, installation is straightforward though very slow. It took me more than 2 hours to complete the installation. The reason is probably because of USB 1.1 support only in the BIOS.

I didn't encounter the BSOD problem for ar5211.sys (wifi card driver) as mentioned by forum member sloppiE in this thread, probably because I have turned off WiFi in default Xandros. And as per his instructions, after Windows installation was completed, I installed the drivers from the Asus Support DVD running the setup.exe in each of the folders in the DVD:

\Drivers\Acpi\
\Drivers\Audio\driver\
\Drivers\Chipset\
\Drivers\Wireless\install_cd\
\Software\Lanutility\

I also installed the EGalax touchscreen Windows driver from its install CD, and then I extracted the Silicone Wave bluetooth wireless driver from win2k.zip I have downloaded to get my bluetooth tongle working under win2k.


Now that win2k installation was completed, I need to get my Linux back in dual boot. I choose grub as the default bootloader. So I need to put grub stage0 back to the MBR of the SSD. To do this, I booted up to the copy of default Xandros in my 1st SSD. [Note: I have set 2nd SSD as 1st boot device in BIOS, and have installed win2k and my working copy of default Xandros in the 2nd SSD. The copy of default Xandros in the 1st SSD is for experiments only.]

In default Xandros, I open a terminal as root to run grub:
asus-2134610915:/home/user> grub
Probing devices to guess BIOS drives. This may take a long time.
Then in the grub shell, I enter these commands to install grub to the MBR of my 2nd SSD:
       [ Minimal BASH-like line editing is supported.   For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

grub> find /boot/grub/stage1
(hd0,0)
(hd1,1)

grub> root (hd1,1)

grub> setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,1)/boot/grub/stage2 /boot/grub/menu.
lst"... succeeded
Done.

grub> quit
A bit explanation here:
(hd1) is my 2nd SSD (/dev/sdb), and (hd1,0) is the 1st partition in my 2nd SSD (/dev/sdb1) where I have installed win2k; (hd1,1) is the 2nd partition in my 2nd SSD (/dev/sdb2) where I have installed my working copy of default Xandros.

Now, on reboot, the system will boot up to default Xandros. And to get win2k to dual boot, I also need to edit the grub boot menu to add an entry for win2k. You can do it now or after you have rebooted into default Xandros. Basically, you need to edit the file /boot/grub/menu.lst. Here is the entry I have added (at the end of the file) for win2k:
title Win2k
rootnoverify (hd0,0)
makeactive
chainloader +1
Please be aware that if you still have union filesystem in your default Xandros, you need to edit the copy of menu.lst in the SYSTEM partition (i.e. sda1) instead of in sda2. In my case, I have already removed union filesystem, so just the one in sdb2.


There are a few settings you need to change to get win2k running smoothly which is covered in the section "Optimizing Windows XP" of the EeePC 701 User Guide.

But even after all that, win2k is terribly slow compared with default Xandros. So I don't think I will use it very often unless absolutely necessary.

Sunday, October 18, 2009

Install a 2nd SSD to my EeePC 4G

After waiting for almost 3 months, I have finally received the 16 GB Asus Phison SSD my brother had promised to send me (together with a 1GB DDRII RAM). These are the remains after my brother had upgraded the 16 GB SSD of his 901 to a 64 GB Patriot SSD, and RAM to 2 GB.

I have been reading in the EeeUser Forum that default Xandros of EeePC 4G is not compatible with a 2nd SSD. But out of my surprise, I just plug it in and it runs - no hardware modification required. The 1st SSD (4GB SiliconMotion SM223AC) remains the IDE master, and the new 16 GB Phison SSD becomes the IDE slave.


So apparently, there are different software and hardware versions of EeePC 4G, some that needs the FLASH_CON pin 26 modification for to insert a 2nd SSD, while the earliest models (like the one I bought) don't need this.

For your information, my 4G was bought on the 1st day EeePC started to be sold in Hong Kong. Its serial number is:
701-W0004
MB REV 701
S/N: 7A0AAQ008175
VN: 7569

Now that I have a 16 GB 2nd SSD, I can use it as permanent home for default Xandros - because for some months already, I have my working copy of default Xandros in SD card (boot from USB), while the 1st SSD is retained for experiments. Also, I have been thinking for long time to install also win2k in my EeePC (this is the reason why initially I worked on booting Xandros from USB).

So my new 16 GB 2nd SSD will be the home of win2k, default Xandros, and the HOME partition. And to do this, I booted with Pupeee and run GParted to repartition the 2nd SSD, then dd the working default Xandros partition (no union filesystem) from the SD card to the 2nd SSD.
dd if=/dev/sda1 of=/dev/hdd2 conv=notrunc,noerror,sync bs=4k
Please note that when I booted from Pupeee, the system sees the 2nd SSD as /dev/hdd, and the SD card as /dev/sda.

Then I need to change the volume label of /dev/hdd2, and also edit /boot/grub/menu.lst to specify the correct root partition and the volume label (because I am using an custom initramfs image that mounts the root partition by seeking volume label). This time, I chose "XANDROS" as the volume label of this root partition.
e2label /dev/hdd2 XANDROS
But before this system can boot, I still need to install grub to the MBR of the 2nd SSD. Then I can set in BIOS the 2nd SSD as 1st boot device. And for this, I open a terminal and run the grub command:
sudo bash
grub
Then, in the grub shell, I run these commands:
grub> find /boot/grub/stage1
grub> root (hd1,1)
grub> setup (hd1)
Now I have my working copy of default Xandros up and running.

Edit fastinit to avoid mounting 2nd SSD as home partition

Currently, I have EeePC Linux version 901 on the 1st SSD and this version will automatically mount any Linux partition with the volume label HOME as /home. Of course, this is not desirable because I don't want my experiments to mess up my working copy of default Xandros. So I disable this in the boot script /sbin/fastinit.

To do this, you can either hexedit /sbin/fastinit (with khexedit) to remove the line "/bin/mount -onoatime -L HOME /home > /dev/null" [NB. Replace with equal number of blanks], or simply run this sed command in a root terminal:
sudo bash
sed -i 's@/bin/mount -onoatime -L HOME /home > /dev/null 2>&1@ @' /sbin/fastinit
So after almost five months of living in SD, my default Xandros finally find a permanent home in the new 16 GB SSD.

Monday, July 13, 2009

Upgrade my EeePC to Openoffice 3.1

From time to time, I will receive emails with *.docx attachment which is only supported by openoffice3 but not the openoffice 2.x that comes pre-installed in EeePC. So there is the need for me to upgrade to openoffice3.

Upgrading to openoffice.org3 requires an extra 381MB disk space because by nature of the union filesystem, files of the factory installed version are in the read-only partition sda1 and thus cannot be removed unless you have removed union filesystem or uninstall openoffice from the read-only partition as what I have previously done. Then you can save 264~299 MB depending on your model.

The following steps are gathered from the information in this wiki: Upgrading OpenOffice.org from 2.0 to 2.3.1 and from this and this threads by kgha in the EeeUser Forum.

STEPS

1) Download the latest openoffice of your required localized version for "Linux DEB" platform from http://download.openoffice.org/other.html, save it to "My Home".

2) Extract the archive and navigate into the "DEB" folder of extracted folder tree. Then open a terminal:

Alternatively, you can press [Ctrl]-[Alt]-[T] to open a terminal and then change directory into the "DEB" folder:
cd OOO310_m11_native_packed-4_en-US.9399/
cd DEBS/
[NB. Please note that the 1st folder name will be different with different OOo and localized language version.]

3) Install the deb packages in the "DEB" folder according to this sequence:
sudo dpkg -i ooobasis*.deb
sudo dpkg -i openoffice*.deb

4) There will be some error messages that the packages are left unconfigured due to dependency problem:

I corrected this by:
sudo dpkg --configure -a
5) Also, if you have enabled Advanced desktop, you will also need to install the openoffice.org Debian menu package in the folder "desktop-integration" to have openoffice3 programs menu show up automatically in the KDE start menu:
cd desktop-integration/
sudo dpkg -i openoffice*.deb
This will also take care of "File Associations" in "File Manager".

6) Finally, if you are using the Easy Mode simple desktop, you will need to update the tabbed icons for the new OOo version program shortcuts by editing simpleui.rc:
sudo kwrite /opt/xandros/share/AsusLauncher/simpleui.rc
Please note that depending on your model, the old OOo program shortcuts (in /usr/share/applications/) may be:
ooo-writer.desktop
ooo-calc.desktop
ooo-impress.desktop
ooo-draw.desktop
ooo-math.desktop
OR
/opt/xandros/bin/ooo-impress-ar.sh
/opt/xandros/bin/ooo-calc-ar.sh
/opt/xandros/bin/ooo-writer-ar.sh
/opt/xandros/bin/ooo-math-ar.sh
/opt/xandros/bin/ooo-draw-ar.sh
And the new program shortcuts installed by openoffice3 are:
openoffice.org3-base.desktop
openoffice.org3-calc.desktop
openoffice.org3-draw.desktop
openoffice.org3-impress.desktop
openoffice.org3-math.desktop
openoffice.org3-printeradmin.desktop
openoffice.org3-startcenter.desktop
openoffice.org3-writer.desktop
So what you'll need to do is to search for "ooo" in your simpleui.rc and replace it by the corresponding new program shortcut, e.g. search and replace "ooo-writer.desktop" by "openoffice.org3-writer.desktop".

Then, on reboot, you should be able to run openoffice3 from the usual Easy mode desktop icons in the "Work" tab and open *.docx files.

Saturday, June 13, 2009

Part IV: 2nd Test restoring to minimal EeePC Linux with 1.6.1 701 en iso

(cont'd from Part III: Re-installing Removed Packages ...)

My next test that follows is to build a minimal EeePC Linux system on my 4G with a 701 en-US 1.6.1.5-a4 iso.

Prepare the System Recovery USB Disk

With the downloaded iso, first I burn it into a DVD, then run BootTool to create the System Recovery USB disk. But the operation was not successful, "P701L.gz" and "user_start.dat" cannot be copied to the 1GB USB disk.

This is the first time I experience this error though I have heard about it for long time already. I tried it twice not successful, not even by manually copying the files from the DVD to the USB stick. So I ended up using another USB disk (the 2GB one I use to use for such testing).

Next I download the script package restore-minimal-701-4G.tgz I have uploaded to my website, and extract it to the USB disk with 7-zip File Manager.

Edit the Remove Package Lists

The next thing to do is to edit the remove*.list files for the packages I want to remove. But since I have no idea what packages are there in this EeePC Linux version, I first restore from USB with the original bootscript (select the 1st entry at the grub boot menu), then boot it up to see what is in it.

With the "dpkg -l" or "dpkg-query -W" command, I check what packages are installed and edit the remove*.list files accordingly. [Note: I have uploaded the dpkg -l list to this Wiki.] Basically, unlike in the previous test, there are no Chinese locale packages in this version, so no more "remove_zh_tw.list" and "remove_zh_cn.list". Also scim has been replaced by gcin. The resulted remove lists are slightly different to the 701 4G version. There are less packages to remove - only a total of 683 MB.
/media/D:/removes> ls
README remove_games.list remove_kids.list remove_settings.list
remove_acroread.list remove_gcin.list remove_ooo.list SUMMARY
remove_drivers.list remove_internet.list remove_play.list
I also take this opportunity to test the remove list one by one uninstalling them with apt-get to see if any error will occur during the process. [NB. Since I still have union filesystem, nothing will really get uninstalled this time.]
/media/D:/removes> sudo apt-get remove `cat remove_games.list`
Reading package lists... Done
Building dependency tree... Done
Note, selecting xandros-frozen-bubble-helper for regex 'frozen-bubble*'
Note, selecting frozen-bubble-lib for regex 'frozen-bubble*'
Note, selecting frozen-bubble-data for regex 'frozen-bubble*'
Note, selecting frozen-bubble for regex 'frozen-bubble*'
Note, selecting planetpenguin-racer-extras for regex 'planetpenguin-racer*'
Note, selecting planetpenguin-racer for regex 'planetpenguin-racer*'
Note, selecting planetpenguin-racer-data for regex 'planetpenguin-racer*'
The following packages will be REMOVED:
crack-attack fb-music-high frozen-bubble frozen-bubble-data gnome-sudoku kdegames-card-data
kpat ktuberling libkdegames1 ltris planetpenguin-racer planetpenguin-racer-data
xandros-frozen-bubble-helper xandros-gnome-sudoku-helper
0 upgraded, 0 newly installed, 14 to remove and 12 not upgraded.
Need to get 0B of archives.
After unpacking 59.3MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 64338 files and directories currently installed.)
Removing crack-attack ...
Removing xandros-frozen-bubble-helper ...
Removing frozen-bubble ...
Removing fb-music-high ...
Removing frozen-bubble-data ...
Removing gnome-sudoku ...
Removing kpat ...
Removing kdegames-card-data ...
Removing ktuberling ...
Removing libkdegames1 ...
Removing ltris ...
Removing planetpenguin-racer ...
Removing planetpenguin-racer-data ...
Removing xandros-gnome-sudoku-helper ...
/media/D:/removes>
For those who are interested, here is the set of remove file lists I have ended up with: remove_files-701_en_US-1.6.1.5-a4.tgz.

Before and After

Again, I have compared the the "df" and "fdisk -l" outputs before and after, showing the free disk space and the partition layout before and after the process:

1) Original 13% (!!?) free disk space in sda1, total filesystem size of 2371235k
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda1 2371235 2059136 312099 87% /mnt
2) Now 3% free disk space in sda1, Used = 1402473k, i.e. freed up 656 MB. Also filesystem size reduced to 1446438k, i.e. sda1 40% smaller
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda1 1446438 1402473 43965 97% /mnt
3) Original disk partition layout: Exactly the same as 701 4G, sda1 occupies 300 cylinders and sda2 occupies 184 cylinders. I guess Asus has changed the packages but have not resized the partition accordingly, so resulting in so much not usable free disk space in sda1.
Disk /dev/sda: 4001 MB, 4001292288 bytes
255 heads, 63 sectors/track, 486 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 300 2409718+ 83 Linux
/dev/sda2 301 484 1477980 83 Linux
/dev/sda3 485 485 8032+ c W95 FAT32 (LBA)
/dev/sda4 486 486 8032+ ef EFI (FAT-12/16/32)
4) After resizing: read-only sda1 only occupies 183 cylinders and read-write sda2 enlarged to 301 cylinders
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1 1 183 1469916 83 Linux
/dev/sda2 184 484 2417782+ 83 Linux
So much more usable disk space for you.

Moreover, with this hack you are free to delete and re-install packages as you like. Not like with union filesystem when you upgrade a package, the old files are still eating up your precious disk space in the read only partition. This is especially true if you plan to upgrade openoffice, Acrobat Reader, etc.

Re-installing Removed Packages

For the purpose of testing, I have re-installed all removed packages again.

Re-installing removed packages is more complicated for this version. I tend to believe that this is an alpha version, because most of the factory installed package version are not found in the 1.6 en respositories tree on Asus Update website. Instead, they scatter everywhere in the Asus Update website - some from 900, some from 1000H, ... everywhere! I have to use the Advanced search of Google to locate them within http://update.eeepc.asus.com/.

Also, the original respositories tree is for EeePC Linux version 1.6.4 p701 en, but there are not many packages in that repos tree. Probably just an experimental version. If I just run an "sudo apt-get update" and run the synaptic package manager, there are hardly any packages available. So I have to edit /etc/apt/sources.list and add the 1.6 repos entries:
deb http://update.eeepc.asus.com/1.6 common main
deb http://update.eeepc.asus.com/1.6 p701 main
deb http://update.eeepc.asus.com/1.6 en main
Then when I fire up synaptic and re-install the packages running through the list in the "removed.log", it turned out that most packages can be installed easily - easier than with 701 4G iso.

Some tips to do it faster:
- Games can be ticked from the [Section] View > [Games and Amusement] of synaptic
- Same for those educational programs - in [Science] and [Mathematics] section


Also, if you plan to do it over and over, again and again, you may want to save or backup the *.deb in the folder /var/cache/apt/archives/ to somewhere else. Installing a program won't take much time, it take much longer to download it.

EDIT 2009/6/17: See my blog of Jun 15, 09 for how I build a local repository of Asus Update to speed up this re-installation process.


Packages of trouble

1) Installing smplayer popup with this error message because mplayer is not available in any of the 1.6 repo trees!

I have to manually download it from the 701 pool: mplayer_1.0~rc1-12etchxandros10_i386.deb
and install it in File Manager:

This installation will end up with an error message because mplayer depends on mplayer-skin but mplayer-skin has not yet been installed (because it also depends on mplayer!). When you run synaptic later, it will complain there is a broken package.

Now just install mplayer-skins, and the dependency will be resolved.

2) Firefox - need to force version to 2.0.x because 3.0.4 is also available on the 1.6 repo tree but requires libc6 and a lot of libraries upgrade and can only be done by running the firefox-upgrade meta package.

To force version, first highlight the package you want to install, then select from the pull down menu [Package] > [Force Version],

and select the 2.0.x versions.


3) adobe-flash-player - the infamous problem with flashplayer10 on EeePC Linux. Again we need to force version to 9.x instead of the higher 10.x versions. If you want the 10.x version, you have to install it as part of firefox-upgrade (to version 3.0.x) because it requires a higher libc6 version than the default one.


4) gcin (Chinese input Method) - This is the most troublesome. All versions available from the 1.6 repo trees require a libc6 upgrade which is of course undesirable (though possible). So I downloaded it from the p701 repos tree: gcin_1.3.4-2asus4_i386.deb and gcin-qt3-immodule_1.3.4-2asus4_i386.deb.

To install them, open a terminal and enter this command:
deb/home/user> ls
gcin_1.3.4-2asus4_i386.deb gcin-qt3-immodule_1.3.4-2asus4_i386.deb Trash/ My Documents/
/home/user> sudo dpkg -i *.deb
Selecting previously deselected package gcin.
(Reading database ... 71993 files and directories currently installed.)
Unpacking gcin (from gcin_1.3.4-2asus4_i386.deb) ...
Selecting previously deselected package gcin-qt3-immodule.
Unpacking gcin-qt3-immodule (from gcin-qt3-immodule_1.3.4-2asus4_i386.deb) ...
Setting up gcin (1.3.4-2asus4) ...

Setting up gcin-qt3-immodule (1.3.4-2asus4) ...
/home/user>
The installation went alright, but gcin is still not showing up in the taskbar. So I open synaptic again and install "xandros-gcin". And on re-starting X by pressing [Ctrl]-[Alt]-[BkSp], now I can input Chinese.

Final Comments

After these testings, I can now confirm that this restore to minimal script is working, though not perfect. There seems to be still some minor bugs, but basically it works. And since it take quite some time to run it once, I don't think I can run many test on this.

The % of free disk space in sda1 I ended up with varies with the different iso and what packages you want to remove, and is rather out of my control. With the 701 4G, I achieved 92%, and this one 97%. Compared with the disk space reclaimed shrinking down sda1, I think these figures are acceptable.

If I have time to further test on other iso, I will further post my remove file lists. But I think some Linux expert may be able to come up with a more comprehensive remove file list, knowing what libraries can be safely removed.

And so this concludes this project of mine.

P.S. With the 701 en-US 1.6.1.5-a4 iso, I do not end up with the hissing sound in the minimal system.

Part I: My 1st Trial
Part II: Success - Restoring my EeePC from USB to a Minimal System
Part III: Re-installing Removed Packages to my minimal EeePC Linux 701 4G
Part IV: 2nd Test restoring to minimal with a 1.6.1 701 en iso
Part V: Yet another test with 1.6 French iso
Conclusion: Restore from USB to minimal system

Part III: Re-installing Removed Packages to my minimal EeePC Linux 701 4G

(cont'd from Part II: Success - Restoring my EeePC from USB to a Minimal System)

After you have restored from USB to a minimal system with my my restore script package restore-minimal-701-4G.tgz, you can re-install packages you want with synaptic package manager.

I have tried to write a script to re-install them all in one stroke but found that it is not so simple because the original factory version of many packages are not available from Asus Update website. Instead, only higher versions can be found. So you are forced to upgrade those packages.

With my 701 4G, except for a few packages, most removed packages can be re-installed easily with the synaptic package manager.

Below is the missing list:
acroread-cn-tw=7.0.9-1xandros3
acroread=7.0.9-1xandros2
hsfmodem-modules-2.6.21.4-eeepc=7.60.00.04oem-8
kpat=4:3.4.2.11-11
kdegames-card-data=4:3.4.2.11-11
libkdegames1=4:3.4.2.11-11
planetpenguin-racer=0.3.1-8xandros3
planetpenguin-racer-data=0.3.1-8xandros3
ktuberling=4:3.4.2.11-11
skype=1.4.0.114-1xandros1
firefox=2.0.0.7-1asus1
firefox-locale-zh-cn=2.0.0.7-1asus1
firefox-locale-zh-tw=2.0.0.7-1asus1
pidgin=1:2.0.2-0ubuntu1+asus8
pidgin-data=1:2.0.2-0ubuntu1+asus8
fbreader-qt4=0.8.4a1xandros8
asus-usbhandset=1.0-17
kalzium=4:3.4.2.12-19
kstars=4:3.4.2.12-19
kstars-data=4:3.4.2.12-19
kmessedwords=4:3.4.2.12-19
khangman=4:3.4.2.12-19
kbruch=4:3.4.2.12-19
kig=4:3.4.2.12-19
kmplot=4:3.4.2.12-19
openoffice.org=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-base=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-calc=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-common=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-core=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-draw=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-help-en-us=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-help-zh-cn=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-help-zh-tw=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-impress=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-java-common=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-kde=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-l10n-zh-cn=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-l10n-zh-tw=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-math=2.0.4.dfsg.2-7etch2eeepc1
openoffice.org-writer=2.0.4.dfsg.2-7etch2eeepc1
smplayer=0.5.21-0xandros23
amarok=1.4.3-3xandros38asus27
amarok-engines=1.4.3-3xandros38asus27
amarok-helix=1.4.3-3xandros38asus27
amarok-xine=1.4.3-3xandros38asus27
gwenview=1.4.2-1xandros7
gwenview-i18n=1.4.2-1xandros5
scim=1.4.4-7asus4
scim-modules-table=0.5.6-2eeepc1
scim-tables-zh=0.5.6-2eeepc1
libscim8c2a=1.4.4-7asus4
xandros-antivirus=2.0.62-2
libclamav2=0.91.2-4
diskutil=1.0.0-0xandros17
asus-userdiag=1.0.16
thunderbird-locale-zh-cn=1:2.0.0.6-1asus1
kde-i18n-zhcn=4:3.4.2.84-2
xandros-i18n-zhcn=1.159-1
thunderbird-locale-zh-tw=1:2.0.0.6-1asus1
kde-i18n-zhtw=4:3.4.2.84-2
xandros-i18n-zhtw=1.159-1


Packages of trouble and how I deal with them

1) frozen-bubble - need to force version to original 2.1.0-1


2) clamav - depend on libclamav2 (>= 0.91.2) but is not available in the 701 repositories tree.

I have to manually download libclamav2_0.91.2-4_i386.deb from Asus Update version 1.6 common repo tree and install with right click > [Install DEB file] in File Manager before I can use synaptic to install clamav and xandros-antivirus.

3) There are a few packages that can not be directly installed, e.g. firefox, openoffice, ... , etc. This is probably because the latest version need extra or different libraries not provided in the factory EeePC Linux version.

To install them, search in synaptic and look for their update pack provided by Asus, e.g. "asus-openoffice-update-1".

NB. If you have a 701 4G, searching in synaptic may result in this error:
E: Unable to parse package file /var/lib/dpkg/status (2)
E: Unable to lock the download directory
Avoid using the [Search] button in synaptic or read this wiki for solution.

Part I: My 1st Trial
Part II: Success - Restoring my EeePC from USB to a Minimal System
Part III: Re-installing Removed Packages to my minimal EeePC Linux 701 4G
Part IV: 2nd Test restoring to minimal with a 1.6.1 701 en iso
Part V: Yet another test with 1.6 French iso
Conclusion: Restore from USB to minimal system

Part II: Success - Restoring my EeePC from USB to a Minimal System

(cont'd from Part I: My 1st Trial)

After struggling for two weeks with failures after failures, I have finally worked it out. It turned out that simply by moving the files from sda1 to sda2 and back is enough to defragment the filesystem. But depending on the packages you removed and where the files are originally located, the resulted disk fragmentation may vary and it need some trial and error to determine the end block of sda1.

For the brave ones who would like to join my adventure, you can download my script package restore-minimal-701-4G.tgz and extract the files to your EeePC System Recovery USB disk. [NB. Do not use winzip to extract the files] Then reboot and run it like what I have described in Restore EeePC from Recovery DVD without unionfs or Boot Xandros from USB for Dummies.

Scenario I have Tested

This is only preliminary success - different scenarios are not yet thoroughly tested. So far only tested successful with the following setup:
Hardware: EeePC 4G
Recovery EeePC Linux disk image: 701 4G iso
Set of Uninstalled Programs: Minimal system (as per remove*.list files I have enclosed in my script package)
Allow extra disk space while shrinking filesystem = 5% (achieving final available disk space of 92% vs. original of 96%)
[NB. If you shrink the filesystem too much with resize2fs, it is not possible to redo it. You will have to start all over again. So it is up to you to experiment if you want to maximize use of disk space in the read only partition.]

If you have another version of EeePC Linux other than the EeePC Linux version 1.0 (for 701 4G) I have tested, you will need to check and change the package names in the remove*.list files according to your version. Run "dpkg -l" to list packages installed in your system and compare with my remove list.
[Remember: Do not edit the files with Windows Notepad. Use
Notepad2 instead if you want to do it in Windows. The files should be saved with UNIX style "End of Line" instead of MSDOS text file.]

Before and After

Here are the "df" and "fdisk -l" outputs before and after the process. These show the free disk space and the partition layout before and after the process:

1) Original 5% free disk space in sda1, 2147308k used out of 2371820k total filesystem size
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda1 2371820 2147308 104028 95% /mnt
2) Now 8% free disk space in sda1, Used = 1367640k, i.e. freed up 780 MB. Also filesystem size reduced to 1534320k, i.e. 35% smaller
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda1 1534320 1367640 119932 92% /mnt
3) Original disk partition layout: sda1 occupies 300 cylinders and sda2 occupies 184 cylinders
Disk /dev/sda: 4001 MB, 4001292288 bytes
255 heads, 63 sectors/track, 486 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 300 2409718+ 83 Linux
/dev/sda2 301 484 1477980 83 Linux
/dev/sda3 485 485 8032+ c W95 FAT32 (LBA)
/dev/sda4 486 486 8032+ ef EFI (FAT-12/16/32)
4) After resizing: sda1 only occupies 193 cylinders and sda2 enlarged to 291 cylinders
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1 1 193 1550241 83 Linux
/dev/sda2 194 484 2337457+ 83 Linux
Please note that I have tested it a few times and the numbers given here and below are extracted during different trials. So they may not correlate.

The Restore Process

It took me 17 mins to run this restore process once, break down as follows:
1) 5 mins - Boot up and restore Linux system image from USB (depending on the speed of your USB device, it may take longer)
2) 2 mins - Uninstalling packages
3) 8 mins - Defragment filesystem [NB. the more files in sda1, i.e. less packages you remove, the longer it will take]
4) 2 mins - Resize filesystem and partition

During the process, you will be prompted by apt-get to confirm removal of programs [Y/n]? for each remove*.list file it processes.
Processing remove_settings.list ...

Reading package lists... Done
Building dependency tree... Done
Note, selecting libclamav-client-perl for regex 'libclamav*'
Note, selecting libclamav-dev for regex 'libclamav*'
Note, selecting libclamav2 for regex 'libclamav*'
Note, selecting libclamav-client-perl for regex 'clamav*'
Note, selecting php5-clamavlib for regex 'clamav*'
Note, selecting clamav for regex 'clamav*'
Note, selecting clamav-freshclam for regex 'clamav*'
Note, selecting clamav-dbg for regex 'clamav*'
Note, selecting libclamav-dev for regex 'clamav*'
Note, selecting clamav-base for regex 'clamav*'
Note, selecting libclamav2 for regex 'clamav*'
Note, selecting sylpheed-claws-clamav for regex 'clamav*'
Note, selecting sylpheed-claws-gtk2-clamav for regex 'clamav*'
Note, selecting clamav-testfiles for regex 'clamav*'
Note, selecting clamav-data for regex 'clamav*'
Note, selecting clamav-getfiles for regex 'clamav*'
Note, selecting python2.4-clamav for regex 'clamav*'
Note, selecting python-clamav instead of python2.4-clamav
Note, selecting clamav-daemon for regex 'clamav*'
Note, selecting clamav-docs for regex 'clamav*'
Note, selecting python-clamav for regex 'clamav*'
Note, selecting clamav-milter for regex 'clamav*'
Note, selecting php4-clamavlib for regex 'clamav*'
The following packages will be REMOVED:
clamav clamav-base clamav-freshclam libclamav2 xandros-antivirus
0 upgraded, 0 newly installed, 5 to remove and 85 not upgraded.
Need to get 0B of archives.
After unpacking 14.3MB disk space will be freed.
Do you want to continue [Y/n]?
[Y/n] means default is "Yes"(Y), you have to press "n" (no) and then [Enter] to cancel. If you simply press [Enter], this means "Yes"(Y).

Later during the process, you will be asked to confirm shrinking the system partition [yes/NO]:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1 2371820 1363532 887804 63% /mnt

There is now 887804K available disk space in /dev/sda1
Please note that this free space cannot be used by the union filesystem
because /dev/sda1 is always mounted read only.

Do you want to shrink /dev/sda1 to 1558216K? [yes/NO]:
This time, "NO" is in capital letter, meaning default is "NO". If you enter anything other than "yes" or "YES", the script will abort resizing.

So if you answer NO to each prompt, you will end up with the original factory default EeePC Linux, as it has come with your EeePC.

Additional Notes

There are a few points to note during the process:

1) There will be some lines of errors while moving files between sda1 and sda2:
Moving /usr/lib/[b-l] ...
mv: unable to rename '/mnt/usr/lib/libevent.so.1': No such file or directory
mv: unable to rename '/mnt/usr/lib/libgcj_bc.so.1': No such file or directory
mv: unable to rename '/mnt/usr/lib/liblber.so.2': No such file or directory
mv: unable to rename '/mnt/usr/lib/libldap.so.2': No such file or directory
mv: unable to rename '/mnt/usr/lib/libldap_r.so.2': No such file or directory
mv: unable to rename '/mnt/usr/lib/libvolume_id.so': No such file or directory
But I have double-checked that these files (actually symbolic links) mentioned are intact after resizing. So don't worry.

2) With the minimal system, I have found a hissing sound from the speaker as reported many times by other EeeUser forum members (both Linux and winxp). This will not affect music playing, and will go off if you mute the speakers. Since this occur to both Linux and winxp, I am inclined to think it is hardware related (perhaps BIOS?). I have not looked into this yet.

3) The display will blank after 10 minutes of no activity from the keyboard. So it will blank while resizing the partition. Don't panic! Just press any key and display will come back.

4) To defragment the system partition, what I am doing is to copy files from sda1 to sda2 and back again. I break the files into groups of less than 400MB each. This is supposed to be the free disk space in a 2G Surf, so I guess this should be the mininum size of sda2 for different EeePC models.

5) The script will run an "extra.sh" script (in the folder "extra" of the System Recovery USB Disk). It will install "rescue mode" to your grub boot menu, and install your custom initramfs image (if any) and firstrunwizard.conf (to /usr/share/apps/firstrunwizard/) in case you have an recovery iso of a different language version than that you are using.

You will need to edit the "extra.sh" script and give the name of your custom initramfs image and put it in the folder "extra".

6) Theoretically, this restore script should also support restoring to the 2nd SSD (/dev/sdb), but this has not been tested since I don't have a 2nd SSD in my 4G.

7) Likewise, the original restore script will check and detect if the 2nd SSD is non-removable (i.e. not an USB disk) and format it as the HOME partition to be mounted in /home. But there is something missing here: the original script will not set the volume label of sdb1 to HOME if the partition already exist. So many people have reported losing the 16GB partition after USB restore if they have previously installed another Linux in sdb1. I have modified the script to cater for this. But again, since I don't have a 2nd SSD in my 4G, this is untested.

8) The script will save some log files to the folder "log" in the System Recovery USB Disk. This is mainly for debugging and to compare free disk space and fdisk output of partition structure before and after.

The most useful log file will be "removed.log". This log file contains a list of names and version no. of packages removed during this process. If you want to re-install the packages afterwards, this would help giving you the exact package names and version no. [See Part III: Re-installing Removed Packages to my minimal EeePC Linux 701 4G]

Conclusion

In the end, I got my EeePC Linux version 1.0 back again in my EeePC 4G, still with union filesystem, but most programs can now be upgraded without wasting excessive disk space as now they reside in the USER partition.

For the purpose of testing, I have re-installed all programs I have removed and come back to about the same free disk space as before. It is actually slightly less because of the upgrades.

If it is for real production use, I would probably skip some packages, for example, I won't need the Simplified Chinese locales, and probably also not the games and kids programs. Also, I never use Skype and pidgin ...

If you are more aggressive, there will probably be more packages you can remove provided that you are familiar with Linux system administration. The remove list I have included are all applications that has nothing to do with the base system, that I know has update available, and that their removal will not impair system operation. You can experiment with whatever you like, just make sure the system can still boot up, connect to network, automount USB device, and re-install packages. [Note: Although I have removed firefox, you can still connect to the Internet with the default File Manager. Just type the URL in the address bar as with any browser.]

What's Next?

In the coming few days, I will proceed to test this for different scenarios:
- with different remove lists
- find out the minimum extra disk space %
- test with other iso I have on hand including: 900, 1000H and 1.6 French iso

Hopefully, this script can run for all EeePC Linux versions and for all EeePC models, and be bug free. But for the remove files list, you will have to customize it for yourself. No two users will have the same likings for applications of his or her choice. So it is up to you to decide which packages you want to remove or retain for your EeePC.

Continue:
Part I: My 1st Trial
Part II: Success - Restoring my EeePC from USB to a Minimal System
Part III: Re-installing Removed Packages to my minimal EeePC Linux 701 4G
Part IV: 2nd Test restoring to minimal with a 1.6.1 701 en iso
Part V: Yet another test with 1.6 French iso
Conclusion: Restore from USB to minimal system

Monday, June 1, 2009

Restoring my EeePC from USB to a barebone system (Part I - My 1st Trial)

The Story - How it begins

Recently there have been discussion in the EeeUser Forum about a slimmed down version of EeePC Linux or a barebone system. Many people like the F9 restore feature, but want to get rid of some programs they never use.

I don't know how many people are interested in this, but after reading the posts, I am thinking it shouldn't be difficult based on the Boot Xandros from USB for Dummies approach I have been working on. I have seen lazyfai booting from USB and remove some installed programs with his early version of XEPC.org upgrade disc. The only tricky part is to resize the partition afterwards, but I have found a good tutorial on this: How To Resize ext3 Partitions without Losing Data.

Steps in my Original Plan

So after some moments of deep thinking, I think the steps we need to do are:
  1. Boot up from a modified Asus EeePC USB Recovery disk
  2. Seek volume label to mount the recovery disk in /xan
  3. dd the P701L.gz recovery disk image to the 1st SSD
  4. Do the remaining operations as per the original bootscript
  5. Mount /dev/sda1 in /mnt
  6. chroot to /mnt and run apt-get to remove programs you listed in some text files "remove*.list"
  7. Run df to obtain the current System, Used and Available disk size
  8. Calculate the required new size of sda1 + say 5% margin
  9. umount /dev/sda1
  10. Perform disk scan with e2fsck to eliminate any filesystem errors
  11. Shrink the filesystem of sda1 to the calculated required new size with resize2fs
  12. Run e2fsck again to check and eliminate any filesystem errors
  13. Run fdisk to shrink the partition to the new size (make it slightly larger)
  14. Run resize2fs again to expand the filesystem to the partition (adjust for any size difference)
  15. Run fdisk again to expand the USER partition to fill up the free space
  16. Format the USER partition again and set the volume label USER
  17. End of operation: Reboot
For a completely new system restored from USB, this shouldn't be too difficult. But for an old system, it would be very complicated considering the following requirements:
  • Need to let dpkg keep track of changes but dpkg database is spreading over sda1 and sda2
  • Beware of new software installations by the user that have upgraded some newer versions of system libraries now residing in sda2 instead of in sda1.
  • It is not possible to use resize2fs to move the starting disk cylinder of sda2. After you have shrinked sda1, there will be free disk space between sda1 and sda2.

My First Unsuccessful Trial

Last weekend, I proceed to test this out. The first part to remove programs with apt-get is successful. I ended up with 721 MB free disk space in sda1 (versus original 100 MB) after removing openoffice, acrobat reader, Chinese, all games and kids programs:
remove_acroread.list    168 MB *     Acrobat reader
remove_drivers.list 9589 kB Additional hardware drivers
remove_games.list 58.9 MB Programs in PLAY tab / GAMES folder
remove_kids.list 70.5 MB Programs in LEARN tab
remove_ooo.list 301 MB # @ openoffice.org
remove_scim.list 20.9 MB Chinese Input Method
remove_zh_cn.list 41.7 MB * @ Simplified Chinese locales
remove_zh_tw.list 92.6 MB * # Traditional Chinese locales

Remark: Some zh_tw and zh_cn packages have been duplicated in above remove lists
* : include acroread-cn-tw 51.8 MB
# : include openoffice.org-help-zh-tw 27.9 MB
@ : include openoffice.org-help-zh-cn 27.9 MB
The Used size as reported by df is now 1.5 GB (1513604 1K-blocks). I guess this is approaching the minimum size we can anticipate in sda1.

The Need to Defragment

Shrinking the partition however, out of my expectation, is not successful. It is not that it is not possible to shrink the partition with resize2fs, but I have overlooked the need to defragment the filesystem after deleting files belonging to the packages were removed. Although e2fsck is reporting only 0.5% non-contiguous, after resizing, e2fsck reported bad inode references.

Currently there is no available reliable tool in Linux for defragmenting ext2 partitions, because unlike FAT and NTFS, there is rarely the need to defragment Linux ext2/ext3 filesystem. So I am now scratching my head to think it all over again how to get this done. Probably we will need to move all the files to /dev/sda2 and move it back again so as to allow the Linux kernel to automatically defragment them during this process.

Alternative Methods I have done in the Past

Another alternative is to give up on this disk resizing and just install programs into the free disk space of sda1. I have done this a number of times before with slightly different approaches:

The first time, I boot up with no union filesystem (i.e. sda1 only) and upgrade programs from a local repositories based on xepc-upgrade-disc 20080525 . I have written the steps for how to set up a local repos and upgrade the system in this wiki: Upgrade factory OS with the xepc-upgrade-disc. The drawback of this method however, is that after the system boots up without union filesystem, it will write a lot of config and log files into /var, /home/user, etc. of sda1. These files won't be used again when you boot up normally with union filesystem, so just wasting disk space in sda1.

The second time, I tried to reproduce the same result, but working in rescue mode. The result of which is this wiki: Hacking in Rescue Mode. The operation is succesful. But one thing I didn't fully worked out is how to let dpkg keep track of the changes. I had to manually check, compare and copy files from the dpkg database in sda1 (/var/lib/dpkg) to sda2.

The third time, I tested upgrading with a read/write union filesystem as per this blog: Testing read/write union filesystem in my EeePC 4G. But again, this method has its own drawbacks.

So, now I come up with this idea to restore from USB to a barebone system which seems more sensible and more practical.

Continue:
Part II: Success - Restoring my EeePC from USB to a Minimal System
Part III: Re-installing Removed Packages to my minimal EeePC Linux 701 4G
Part IV: 2nd Test restoring to minimal with a 1.6.1 701 en iso
Part V: Yet another test with 1.6 French iso
Conclusion: Restore from USB to minimal system

Sunday, May 31, 2009

Play MIDI with fluidsynth in my EeePC

A few days ago, I read in the EeeUser Forum someone saying fluidsynth plays MIDI better than timidity on his EeePC. As I have reported in this thread, timidity is the way I used to play MIDI in my EeePC. Now that I have installed a fresh new 1.6.1 verson EeePC Linux to my 4G, I would like to try out something new. So I take this opportunity to test on installing fluidsynth to play MIDI.

Setting up Debian etch repositories

fluidsynth is available from the Debian repositories. So add this line (as root) to your /etc/apt/sources.list
deb http://ftp.debian.org/debian/ etch main non-free contrib
It seems that recently Debian mirrors have extended their PGP keys even to etch (oldstable) repositories, so if you don't want to see the system complain, you will need to install the PGP key as follows:
/home/user> gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B
gpg: directory `/home/user/.gnupg' created
gpg: can't open `/gnupg/options.skel': No such file or directory
gpg: keyring `/home/user/.gnupg/secring.gpg' created
gpg: keyring `/home/user/.gnupg/pubring.gpg' created
gpg: requesting key 55BE302B from hkp server wwwkeys.eu.pgp.net
gpg: /home/user/.gnupg/trustdb.gpg: trustdb created
gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key (5.0/lenny) " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
/home/user> gpg --armor --export 9AA38DCD55BE302B | sudo apt-key add -
OK

Installing fluidsynth

Then, you can update apt cache and proceed to install fluidsynth.
/home/user> sudo apt-get update
/home/user> sudo apt-get install fluidsynth
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
ladcca2 libfluidsynth1
The following NEW packages will be installed:
fluidsynth ladcca2 libfluidsynth1
0 upgraded, 3 newly installed, 0 to remove and 226 not upgraded.
Need to get 0B/215kB of archives.
After unpacking 606kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package ladcca2.
(Reading database ... 72482 files and directories currently installed.)
Unpacking ladcca2 (from .../ladcca2_0.4.0-6_i386.deb) ...
Selecting previously deselected package libfluidsynth1.
Unpacking libfluidsynth1 (from .../libfluidsynth1_1.0.7a-1_i386.deb) ...
Selecting previously deselected package fluidsynth.
Unpacking fluidsynth (from .../fluidsynth_1.0.7a-1_i386.deb) ...
Setting up ladcca2 (0.4.0-6) ...

Setting up libfluidsynth1 (1.0.7a-1) ...

Setting up fluidsynth (1.0.7a-1) ...

/home/user>
I have also tried installing qsynth, a GUI to fluidsynth, but it is not particularly interesting. So, I just work with fluidsynth on the command line.

Setting up fluidsynth to play MIDI

Before you can get fluidsynth to play MIDI files to alsa, you first need to load the alsa MIDI sequencer kernel module.
/home/user> sudo modprobe snd-seq-midi
A better idea is to add "snd-seq-midi" to your /etc/modules file so that the system will automatically load it at start up.
/home/user> sudo bash
asus-1624754341:/home/user> echo snd-seq-midi >> /etc/modules
Now you will need to download a sf2 soundfont for fluidsynth to play MIDI. After all, fluidsynth is just a soundfont player.

There are plenty of sf2 you can download from the web. The one I am using is 5MBGMGS.sf2 - not too heavy for the EeePC, but acceptable quality.

Now you are ready to play MIDI with fluidsynth. Of course, you will also need a MIDI file, and the one I use to test MIDI players is the beautiful As Time Goes By in piano.
/home/user> fluidsynth -ni 5MBGMGS.sf2 AsTimeGoesBy.mid

Setting up File Association in File Manager

To set up File Association in File Manager to play MIDIs with fluidsynth, you will have to create a kde desktop shortcut for fluidsynth:
home/user> sudo touch /usr/share/applications/fluidsynth.desktop
home/user> sudo kwrite /usr/share/applications/fluidsynth.desktop &
Paste the following content into the file:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=MIDI Player
GenericName=fluidsynth MIDI player front-end
Exec=fluidsynth -ni /home/user/5MBGMGS.sf2 %f
Comment=fluidsynth MIDI soundfont player front-end
Icon=amarok
MimeType=audio/x-midi
Terminal=false
Categories=Qt;KDE;AudioVideo;Player;
Then double-click on a MIDI file in File Manager, and select "Open with": /usr/share/applications/fluidsynth.desktop

Also, remember to check the box "Remember application association..." Then, clicking on a MIDI file will have fludisynth playing it in the background.

Comparing fluidsynth and timidity

But I found that, unlike timidity, playing MIDI with fluidsynth is often affected by running of other applications. Comparing the "top" output running the 2 programs reveal that fluidsynth is using about 80-100% CPU usage, whereas timidity only use 17% at max.


So, for my 4G, timidity is obviously the better choice.

Setting up qsynth

For those who would like to use qsynth as GUI interface to fluidsynth for easy setting of Reverbs, chorus effects, etc. Here is how to set it up:

From the "Audio" tab, select "alsa" as Audio Driver.

Load a sf2 soundfont file from the "Soundfonts" tab. Then click [OK].

This error is before I loaded the "snd-seq-midi" kernel module.

Wednesday, May 27, 2009

Restore EeePC from Recovery DVD without unionfs

A few weeks ago, there was a discussion in this thread of the EeeUser Forum on restoring an EeePC from the Recovery DVD image but without union filesystem. At that time, I had modified my Boot Xandros from USB for Dummies nounionfs script for this but I had no time to test it.

Today, since it is public holiday in Hong Kong and I don't need to work, I have finally tested this out and confirmed that this works on my 4G for both the 701 recovery image of my 4G and a 1.6 French iso I have downloaded. I suppose it should also work for all EeePC models.

What this script does:
1) Restore the Recovery DVD image to the 1st SSD (/dev/sda)
2) Copy a new initramfs image (for booting without unionfs) to /boot and modify the grub boot menu (/boot/menu.lst) accordingly
3) fdisk to create 3rd and 4th partition (sda3 and sda4) in /dev/sda (for BIOS update and Boot Booster)
4) Resize /dev/sda1 to fill up the remaining space in /dev/sda

Please note that unlike the default restore script, this script will not format the 2nd SSD (/dev/sdb). So if you have a 900 or later models with 2 SSD, with /home mounted in /dev/sdb1, your personal data will be untouched.


RESTORE STEPS:

1) Put your EeePC Recovery DVD into the DVDROM of your winxp desktop pc, run the Asus BootTool FreeOSTool.exe to create an Asus EeePC System Recovery USB disk as per instructions in your EeePC User Manual or as per this wiki: Howto: USB Restore or read my blog of 2009/6/3 for screenshots and detailed steps.

2) Download initramfs-eeepc-nounionfs-ext3.img compiled by eFfeM and save it to the root folder of the Recovery USB disk
3) Download restore-nounionfs.tgz and extract the files to the root folder of the Recovery USB disk [NB. Do not use winzip to extract the files]
4) Now plug this Recovery USB disk to your EeePC, reboot and press [ESC] at bootup to select the USB disk as 1st boot device
5) Then the script will run, and after user confirmation (Enter "yes"), restore the system to the 1st SSD without union filesystem


NOTE:

  1. If you want to use another initramfs image, say initramfs-eeepc-nounionfs.img for non-journalled ext2 filesystem, you can modify line 8 of the script restore-nounionfs.sh to reflect the change. If, however, you want to use an initramfs image for ext2 filesystem, you should also comment out line 110 of the script.
  2. The script should also allow you to restore to the 2nd SSD, just edit line 6 of restore-nounionfs.sh, but this is untested.

Change Language from French to English

The 1.6 French iso supports both French and US English. You can easily change the locale to English once you have started up. However, the firstrunwizard is in French. So you will need to learn a little French to go through the wizard:

Anglais = English (to select keyboard)
Retour = Back
Suivant = Next
Annuler = Cancel
Nom = Name
Terminer = End

You can forget all other settings (except "user name" and "password") because you will need to run the firstrunwizard again to completely change the system to English.

So after your system has started up. Run /opt/xandros/bin/locale_dialog either from File Manager or in a terminal.

Then select "Anglais (US)" from the pull-down menu, and press "Suivant" (Next).

In the next dialog box, select "Oui" (Yes) to apply the change.

Now the tabbed menu will be changed to English, but the programs menu are still in French. Next you need to delete the hidden file .firstrundone in /home/user. Then on reboot, everything will be in English except Acrobat pdf reader and the French dictionary which you will need to uninstall and install the English version after changing your /etc/apt/sources.list to:
deb http://update.eeepc.asus.com/1.6 common main
deb http://update.eeepc.asus.com/1.6 p701 main
deb http://update.eeepc.asus.com/1.6 en main
[Note: search for "-fr" in synaptic and uninstall them all. Then install "xlex" to get back the English Dictionary. For me, I also install all "-zh-tw" packages (except for firefox3) for Traditional Chinese locales.]