PRST1 Repartitioning Guide

From MobileRead
Jump to: navigation, search

This guide is intended for those comfortable with the (Linux) command-line who are not afraid of manual partitioning. To all others it is recommended to use the Windows based procedure found here or original Russian here.

Following this guide to the letter should yield a reader with a 99.6M system partition and a 460M /data partition, without requiring proprietary software.

A blog post with detailed Putty Log file that can be followed to the letter can be seen here

It is further recommended to study the entire article before starting to make sure you understand what is going on. If in doubt, see above alternatives! Don't rush things, and follow the instructions precisely, checking your results as you go.

Forum links:

1. Backup important files in READER drive.

and then, recommend 'Factory Reset' first

2. Copy the file 'update.img' (from the link below) to the OS Firmware/files folder in the EXTERNAL! SD card. You may need to create these folders first. 

Source(img file created by figonet): http://dl.dropbox.com/u/54414959/update.img

3. Make T1 enter 'UPDATE mode' and connect to PC via USB:

Press HOME+MENU, turn on & keep pressing until progress bar reaches the far right.

4. Windows should ask 'Gadget Serial' driver. Driver is located under serial_driver OR inside various rooting packages. Linux users can use minicom and start it with minicom -s. 
If your T1 is successfully connected, the power LED should be red.

5. Find which COM port is assigned to 'Gadget Serial' in Device Manager. Linux users set the serial port to whatever device dmesg tells you is the e-readers serial port (ttyACM0).

6. connect using serial console. (9600 baud). You should meet login prompt.

'putty' would be the proper tool for Windows users.

7. login 'root' without password

8. check if SD card is mounted at /initrd/mnt/sd correctly and remount it in writable mode. IMPORTANT Note: if the sdcard is NOT mounted you must check that your device booted off the recovery image you provided earlier and not from a rooted system! If that is the case, issue a reboot to the reader and fix your recovery console (see step 2).

# df

/dev/mmcblk0p1 ==> /initrd/mnt/sd

# mount -o remount,rw /dev/mmcblk0p1 /initrd/mnt/sd

9. backup /dev/mmcblk2p[5-10] to SD card

# for i in 5 6 7 8 9 10

do 

dd if=/dev/mmcblk2p$i of=/initrd/mnt/sd/mmcblk2p$i.img

done

10. Delete mmcblk2p[3-10] partitions & reassign them

# fdisk /dev/mmcblk2

(fdisk) p

Device Boot Start End Blocks Id System

/dev/mmcblk2p1 801 1120 10240 83 Linux

/dev/mmcblk2p2 1121 1440 10240 83 Linux

/dev/mmcblk2p3 1441 13542 387264 5 Extended

/dev/mmcblk2p4 13543 59776 1479488 83 Linux

/dev/mmcblk2p5 1441 1953 16408 83 Linux

/dev/mmcblk2p6 1954 6306 139288 83 Linux

/dev/mmcblk2p7 6307 6627 10264 83 Linux

/dev/mmcblk2p8 6628 7908 40984 83 Linux

/dev/mmcblk2p9 7909 9445 49176 83 Linux

/dev/mmcblk2p10 9446 13542 131096 83 Linux

TIP: Before proceeding it may be a good idea to check your numbers against the above. if you find differences you don't understand then: Ask first, brick later ;-)

(fdisk) d

Partition number: 4

(fdisk) d

Partition number: 3

(fdisk) n

e (extended partition)

Partition number: 3

First cylinder: 1441

Last cylinder: 28526

(fdisk) n

p (primary partition)

First cylinder: 28527

Last cylinder: 59776

(fdisk) n

First cylinder: 1441

Last cylinder: 2453

(fdisk) n

First cylinder: 2454

Last cylinder: 6806

(fdisk) n

First cylinder: 6807

Last cylinder: 7127

(fdisk) n

First cylinder: 7128

Last cylinder: 8408

(fdisk) n

First cylinder: 8409

Last cylinder: 23619

(fdisk) n

First cylinder: 23620

Last cylinder: 28526

(fdisk) w

# fdisk -l /dev/mmcblk2

Device Boot Start End Blocks Id System

/dev/mmcblk2p1 801 1120 10240 83 Linux

/dev/mmcblk2p2 1121 1440 10240 83 Linux

/dev/mmcblk2p3 1441 28526 866752 5 Extended

/dev/mmcblk2p4 28527 59776 1000000 83 Linux

/dev/mmcblk2p5 1441 2453 32408 83 Linux

/dev/mmcblk2p6 2454 6806 139288 83 Linux

/dev/mmcblk2p7 6807 7127 10264 83 Linux

/dev/mmcblk2p8 7128 8408 40984 83 Linux

/dev/mmcblk2p9 8409 23619 486744 83 Linux

/dev/mmcblk2p10 23620 28526 157016 83 Linux

TIP: If your numbers at this point are unintentionally different from the above then re-do step 10 until they match!

11. REBOOT

# sync; sync; sync

# reboot

Be ready now and remember to hold the home and menu buttons until the bar reaches the far right! At this point attempting to boot from the device will fail, you need to boot the recovery image to complete the procedure.

12. (optional) Backup mmcblk*.img in SD card to safe place

13. Enter 'UPDATE mode' & login using serial console again

14. format /dev/mmcblk2p4 in FAT32

# /sbin/mkdosfs -n READER -F 32 /dev/mmcblk2p4

15. restore /dev/mmcblk2p[5-10] except mmcblk2p9

# for i in 5 6 7 8 10

do 

dd if=/initrd/mnt/sd/mmcblk2p$i.img of=/dev/mmcblk2p$i

done

16. format /dev/mmcblk2p9 in ext4 & set volume label

# /sbin/mkfs.ext4 /dev/mmcblk2p9

# /sbin/tune2fs -L data /dev/mmcblk2p9

17. mount /dev/mmcblk2p9 in a temporary path (ex: /tmp/p1)

# mkdir /tmp/p1

# mount /dev/mmcblk2p9 /tmp/p1

18. mount /initrd/mnt/sd/mmcblk2p9.img in a temporary path (ex: /tmp/p2)

# mkdir /tmp/p2

# mount -o remount,rw /dev/mmcblk0p1 /initrd/mnt/sd

# mount -o loop /initrd/mnt/sd/mmcblk2p9.img /tmp/p2

19. copy all files from your backup image to the real partition

# cd /tmp/p2

# busybox cp -a * /tmp/p1

20. Unmount all

# cd; sync; sync

# umount /tmp/p1

# umount /tmp/p2

21. change to Normal mode

# chgboot normal

22. REBOOT

# sync; sync; sync

# reboot

23. If everything is perfect, delete 'OS Firmware' directory in SD card & do Rooting (if you in fact did a factory reset beforehand)
Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox