You are not logged in.
The eeePC comes with lots of more or less useful applications. Removing those, which are not really needed can free up a lot of space.
For example I have removed all games, Open office, Thunderbird and a few more, and now only 1.5 Gbyte is used out of the 4 GB SSD. That leaves me plenty of space to install my own applications.
This tutorial will show how to do this.
In order to remove applications, one needs to eliminate the unionFS filesystem (otherwise the applications are not really removed, and no space is freed up when removing them).
Doing so requires two steps.
First a new initram file needs to be created (on the second - user - partition), then this file needs to be copied to the first partition. These two steps effectively eliminate the unionFS filesystem, and therefore give the user full control over the eeePC.
But before providing the details, please note, that I am just a newbie on the eeePC. All of this (or 99% of it) is from Kibobo ( see the thread here: http://forum.eeeuser.com/viewtopic.php?id=1891) Thank you Kibobo!
Ok. So first, lets create a new initram file.
The current file can be accessed in the boot folder:
1. Start the console
2. Sudo bash
3. cd /boot
4. create a new folder with any name you like within /boot ( for example: kibobo) by typing: mkdir kibobo
5. copy into the kibobo folder from the /boot folder the initramfs-eeepc.img file by typing: cp initramfs-eeepc.img /boot/kibobo
6. cd kibobo
7. gunzip < initramfs-eeepc.img | cpio -i
8. delete from the kibobo folder the initramfs-eeepc.img file
9. use the nano text editor to edit the init file ( the init file will be in the kibobo folder) -> type nano init
10. edit the file to have the following content:
Code:
#!/bin/sh
mount -t proc proc /proc
if [ -n "$XANDROSBOOTDEBUG" ]; then
/bin/busybox sh
set -x
fi
ROOT=`cat /proc/cmdline | sed 's/.*root=// ; s/ .*//'`
#VERSION=`cat /proc/version | cut -f3 -d" "`
mount -t ext2 -o rw,noatime $ROOT /mnt
if [ $? -ne 0 ] ; then
echo Could not mount OS on $ROOT. Starting debugging shell....
/bin/busybox sh
fi
#if [ -n "$XANDROSSCAN" ]; then
# exec switch_root /mnt-system /sbin/scanuser.sh
#fi
#if [ -n "$XANDROSRESTORE" ]; then
# exec switch_root /mnt-system /sbin/formatuser.sh
#fi
#if [ -z "`grep nosplash /proc/cmdline`" ]; then
# echo -n ""
# cp /mnt-system/boot/startup.fb /dev/fb/0
#fi
#if ! mount -t ext3 -o rw /dev/sda2 /mnt-user; then
# echo Error mounting user partition. Must run filesystem scan!
# exec switch_root /mnt-system /sbin/scanuser.sh
#fi
# Factory auto-format functionality
#if [ -f /mnt-user/.autoformat ]; then
# umount /mnt-user
# exec switch_root /mnt-system /sbin/formatuser.sh -- --auto
#fi
#insmod /mnt-system/lib/modules/$VERSION/kernel/fs/unionfs/unionfs.ko > /dev/null
#mount -t unionfs -o dirs=/mnt-user=rw:/mnt-system=ro unionfs /mnt
#if [ $? -ne 0 ]; then
# echo Could not mount unionfs. Starting debugging shell....
# /bin/busybox sh
#fi
#mount --move /mnt-system /mnt/mnt
#umount -l /mnt-user
umount /proc
if [ -n "$INIT" ]; then
if [ -n "$XANDROSBOOTDEBUG" ]; then
exec switch_root /mnt $INIT </mnt/dev/console >/mnt/dev/console
else
exec switch_root /mnt $INIT </mnt/dev/null >/mnt/dev/null
fi
else
exec switch_root /mnt /sbin/fastinit "$@" </mnt/dev/console >/mnt/dev/console
fi
echo
echo Init Failed. Starting emergency shell....
/bin/busybox sh
-----
Be very careful that you do all the changes exactly as explained.
Close nano and save the file ( ctrl - x, type Y, hit enter)
11. verify, that the changes were done correctly
12. cd /boot/kibobo
13. find | cpio -H newc -o | gzip -9 > ../kibobo.img
If you did all correctly, you should have the new boot image, which will disable unionfs. The file name is kibobo.img, and it is in the /boot folder.
Now it is time to move to step 2: copying the modified file to the first partition
1. Reboot your eeePC
2. During the boot press F9: the grub console should show
3. On the first item of the grub console press 'e'
4. On the second line of the window that pops up, press 'e' (the line starts with /kernel/boot/vmlinuz)
5. Go to the end of the line, and add to it " XANDROSBOOTDEBUG=y ".
6. Press enter
7. Press b to boot
You should now be on the rescue console
8. mount the two filesystems:
- mount /dev/sda1 /mnt-system
- mount /dev/sda2 /mnt-user
9. go to the new kibobo.image file: cd /mnt-user/boot
10. copy the file to the first partition cp kibobo.img /mnt-system/boot
11. just to be sure, check that the copy worked: cd /mnt-system/boot The kibobo.img file should be there
Reboot your eeePC ( with the power button - hold it for a long time)
1. Reboot your eeePC
2. During the boot press F9: the grub console should show
3. On the first item of the grub console press 'e'
4. On the third line of the window that pops up, press 'e' ( the line starts with initrd )
5. replace in the third line the initramfs-eeepc.img name with kibobo.img
6. press enter
7. press b
If you did everything right, your eeePC will now boot - and without the unionFS filesystem
We are nearly done, but not 100% yet.
You need to change the menu.lst file ( under /boot/grub ) so that it automatically boots the kibobo.img file next time.
Do this:
cd /boot/grub
nano menu.lst
In the first entry replace the initramfs-eeepc.img name with kibobo.img
Save the file ( ctrl-x, Y, enter)
Finally, you need to merge the two first partitions:
You need to boot now the eeePC from a liveCD or a USB stick ( try for example faunos - that is what I have used) (This is the only time Faunos has to be used - all other changes are done directly on the eeePC)
Using gparted, you can remove the second partition , and the first partition can be enlarged (do not change the small third and fourth partitions - they are needed for bios updates)
Now we are done. Shut down the eeePC and remove the liveCD or the Faunous stick.
Restart the eeePC and do the last step if you wish (this not required, but reduces the probability of a possible data loss down the road)
If you want, you can convert the ext2 filesystem to ext3 ( this is recommended) the following way:
1. tune2fs -j /dev/sda1 -> this will turn ext2 in ext3
3. tune2fs -c 0 -i 0 /dev/sda1 -> this will disable the otherwise scheduled file system checks
3. you MUST change your initramfs file too (as it expects by default ext 2)
See what we have done in the first step above. But start now with the kibobo.img file. The kibobo folder is probably still there, so you can copy kibobo.img to it, extract it (as above), and edit the init file:
Change the line:
mount -t ext2 -o rw $ROOT /mnt
to
mount -t ext3 -o rw $ROOT /mnt
Delete both kibobo.img files ( one in /boot the other in /boot/kibobo) and rebuild kibobo.img (as above)
And you are ready to roll!!!
Reboot your eeepc to see if all went well, and change and remove applications to your hearts content...
I hope that helps.
Any questions: just ask. I will try to answer, and if I cant, I am sure Kibobo can.
And dont worry: you dont risk anything. If you mess something up, you can always return to the factory setup using the DVD or a USB flashdisc ( I had to do this 4 times, before I figured everything out...)
Good luck - and power to the eeePC!!!
Last edited by Gadgetguy (2007-12-13 8:08:04 am)
Offline
Wow, I haven't actually tried it yet but thanks to all you chaps' hard work (Kibobo and Gadgetguy). This is what really makes the Linux - Open Source community so terrific: volunteering time and effort to make other's computing life better. Kudos!
Offline
Don't remove the third and fourth partitions, these are used by the BIOS update process.
Just merge the first one with the second.
Gadget, if you already have removed them, you can check this thread (chapter: Scores annexes (!?))
Size of the two partitions: 8MB
Type of sda3: c
Type of sda4: ef
Label of sda3: BIOS
Last edited by Kibobo (2007-12-03 8:12:13 am)
Offline
Thanks Kibobo - changed my initial post.
Offline
Thank you gentleman this post is very interesting. But it is quite daunting to the novice. As I read through it the obstacle that I keep encountering is that I do not know how to do some of the steps. Gadgetguy could you please add in some more detail to the steps to make it absolutely clear how to accomplish each step? For example in this section:
1. Start the console
2. Sudo bash
3. cd /boot
4. create a new folder with any name you like within /boot ( for example: kibobo)<---how is a new folder created?
5. copy into the kibobo folder from the /boot folder the initramfs-eeepc.img file<---how is this done?
6. cd kibobo
7. gunzip < initramfs-eeepc.img | cpio -i
8. delete from the kibobo folder the initramfs-eeepc.img file
9. use the nano text editor to edit the init file<---what is the init file?
10. edit the file to have the following content:
That was an example of some small details which I am sure are obvious to most that I simply do not understand. If you could please add more detailed directions to the whole guide it would be greatly appreciated. Thanks for this terrific post!
Offline
See answers posted in the initial message. I assumed some basic knowledge of linux (otherwise the tutorial could have been 15 pages long) - but I will add specific details if anyone asks here...
docprego: please tell me if you need any other details...
Last edited by Gadgetguy (2007-11-19 9:45:37 am)
Offline
gadget: share your initramfs image ![]()
Then, people just have to copy it to sda1, edit grub.conf, convert sda1 to ext3, copy sda2 files to sda1 and merge the partitions.
EDIT: you forgot the files copy (cp -rp /mnt-user/* /mnt-system/), be sure sda1 has enough space left.
Last edited by Kibobo (2007-11-19 9:54:50 am)
Offline
Kibobo wrote:
gadget: share your initramfs image
Then, people just have to copy it to sda1, edit grub.conf, convert sda1 to ext3, copy sda2 files to sda1 and merge the partitions.
EDIT: you forgot the files copy (cp -rp /mnt-user/* /mnt-system/), be sure sda1 has enough space left.
Actually: I found that discarding sda2 (and not copying it to sda1) also works (they system is fully functional when started on sda1 - and sda2 not even mounted). I think that sda2 contains primarily only updates - which I can get by doing apt-get upgrade on sda1, after its size has been increased. When I first copied over sda2 to sda1 I got dozens of error messages, all saying that cp cannot copy over, as the files already exists... Or am I wrong?
Otherwise there would be a couple of extra steps:
- one would need to install the files for the advanced desktop (to use synaptic for package removal)
- one would need to remove a bunch of applications to make room for the files from sda2
- one would need to copy sda2 to sda1 as indicated by you
I would need to post two initramfs images: one for ext2 and one for ext3. Any idea where I could post them? (And I would need to rebuild the ext2 version first, as I deleted it to have only the ext3 version). I will do this either today or tomorrow.
Last edited by Gadgetguy (2007-11-19 10:37:43 am)
Offline
Kibobo wrote:
Copying "sda2 to sda1" is only needed if you want to keep your modifications since your first boot (or restore).
I thought so. Thanks for confirming.
Offline
Are there any downsides to removing the unionfs filesystem and repacing it with ext2/3?
For instance will usb sticks and sd cards continue to automount as before? Will anything change?
I take it using gparted from a USB loaded distro like faunos is straightforward enough?
Thanks
Offline
redsolairs wrote:
Are there any downsides to removing the unionfs filesystem and repacing it with ext2/3?
For instance will usb sticks and sd cards continue to automount as before? Will anything change?
I take it using gparted from a USB loaded distro like faunos is straightforward enough?
Thanks
There are no downsides, everything works exactly the same. (as a side note unionFS sits on top of ext/2 ext/3)
I used gparted from faunos and it worked great. it is very easy to use.
Last edited by Gadgetguy (2007-11-19 8:56:15 pm)
Offline
There are no downsides, everything works exactly the same. (as a side note unionFS sits on top of ext/2 ext/3)
Well, there is the downside that you no longer have the benefit of system recovery using the F9 key system restore. Having /dev/sda1 as a restore partition was the reason Asus used the unionfs in the first place.
Offline
I really like this, but, I have a quick question before I get started. Before I get to that, I am a comp.tec from eons past with lots of Macintosh, DOS and Windoze experience (certified in all, plus a hardware tec specializing in laptops), but very little Linux experience ... and I can't figure out how to create a back-up of my triple-E's software before I make these changes. I need the drive-space to prepare to install software to work with my GPS.
I have an external drive hooked directly to my router that I can back-up to (known as \\storage ) ... but don't know how, and I don't see a "create backup image" icon on the desktop.
Thanks!
Offline
NaeKid wrote:
I really like this, but, I have a quick question before I get started. Before I get to that, I am a comp.tec from eons past with lots of Macintosh, DOS and Windoze experience (certified in all, plus a hardware tec specializing in laptops), but very little Linux experience ... and I can't figure out how to create a back-up of my triple-E's software before I make these changes. I need the drive-space to prepare to install software to work with my GPS.
I have an external drive hooked directly to my router that I can back-up to (known as \\storage ) ... but don't know how, and I don't see a "create backup image" icon on the desktop.
Thanks!
I am not a Linux expert, and I just start setting up a backup solution for myself.
However, it seems, that doing a full backup is very easy.
Use the following command (in the console ) to do a compressed backup of the SSD (all partitions) to another drive:
dd bs=10M if=/dev/sda | gzip - > /mnt/hdd/eeepc_ssd.image.gz
To restore, do this:
gunzip -c /mnt/hdd/eeepc_ssd.image.gz > /dev/sda
There are more details in this thread:
http://forum.eeeuser.com/viewtopic.php?id=1942
see post by crayonshinchan
Last edited by Gadgetguy (2007-11-20 11:10:47 am)
Offline
Thanks so much Gadgetguy, great work!
Couple of questions are left over for me.
I am with you all the way to editing menu.lst to change the grub menu, but after that:
1) what is the purpose of "merging the two first partitions"
2) can I boot from a standard ubuntu liveCD?
3) or how do I get a faunOS ready to boot from a usb? (any easy to follow links to download/instructions?)
4) will a standard ubuntu or faunOS automatically have "gparted" on it? are they self-explanatory to remove the 2nd and enlarge the 1st partition?
5) what does converting ext2 to ext 3 mean and what does it do?
6) why is it better?
thanks again! fantastic work by both you and Kibobo!
Offline
Kibobo wrote:
Don't remove the third and fourth partitions, they are used by the BIOS update process.
Just merge the first one with the second.
Gadget, if you already have removed them, you can check this thread (chapter: Scores annexes (!?))
Size of the two partitions: 8MB
Type of sda3: c
Type of sda4: ef
Label of sda3: BIOS
Not too sure if it is unsafe to remove these.
Actually downloaded the english manual earlier today.
There is a section in it on how to install XP, and one one the steps read: remove all partitions.
Offline
1) what is the purpose of "merging the two first partitions"
-> you dont need two partitions, just one, with more space. The system has two partitions for the unionFS only. Having one partition os more efficient for the eeePC
2) can I boot from a standard ubuntu liveCD?
-> yes you probably can. I never tried
3) or how do I get a faunOS ready to boot from a usb? (any easy to follow links to download/instructions?)
-> easy explanations on faunos website. If you need more details just ask here ( you need to download an .img file and use dd on the eeePC to copy it to a USB stick. Then you plug it in the eeePC and it works)
4) will a standard ubuntu or faunOS automatically have "gparted" on it? are they self-explanatory to remove the 2nd and enlarge the 1st partition?
Faunos - yes, and very easy to use. I am not familiar with ubunto
5) what does converting ext2 to ext 3 mean and what does it do?
6) why is it better?
-> it enables journaling, which is a good thing, as it reduces the risk of data loss if you were to lose power one day ( the second partition, which you can remove is by ext 3 for that reason. The first one is ext2, as in the default setup you never write to it. Since in the new setup you write to the first partition, ext3 is recommended)
Any more questions: just ask!
Last edited by Gadgetguy (2007-11-20 6:36:14 pm)
Offline
eFfeM wrote:
Kibobo wrote:
Don't remove the third and fourth partitions, they are used by the BIOS update process.
Just merge the first one with the second.
Gadget, if you already have removed them, you can check this thread (chapter: Scores annexes (!?))
Size of the two partitions: 8MB
Type of sda3: c
Type of sda4: ef
Label of sda3: BIOSNot too sure if it is unsafe to remove these.
Actually downloaded the english manual earlier today.
There is a section in it on how to install XP, and one one the steps read: remove all partitions.
You are right, I saw that too. I am not sure how you would update the bios under windows. Since these partitions are very small, I suggest you may just leave them...
Offline
so, I still hope for answers to my questions, but I have made my first attempt up to the point I understand
I am able to unpack, edit and repack the .img file as described
I can get into the grub menu and the safety console menu
I mounted both partitions and copied my file over to sda1
BUT, when I reboot and repoint the third line of the boot grub menu to sibobo.img it says something like error "file not found"
anyone know what I might have done wrong?
I absolutely verified that before reboot my file was in the proper /mnt-system/boot directory as described
Offline
darklord wrote:
so, I still hope for answers to my questions, but I have made my first attempt up to the point I understand
I am able to unpack, edit and repack the .img file as described
I can get into the grub menu and the safety console menu
I mounted both partitions and copied my file over to sda1
BUT, when I reboot and repoint the third line of the boot grub menu to sibobo.img it says something like error "file not found"
anyone know what I might have done wrong?
I absolutely verified that before reboot my file was in the proper /mnt-system/boot directory as described
I think you made everything ok so far. I would suggest you try to boot with faunos - and check if your file is really there (in /mnt-system/boot). Also check for spelling (is there maybe a space in it? Did you type kibobo or sibobo etc.). Also check, whether the grub change (to boot kibobo) has been accepted ( press enter - then press edit again to see)... Did you recheck (after restarting) if the kibobo.img file was there? Once I thought I copied it over - but after a restart it was not there...
Offline
eFfeM: the third partition is used by the bios update process, if you remove it you can't update BIOS with xandros (look at the biosupdate.pl script), I know what I say ![]()
You can also update the BIOS with an USB stick (without OS): http://forum.eeeuser.com/viewtopic.php?id=1304
Last edited by Kibobo (2007-11-21 2:24:49 am)
Offline
Kibobo wrote:
Gadgetguy: you can also add this
Code:
tune2fs -c 0 -i 0 /dev/sda1
Kibobo, thanks for the advice: I will do this.
I also added noatime (based on the other thread) to the initram file (in the first post) -> thanks! (I removed that thread...)
Last edited by Gadgetguy (2007-11-21 3:17:43 pm)
Offline