Talk:UnionFS
Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly
It fails in my opinion the next boot time.
loop option must be set on squashfs too:
My fstab:
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump <pass> proc /proc proc defaults 0 0 # /dev/sda1 UUID=c890d3e0-7312-4acc-8366-2278428e54a5 / ext2 noatime,errors=remount-ro 0 1 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0 /root/usr.sqfs /usr squashfs loop,ro,defaults 0 0 unionfs /usr unionfs dirs=/root/usr.dynamic:/usr=ro 0 0
How to format in Mediawiki?
Andreas
With 2 spaces at the beginning of a line?
Thanks!
I've done the unionfs modification, but it`s end up with an unmounted usr tree after next reboot. Maybe because I`ve tried to boot from cdrom or boot in recovery mode? Can somebody paste the original fstab here? I am unsure if the loop option for squashfs is activated. I`ve repaired the system just by adding the loop option before ro and doing a mount -a command. Anyway I don't like ubuntu at all, it freezes my destop and the whole machine totally two times, this never happens to me with real linux distributions like debian and slackware since 10 years!
Thx!
This is the fstab from the preinstalled Ubuntu (Date. 2008-05-22 09:27):
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # /dev/sda1 UUID=c890d3e0-7312-4acc-8366-2278428e54a5 / ext2 noatime,errors=remount-ro 0 1 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0 /root/usr.sqfs /usr squashfs ro,defaults 0 0
--Florian 08:09, 4 June 2008 (UTC)
Danke Florian!
--User:Andreas 10:29, 4 June 2008 (UTC)
--Sven 09:16, 4 June 2008 (UTC)
Here are my working (!) modifications for that "UnionFS" Thing:
Startpoint: Stock Ubuntu 8.04 LTS how it is delivered from one.de at 2008-05-28
let's go:
do not
rm /etc/rc0.d/K99umountusr /etc/rcS.d/S35usr
but do
mkdir /root/usr.dynamic
modify the following files like theses:
/etc/fstab
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # /dev/sda1 UUID=c890d3e0-7312-4acc-8366-2278428e54a5 / ext2 noatime,errors=remount-ro 0 1 #/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0 /root/usr.sqfs /usr squashfs ro,defaults 0 0 unionfs /usr unionfs dirs=/root/usr.dynamic:/usr=ro 0 0
/etc/init.d/rc0.d/usr.sh
#!/bin/bash mount /root/usr.sqfs /usr -o loop,ro mount unionfs
/etc/init.d/rc0.d/uusr.sh
#!/bin/bash umount unionfs umount /root/usr.sqfs
Now reboot and you are done! UnionFS alives the reboot.
mount should give the following output now:
nutzer@nutzer-laptop:~$ mount /dev/sda1 on / type ext2 (rw,noatime,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) /sys on /sys type sysfs (rw,noexec,nosuid,nodev) varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755) varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777) udev on /dev type tmpfs (rw,mode=0755) devshm on /dev/shm type tmpfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) lrm on /lib/modules/2.6.24-16-generic/volatile type tmpfs (rw) unionfs on /usr type unionfs (rw,dirs=/root/usr.dynamic:/usr=ro) /root/usr.sqfs on /usr type squashfs (ro,loop=/dev/loop0) unionfs on /usr type unionfs (rw,dirs=/root/usr.dynamic:/usr=ro) securityfs on /sys/kernel/security type securityfs (rw) gvfs-fuse-daemon on /home/nutzer/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=nutzer) nutzer@nutzer-laptop:~$
Known issue: I think the previous working suspend2ram do'nt work. Any Idea why?
(Text written here on an A110 using Opera Webbrowser.)
/etc/rc0.d/K99umountusr and /etc/rcS.d/S35usr
What is /etc/rc0.d/K99umountusr and /etc/rcS.d/S35usr? Why should we remove them - or maybe, why not? --Florian 09:34, 4 June 2008 (UTC)
--Sven 09:55, 4 June 2008 (UTC) @Spitzohr, with these symbolic links the Init system executes the /etc/init.d/usr.sh at boot time and executes the /etc/ini.d/uusr.sh at shutdown. Removing them had on my mashine the negative effect, that the next boot was a desaster. Many errors and X11 came not up.
--Bernhard Münzer 10:30, 4 June 2008 (UTC) This /etc/init.d/usr.sh was an (unnecessary) hack to make sure that the squashed version of /usr would be mounted regardless of the contents of /etc/fstab - and unfortunately after evaluating /etc/fstab.
Thus, the read-only version of /usr would be mounted on top of unionfs, and so all changes made in unionfs would be hidden again.
--Sven 11:31, 4 June 2008 (UTC) @Bernhard: You are right. The unionfs ist mounted twice, as you can see in the output of mount above. But it works! Do not ask me why. For me it is a working solution, as long as I haven't the final version of Brunen-ITs Linux for the A110.
--Andreas 13:51, 4 June 2008 (UTC)
@Sven: Same happens to me (no X no mounted /usr), but with loop option in fstab it works! See the revised unionfs page.
--Sven 14:05, 4 June 2008 (UTC) @Andreas: Thanks, you are right, forget all I wrote above. By simply using the loop option in fstab for /root/usr.sqfs, the UnionFS works after reboot again. It also works after apply the rm /etc/rcX.0 command! Cool!
- -)
But the suspend2ram does not work too. (? I think to remember than an Ubuntu LiveCD supports s2ram)
Updates and UnionFS
I've installed UnionFS and installed some updates. But there was also Updates für OpenOffice.org. Now I had two installations of OpenOffice.org on my A110. One in the squashFS compressed file and one in the /root/usr.dynamic/ directory. So I often got the message "no space left...".
If I remove some preinstalled applications, would the also decrease the free space? (if the applications is in /usr directory and the unionfs must save the information, that the directory was deleted)
Maybe a warning could be helpful. --Florian 19:59, 4 June 2008 (UTC)
--Sven 20:42, 4 June 2008 (UTC) I think, you must unpack the sqashfs first, change it and pack it after that. http://squashfs.sourceforge.net/ (maybe the link helps)