Eee PC Systems Division compression principle
April 15, 2008 - 10:02 pm The motive for the experiment:
1. Restore CD-ROM only about 800 MB of things, but to install on the Eee PC into a 2.3 GB, 4G is no room for the 60%.
2. Zoning system did not undergo any treatment, is directly put up the entire system, a bit of a waste.
3. Have seen a lot of Live CD will be used this way squashfs compressed file system, and a few GB of CD into the CD-ROM things, that the same principle should be able to use it on the Eee PC.
4. The first is the original district was the second district by "cover" the forward, since it will not amend, not better compression system?
It started out to restore the compressed CD, my approach is as follows (this action to be rich experience in Linux, do not imitate ~):
1. To restore the original CD-ROM P701L.img (or similar file) mounted up, first of all losetup-f P701L.img the image file to automatically set up a loop device useless, eg. / Dev/loop0
2. Kpartx-av / dev/loop0 inside to open the partition, because there are a partition, so there will be / dev/mapper/loop0p1 established
3. The district to mount a directory, for example, / mnt: mount / dev/mapper/loop0p1 / mnt
4. Because the original kernel does not support squashfs, so squashfs to find the driver, you can eeeuser.com to find, or find their own Eee PC kernel source code for release
5. Gunzip with cpio with the / mnt / boot / initramfs-eeepc.img untie, init script inside to make some corrections in the mounting / dev/sda1 to a temporary directory, and then mounted inside root.sfs To the real / mnt-system, and then chroot to chroot when root.sfs the mount point, for example:
mount-t ext2-o ro $ ROOT / mnt-system-stage
mount-t squashfs-o loop, ro / mnt-system-stage/root.sfs / mnt-system
6. Squashfs.ko to zlib_inflate.ko with all initramfs on the following list of modules, and loaded them in the init:
/ bin / insmod / modules / zlib_inflate.ko
/ bin / insmod / modules / squashfs.ko
7. Cpio spent with gzip to re-initramfs-eeepc.img wrap, method does not detail
8. Have confirmed that the installation of squashfs-tools, and then set up mksquashfs compressed file: mksquashfs / mnt / tmp / root.sfs
9. The establishment of a 1GB hard disk image file (dd), and then just like losetup, kpartx way to a partition of 1GB, and / mnt / boot and copy all into root.sfs
10. Replace / mnt / boot in the initramfs-eeepc.img
11. GRUB boot program written
12. All of the image file umount all out, kpartx-d / dev/loop0 with losetup-d / dev/loop0 to switch off the equipment loop
13. P701L.img the final exchange to restore the original CD-ROM, the success
Because such a step is complicated, so ... we have to do a good job, which will be released a few days. ![]()







26 Responses to "Eee PC Systems Division compression principle"
Thank you very much look forward to ah
By 02aaaa on Apr 16, 2008
Thank you for sharing, which will be the world a better place, and look forward to your initiative, Thanksgiving ah!
By ken on Apr 16, 2008
ISO file have been doing a good job, but also a test, there is now coordinating with ASUS to see how good conference.
By lazyfai on Apr 16, 2008
Thanks for looking forward
By eeeuser on Apr 18, 2008
Thank you for Fai, you are not lazy but a genius.
By wycy2 on Apr 23, 2008
Great info, just have to make sure I know how to do Step 5 and Step 7 for the cpio / gzip part.
By Michael on Apr 25, 2008
Assuming you copied the intiramfs-eeepc.img to / tmp.
Make a working directory and enter that directory, then ..
For extracting initramfs-eeepc.img:
zcat / tmp / initramfs-eeepc.img | cpio-i-dumv
For recompressing the extracted files:
find | cpio-o-Hnewc | gzip> / tmp / initramfs-eeepc.img
By lazyfai on Apr 25, 2008
Fai brother, I would like to ask xepc20080413.iso (905MB) and L701_TW_1.04.19XEPC.iso What's the difference between (961MB)? Whether eeepc interface to be installed in English xepc20080413.iso (905MB), Chinese interface mounted on L701_TW_1.04.19XEPC.iso ?
By wycy2 on Apr 25, 2008
Re: wycy2
xepc-20080413.iso upgrade is a CD-ROM, use only do the upgrade, that is, the original ASUS used to patch together with the OS upgrade, to tie in with the original reduction Asustek use the CD-ROM.
L701 that is a compressed version of the CD reduction, ASUS is here together with the original OS repair and upgrade the CD to restore, that is, instead of buying when the Eee PC with a copy of the CD-ROM.
If you want to have 1.5 G of available hard disk space, do not mind slow start 2-3 seconds, then use the back of the can.
By lazyfai on Apr 25, 2008
Is there a L701_EN_1.0.4.19XEPC.iso for English version with the SquashFS compression method?
By Michael on Apr 26, 2008
Also forgot to ask, does this version have 2GB RAM kernel support by default? Or do I still need to load the 2gb kernel onto / user manually?
By Michael on Apr 26, 2008
I went ahead with the upgrade and now have good and bad news.
Good News
I now have 2.6G out of 2.8G on my 4GB EeePC.
Bad News (depends how you define it)
1) I now have a Chinese OS interface, whereas I have English OS previously
2) My MMC-SD is not mounted by default, what do I have to do to fix / mount it?
3) Only 1GB RAM is recognized by default, will be nice if the default image has the 2GB RAM kernel support
4) Trying to create rescue mode fail, adding line (XANDROSBOOTDEBUG = y) gives "Error 27: Unrecognized command". So, how do I modify the 2GB RAM kernel, put it in / usr?
5) There was some error during bootup on the very top, but it only last 1 / 2 sec. Where can I find a log of that?
Now, if I can only get an English version (since my kids can't read the Chinese OSD interface)
By Michael on Apr 26, 2008
1. Language can be selected by running this command in terminal:
sudo / opt / xandros / bin / local_dialog
2. I dont have information about that yet ...
3. 2GB kernel is unofficial, will it be compatible to all of drivers shipped in Eee PC?
If so, it will be considered.
4. To change kernel, you can use any live CD to boot the Eee PC, and then copy that file (probably called vmlinuz or bzImage something like that) to the first partition, to / boot / directory.
5. That small warning is about DNS, it is safe to ignore that.
By lazyfai on Apr 26, 2008
Regarding the 2GB RAM kernel, I have been using this and no problem whatsoever so far:
http://www.eeewiki.org/howto:install2gigkernel
Will this to incorporate this into squashfs build this weekend.
I will re-test # 2 (regarding MMC-SD)
By Michael on Apr 27, 2008
Yes, I can now change the language interface.
My MMC-SD is now also recognized.
Only problem left is to make my 2GB kernel into the squashfs
When using the LiveCD, I press (tab) to modify the 'EEE PC'
I tried adding "XANDROSBOOTDEBUG = y" but I still cannot get to rescue console to modify the vmlinuz to become 2GB
By Michael on Apr 27, 2008
Re: Michael
Rescue mode is no need for changing the kernel alone.
Assuming you have downloaded the kernel in / home / user / first.
Then to change the kernel, the steps are:
1. Adding XANDROSBOOTDEBUG = y to default boot parameters as shown in wiki page
2. After booting up, you will see a "#" prompt
3. Mount / dev/sda1 / mnt-system
4. Mount / dev/sda2 / mnt-user
5. Copy the kernel from / mnt-user/home/user / to / mnt-system/boot /, cover the default kernel file.
6. Umount / mnt-system
7. Umount / mnt-user
8. Reboot the Eee PC.
By lazyfai on Apr 27, 2008
here is my problem, I cannot get into # prompt.
1) I run Easy Moode
2) Open terminal, modify / boot / grub / menu.lst
3) Add 'XANDROSBOOTDEBUG = y' to 2nd line in (Normal Boot)
4) Reboot
5) I don't get # prompt, it gives back Easy mode
I think I miss something really simple
The wiki says get into rescue mode, but you said it's no need.
Sorry to keep bothering you. . . .
By Michael on Apr 27, 2008
Update:
I can now modify the kernel (replacing it), but the system gives kernel panic and died. Ended up having to restore the whole system from CD.
Guess I will stick with just 1gb ram for now
By Michael on Apr 27, 2008
Re: Michael
Since so many people requested for 2GB kernel in XEPC, and I found that Eee PC 900 does come with 2GB memory support, I will try to merge it into XEPC recovery disc in next release, probably in 1-2 weeks.
By lazyfai on Apr 27, 2008
Re: LazyFai
Thank you so much. If you need a tester for it, just let me know.
By Michael on Apr 28, 2008
Dear lazyfai:
Would like to ask you a question Oh ~
You said that in the above-mentioned the use dd to make a disk and then cut out a partition, and then put pressure squashfs good and boot ...
This is a whole in a Virtual disk completed.
At this time because of the virtual disk should mount into a loop device
I have a way to grub will be loaded to the device to go above it?
I can make directly to the virtual disk can use dd to dump directly / dev/sda1
Able to boot
Thank you
By chris on Apr 30, 2008
Re: chris
Because grub can not be installed on the virtual disk above, so when we do these moves, the first real use of the hard disk, such as the USB disk to do, and then turned back into a dd image into it.
By lazyfai on Apr 30, 2008
Dear lazyfai:
I just do you untie the Recovery of which contain P701L inside the boot with the boot and you do squashfs, the files have to find is a clean usb drive, a Ge Cheng ext2 virtual filesystem size 1003MB, and then was easy pc the pressure of the whole region into a read-only read-only root.sys.
When the CD to restore the boot partition dump to put the entire / dev / sda, it will generate / dev/sda1, from 123 cynlinder place to split into sda2, sda3, sda4
I do not know if there is no description of the error Thank you.
By chris on May 1, 2008
Dear lazyfai:
This is the fdisk-ul P701L.img output
Disk P701L.img: 0 MB, 0 bytes
255 heads, 63 sectors / track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0 × 0001d8b9
Device Boot Start End Blocks Id System
P701L.img1 63 1959929 979933 + 83 Linux
And a partition / dev/sdc1
If I have to MBR, together with the output is used to sdc1
dd if = / dev / sdc of =. / P701L.img bs = 1959929 * 512
This could be it?
Thank you
By chris on May 1, 2008
Re: chris
This is probably step, but I bs = 32k, because the original version of the ASUS is using 32k, so should count = x, x = 1Gb/23kb.
There grub to use (hd0, 0) because if you start with usb, usb drive that is (hd0).
By lazyfai on May 1, 2008