If had read Eureka's post in time, I would have tried that. But I was already in troubles at that time. "Was" because now it works - well, almost.
What I did up to now
I kept the diags partition and just resized and moved mmcblk0p4.
Save the beginning of /dev/mmcblk0.
.. assuming that there is the partition table and other data I might have to reflash sometimes.
Spoiler:
Code:
dd if=/dev/mmcblk0 | nc myhost
I actually forgot to set the count option and just killed the pipe after a few seconds.
Unmount mmcblk0p4
Spoiler:
Code:
unmount /mnt/base-us
Trying to unmount /mnt/us failed with "device busy". Therefore I killed the fsp process.
Luckily it just died and did not restart.
Repartition
Using fdisk I moved the start of /dev/mmcblk0p4. Moving up the start instead of moving down the end is neccessary, as I want to resize /dev/mmcblk0p2 in order to keep partition numbering the same.
The new partition table:
After writing the partition table fdisk said:
"kernel still has old partition table. cannot fdisk /dev/mmcblk0p4".
True.
Code:
fdisk -l /dev/mmcblk0p4
still prints the original partition table.
Thus writing of that secondary partition table is not possible without reboot. As I doubted that the Kindle will come up with a damaged partition, I dd'ed the raw data of the beginning of the original partition to the start of the resized one.
THAT WAS A MISTAKE! Because the partition table has wrong size and the vfat file system ist damaged.
I rather should have created a new mmcblk0p4 with the new size at the PC. Formatting it there and even copying the original data to that system and dd|nc'ing it to the new Kindle partition.
After rebooting the Kindle hanged. dmesg on the PC printed some infos about new scssi device but did not mount it. Almost the same as I had the night before after restoring the old partition (see first post). But this time I was at least able to put the Kindle in bootloader mode and reboot it with imx_usb. But it hangs, regardless of main or diags booting. Leaving it, going to sleep.
This morning the Kindle is working again. After setting it in USB device mode the PC even mounted the damaged partition table. Of course with some error messages.
fdisk on the PC shows the original (now wrong) partition table.
So far...
I think I will try to format the partition from the PC. At least in diags mode it should do no harm.