View Single Post
Posts: 224 | Thanked: 132 times | Joined on Jun 2012 @ Cairo ;Egypt
#18
Originally Posted by elros34 View Post
I have my own debian armhf on ext4 partition so this is not the point, check this.
You are right

HTML Code:
ext3 to ext4 (or anything else)

A word of warning. The version of e2fsprogs in Maemo is ancient, and xfs-tools seems to be non-existent, so if you use ext4 or xfs, you will lose the ability to fsck the image on the device itself. This is fine if you have (and are happy to use) a Linux PC; if not then you may want to stick to ext2/ext3.

Migrating from ext3 to ext4 has no impact on existing files that were written under ext3, only on newly written files. Therefore, to achieve the expected benefit from a migration to ext4, you'll need to create a fresh image of the desired size, format it and copy the contents of your old image onto your new one. You'll probably want to do this over USB from a Linux PC rather than from the device itself, both for speed reasons and (probably) for newer versions of the applicable filesystem tools.

First, create a file of the desired size, either with dd or by simply making a copy of the image file that you intend to clone.

cp <image-name>.img.ext3 <image-name>.img.ext4

Now format the new image file with the desired file system. We'll use ext4 here, but this should work for any filesystem that is supported by kernel-power.

mkfs.ext4 /path/to/mounted/n900/<image-name>.img.ext4

You might want to consider the "-T small" option to mkfs, which will yield a smaller block size (1KB) and more inodes, otherwise you'll be limited to 262,144 files in 1,048,575 blocks, also, at your option "-m 0" to set the reserved blocks count to zero (do not keep 5% back for the superuser). Once that's done, we need to mount both images, and clone the old one to the new one:

mkdir /mnt/old
mkdir /mnt/new
mount -t ext3 -o loop /path/to/mounted/n900/<image-name>.img.ext3 /mnt/old
mount -t ext4 -o loop /path/to/mounted/n900/<image-name>.img.ext4 /mnt/new
cp -a /mnt/old/* /mnt/new/
umount /mnt/new
umount /mnt/old

It does no harm at this point to run a filesystem check on the newly created image. You'll also need to make sure that the image is either configured in .chroot or is the first such image in the directory in order for the Easy Debian chroot scripts to pick it up.
 

The Following User Says Thank You to amr.fayz For This Useful Post: