Hack-A-N900/Unionfs
aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Version vom 17. April 2010, 02:29 Uhr von Amir (Diskussion | Beiträge) (Die Seite wurde neu angelegt: <b>EXPERIMENTAL:</b> You need to read and understand the chroot-unionfs.sh script. === Update Kernel === Add tesing repositories to /etc/apt/sources.list: deb http...)
EXPERIMENTAL: You need to read and understand the chroot-unionfs.sh script.
Update Kernel
Add tesing repositories to /etc/apt/sources.list:
deb http://repository.maemo.org/extras/ fremantle free deb-src http://repository.maemo.org/extras/ fremantle free deb http://repository.maemo.org/extras-testing/ fremantle free deb-src http://repository.maemo.org/extras-testing/ fremantle free
apt-get update
apt-get install kernel-flasher-maemo kernel-modules-maemo
cross your thumbs now.. (you backed up before right?)
reboot
WELCOME TO YOUR UPDATED SYSTEM THAT SUPPORTS UNIONFS \o/!
Create unionfs / chroot overlay filesystem for development
Create a 2 GB file on /home/user/MyDocs/sandbox/fs.img
mkdir /home/user/MyDocs/sandbox/ cd /home/user/MyDocs/sandbox/ dd if=/dev/zero of=fs.img bs=1M count=1 seek=2048 mkfs.ext2 fs.img
Get the shiny overlay/chroot shellscript
wget http://metalab.at/wiki/images/d/d8/Chroot-unionfs.sh WARNING the link might be different now look here: Datei:Chroot-unionfs.sh mv chroot-unionfs.sh /sbin/chroot-unionfs chmod +x /sbin/chroot-unionfs
This script doeas some magic including
- loading the dm-loop kernel module (for /dev/loop? devices)
- overlaying the unionfs filesystem
- mounting all needed filesystem folders inside the unionfs
- chroot()'ing inside
It is started like this:
bash /sbin/chroot-unionfs -v -t /home/user/MyDocs/sandbox/fs.img
Read the source to find out about command line parameters like -t for testing and others..
If this script is successful you should find yourself in a chrooted environment inside the unionfs
touch /CHROOTED ls /CHROOTED # it should be here! exit ls /CHROOTED # it should be gone!