User talk:Tomj

= Repartioning n900 for directory Easy Debian on entirely on device=

Software I needed installed on the device: Kernel Power 52, CSSU-thumb, rootsh, a text editor (I like TxPad), Easy Debian (I use Estel's image assumed initially to be installed on MyDocs).

Unless otherwise specified, all commands is entered in maemo's terminal as root. When modifying, I tend to make 2 copies,   and  , edit   and, when I'm happy with it, copy it over. This may be overkill, but it makes me happy...

Prepare backup
 Put 32GB card without any data you care about into your device and unmount it, as root entering 

In debian chroot shell, type 

If you can't see the filetable, quit cfdisk, shrink the terminal font size using the volume keys and fire it up again

Use cfdisk to set up 2 partitions. I created a small one at the start of the available space to reserve the name mmcblk1p1, then a 5120MB one at the end, then deleted the one at the beginning and recreated it using all the remaining available space. Make sure you remember to write the new patritions, then quit cfdisk and unmount Easy Debian using the icon.

In maemo's xterm as root, format your partitions, then mount them mkfs.vfat /dev/mmcblk1/p1 mkfs.ext4 /dev/mmcblk1p2 mount /media/mmc1 mount /dev/mmcblk1p2 /mnt 

Mount the Easy Debian image file: 

Copy the Easy Debian image to a directory in the second partition on the SD: 

Unmount the Easy Debian image: </li>

Modify /home/user/.chroot, to make it point to new location, in the relevant position: IMGFILE=none CHROOT=/mnt/.debian </li>

Edit /sbin/closechroot changing the line if [ ! -f "$CHROOT/var/lock/qmount-complete" ] ; then to if [ "$IMGFILE" != "none" ] && [ ! -f "$CHROOT/var/lock/qmount-complete" ] ; then </li>

Check whether Easy Debian works, then unmount it with the icon.</li>

If you want, delete the Easy Debian image file: </li>

Backup MyDocs to mmc1: </li>

Unmount MyDocs: </li>

Backup /home to the second partition on the SD: </li> </ol>

Repartition time
I took the gist of this from Repartitioning_the_flash, but at some point CSSU in the thumb and/or testing branches changed it's startup and no longer uses /usr/lib/genfstab.awk. This is based on the latest thumb CSSU, so if you are using a setup from before this change, things may be different.

<ol> Create a file /etc/default/mount-opts-overwrite containing the line </li>

Edit /etc/fstab/, changing the line /dev/mmcblk0p2 /home ext3 defaults 0 2 to /dev/mmcblk0p2 /home ext4 defaults 0 0 </li>

 If you've done something wrong, this is where it all comes tumbling down with an infinite reboot loop.</li>

Assuming you've booted successfully, you may as well unmount MyDocs; I'm not sure if it's necessary, but why not? </li>

Get Easy Debian pointing in the right direction by editing /home/user/.chroot to change the line  to  </li>

In Easy Debian chroot shell, type </li>

There is some unformatted memory at the start of the eMMC; I don't know if it's important, but to preserve it, I started by making a new partiton of it, to be deleted before writing the new setup. I then set up a 25923.23MB  setting type to 0C (FAT32 (LBA)) for MyDocs and a 5219.49MB   for home. I then deleted the  I'd set up to protect the unformatted space at the start and select Write to repartition the eMMC. You may, of course, chose partition sizes to suit yourself When done, unmount with the Close Debian icon.</li>

Part of my aim was to have home as ext4, so back in the maemo root shell: </li> </ol>

Restoring the system to eMMC
<ol> Mount what is going to be home in the long term: </li>

<li>Restore your home backup: </li>

<li>Unmount home to be and mount MyDocs to be umount /mnt mount /dev/mmcblk0p1 /mnt </li>

<li>Restore MyDocs: </li>

<li>If, like me, you've gone for an ext4 home, edit line 98 of /etc/event.d/rcS-late, changing  to  </li> <li>Delete the file stopping maemo for looking for eMMC partitions: </li> <li>Cross your fingers and </li> </ol>