Hello Davidfor,
I have my Kobo back and will try to run a complete check to find out where exactly the problem with updating the onboard database lies.
Initial test conditions
I will start by establishing that the initial database is ok before connecting to the PC.
Code:
kobo login: root
[root@kobo /]# cd /mnt/onboard/.kobo/
[root@kobo .kobo]# echo "pragma integrity_check;" | sqlite3 KoboReader.sqlite
ok
[root@kobo .kobo]#
Note: root@kobo is the telnet commandline prompt on the KT.
A backup of that database version is present on the KT.
Given that the original DB is ok, I updated my calibre to version 0.9.22. Driver setting are:
- KoboReader Driver is disabled.
- KoboTouch Driver:
- Read metadata from device.
- Use sub directories.
- Save_template = {author_sort}_-_{title}
- Tags for bookshelve management = #shelves, series
- Create bookshelves.
- Set series information.
The KT Firmware Version is 2.4.0, database version is 69.
PC Connection
I now connect the KT to the PC using the USB cable and mount the onboard FS. I will establish that the filesystem is ok...
Code:
Cassandra:/home/ichrispa/bin # fsck /dev/sdd
fsck from util-linux-ng 2.17.2
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
/dev/sdd: 6742 files, 127647/348630 clusters
...and that the databse is still intact.
Code:
Cassandra:/home/ichrispa/bin # echo "pragma integrity_check;" | sqlite3 /media/KOBOeReader/.kobo/KoboReader.sqlite
ok
Cassandra:/home/ichrispa/bin #
In the next step, I will unmount the device and startup calibre, which runs it's own device detection and should mount the KT.
Calibre correctly recognizes the device, mounts it and the driver scans the database. The contents of the main memory are shown correctly (no sd card is being used).
Rechecking the database still yields no database errors, everything is still ok.
Database manipulation
I will now copy a couple of ebooks to main memory. Specifically, I will copy the Song of Ice and Fire books by George R.R. Martin, as these have series information and shelves set. The books are in ebup format. I have reconverted them from epub to epub to make sure that they do not contain formatting errors. Metadata information is correctly displayed both by calibre as well as by the ebook-viewer and FBReader.
Sending the ebooks to main memory completes with no errors. Each book was send seperately, in contrast to selecting all books and then clicking "send to device".
Database integrity check is still ok.
Code:
Cassandra:/home/ichrispa/bin # echo "pragma integrity_check;" | sqlite3 /media/KOBOeReader/.kobo/KoboReader.sqlite
ok
Cassandra:/home/ichrispa/bin #
I eject the device using calibre's eject function.
The OS (Linux) confirms the FS has been unmounted:
Code:
Cassandra:/home/ichrispa/bin # mount | grep KOBO
Cassandra:/home/ichrispa/bin #
Unfortunately, calibre apparently terminates the USB device connection on a hardware level. /dev/sdd is still there, but it is not mountable or readable. lsusb also shows the device by ID, but is unable to retrieve any device information. There is no way to remount the device at this point in order to check the database, safe for resetting the USB, which will cause the KT to scan the DB.
Effects on device
Disconnecting the KT takes some time for scanning the new contents, then the device shows all uploaded covers on the home screen.
Series information is only set for the first book in the calibre list (Series book 5).
A shelve has been created, but only the first book of the series has been added to it.
Checking the onboard database yields...
Code:
[root@kobo .kobo]# echo "pragma integrity_check;" | sqlite3 KoboReader.sqlite
*** in database main ***
On tree page 1758 cell 1: Rowid 2782 out of order (min less than parent min of 2782)
rowid 1689 missing from index content_date_last_read_index
wrong # of entries in index content_mime_type
wrong # of entries in index content_bookid_index
wrong # of entries in index content_date_last_read_index
wrong # of entries in index content_title_index
wrong # of entries in index content_attribution_index
wrong # of entries in index sqlite_autoindex_content_1
For now, there are no errors when reading books or using the KT. However from experience I can tell that in several days, when using the KT regulary, the behavior will become more and more erratic.
Conclusion
The database is not corrupted from the calibre driver as such. The error is created when nickel scans the modified database after disconnecting the device.
If you need them, I can send you both the healthy initial db as well as the broken version via PM.
Thanks for your help davidfor,
regards,
ichrispa