View Single Post
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#21
Originally Posted by kingoddball View Post
Ok.. Maybe I am now up for this idea... Ignore my first post!
LETS DO IT!
Has anyone created a 2GB ext3 loop back?

(Taken and adapted from Meego)

Creating a loopback image from a tarball
Code:
Create 2GB image file 
dd if=/dev/zero of=/home/user/MyDocs/fedora-image bs=1024 count=2097152

Create filesystem on image file 
mkfs.ext3 /home/user/MyDocs/fedora-image

Create mount point and loopback mount the image 
export FEDORA_ROOT="/mnt/fedora_root"
mkdir $FEDORA_ROOT
mount -o loop /home/user/MyDocs/fedora-image $FEDORA_ROOT
Code:
apt-get install tar-gnu

gtar -tzf <fedora-image>

gtar -xzf <fedora-image> -C $FEDORA_ROOT

umount $FEDORA_ROOT
None of the above may actually work. It's just an idea, Qole would be the best for this....

But!! I want to help! FEDORA!
As close as I got. funny I still can't even get it chroot on my sd card. as noted below yum/rpm not working and after exit of chroot a df in maemo shows lots of "hanging" (looking for nonexistant?) mountpoints.

chroot fedora
remember to use gnu tools (ie gtar and gdd) not the busybox stuff
get bzip image
make a final destination folder (I made /.fedora)
make a loopable 2gb ext2 image file to do this do (in /home/user/MyDocs)

* gdd if=/dev/zero of=/home/user/MyDocs/fedora.img bs=1024 count=2097152
* mkfs.ext2 /home/user/MyDocs/fedora.img


now you have an empty 2G loopable ext2 file called fedora.img
mount the file (I made a directory called /mnt/fedmount). remember the process is mount the file as a loop device and copy the contents of the downloaded fedora file system directory to this. once unmounted you will have transferred the root file system to the /home/user/MyDocs/fedora.img file from the downloaded file using the /mnt/fedmount (or whatever) as your middleman.

* qmount /home/user/MyDocs/fedora.img /mnt/fedmount ----- please note this is qmount not mount

* cp /home/user/MyDocs/rootfs-f12.tar.bz2 /mnt/fedmount
* cd /mnt/fedmount
* gtar -xjf rootfs-f12.tar.bz2


now you cd into rootfs-f12 and copy everything there (cp -ar * ../) up one directory, then rm -rf both rootfs-f12 and rootfs-f12.tar.bz2 (you need to get rid of the tar file and the top level dir holding the file system).

* umount /mnt/fedmount (please not this is regular umount now qumount
* qchroot /home/user/MyDocs/fedora.img /.fedora


then you are chrooted in.
umount (or was it qumount?) leaves things hanging in df... (ie looking for mountpoints that are not there and the only way to clear the output is to reboot phone).