View Single Post
Old 10-07-2023, 01:44 PM   #137
Better_Boy
Junior Member
Better_Boy began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2023
Device: Pocketbook
I've followed instructions here
Thats what I've needed to do to get Pocketbook working and resize partition

Reading the CID of a new card
01. Read Pocketbook serial number in Settings -> About Device -> Device Model -> Serial number: YT...
02. Reading the CID number from the new SD card:
- Connecting the SD card to an Android phone with root
- In the terminal:
- adb root
- adb shell
- cat /sys/block/mmcblk1/device/serial
- Write down the extracted CID number of the new SD card

Alternative:
- Install Raspberry Pi OS - can be a Lite version. In the settings before installing to the card, enable SSH, set username and password. Enter the wifi network SSID and password.
- After connecting via ssh, execute the command:
- cat /sys/block/mmcblk0/device/serial
- Write down the extracted CID number of the new SD card


Preparing a new card
01. Backup the original SD card with the Pocketbook image with the USB Image Tool
02. Restore the SD card from the image to the new card. It can be of larger size.
03. Unzip progs.7z
04. Go to the Linux directory and execute the make command in the terminal
05. Go to the serial directory and execute the command in the terminal:
./serial --serial_number NUMBER_SERIAL_POCKETBOOK --sd_serial NEW_NUMBER_CID_CARD
A .freezestatus file should be created

Alternatively, it can be under Windows. In the win32/x64 directory run the command:
./serial.exe --serial_number NUMBER_SERIAL_POCKETBOOK --sd_serial NEW_NUMBER_CID_CARD

06. Upload the created file to Linux (ex.: scp .freezestatus pi@192.168.214.214:/home/pi)
07. Connect the new card to the Linux system
08. Execute the commands in the terminal as root:
- su // login as root
- mkdir /mnt/sd9
- fdisk -l // list the disks
Check what device name sd card has (ex. /dev/sdb)
- mount /dev/sdb9 /mnt/sd9 // mount partition number 9
- cd /home/pi
- cp .freezestatus /mnt/sd9/.freezestatus
- umount /dev/sdb9

Partition expansion if card is larger than original:
Tutorial on yt
Run the commands in terminal:
01. List drives: fdisk -l
Check what device name sd card has (ex. /dev/sdb)
02. fdisk /dev/sdb
03. p // list partitions
We check the list of partitions. Partition 1 in my case had 3.2GB - this partition we want to expand.
In my case there was also a problem with overlapping partitions. Partition sdb3 ended and partition sdb1 started at location 1009664.
04. d // delete partition
1 // number 1
05. n // create partition
p // primary
1 // numbered 1
1009665 // with a start block like the original partition number 1 (in my case one larger by overlapping)
Press "enter"
06. t // change partition type
1 // with partition number 1
0b // to W95 FAT32
06. w // save changes
Messages may pop up:
Failed to remove partition 1 from system: Device or resource busy
Failed to add partition 1 to system: Device or resources busy
Just ignore them.
07. After inserting the card into the Pocketbook, a message pops up to format the card. We perform the formatting.
08. We copy the contents of the old card to the newly formatted partition. By copying the hidden system folder, we will also move the book progress and other settings.
Better_Boy is offline   Reply With Quote