View Single Post
Old 02-22-2011, 07:40 PM   #1
carlb
Member
carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.carlb ought to be getting tired of karma fortunes by now.
 
Posts: 23
Karma: 200001
Join Date: Feb 2011
Device: BPDN, Kobo wifi
Lightbulb Upgrade path for internal microSD card on Kobo wi-fi?

NOTE: This description does not apply to the original Kobo, just the wifi version. It also presumes some prior knowledge of computer hardware and operating systems; the example commands are based on a Ubuntu system.

The stock wi-fi Kobo reader uses a 2GB microSD card as its internal memory, according to descriptions of the device on-line. A series of articles on http://soapyfrogs.blogspot.com/search/label/kobo explains disassembly of the unit (the front plastic frame is held by small plastic tabs at the edges which can be unlatched through judicious use of a dull knife and some patience; behind this is the main circuit board, attached to the back of the Kobo wi-fi reader with four very tiny crosspoint screws. Remove the board and the microSD is in a socket on the back lower left, near the battery slot.)

It would appear that 4/8/16GB microSDHC cards would be installable in place of the existing 2GB main flash card were the entire contents copied from the old card first. Unfortunately, this requires opening the device (which is not covered by warranty, the info is on "soapyfrogs" but seems to be at your own risk) and requires access to a Linux desktop PC with an SD/microSD card reader.

A 16GB microSD card with the adapter to fit a full-size SD card reader can be had for about $C30 (canadacomputers.com locally here) and Linux is at the point where it's basically being given away (the official version costs nothing, the pirated version - if you can find it - costs no more than half that). I'd expect a standard USB-compatible SD card reader to also be in the under-$20 range. The card itself just plugs into a socket on the circuit board.

The existing 2GB card contains two Linux partitions for the Kobo firmware and the "factory reset" image, plus one FAT32 partition which is visible to the user:

Quote:
Disk /dev/sdb: 1977 MB, 1977614336 bytes
31 heads, 61 sectors/track, 2042 cylinders
Units = cylinders of 1891 * 512 = 968192 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 5 283 263794+ 83 Linux
/dev/sdb2 284 839 525698 83 Linux
/dev/sdb3 840 2042 1137436+ b W95 FAT32
Linux provides two useful utilities for handling this card (or any disc drive). 'dd' can copy an entire disc - all partitions sector-by-sector - to or from one huge file, useful for copying the entire contents of the old card verbatim. GNU 'parted' can then resize the FAT32 partition to extend it to 100% of the remaining space on the new card. If anything goes wrong, the original 2GB microSD card serves as a backup of everything which was on the wifi Kobo.

Inserting the original 2GB microSD card (and adapter) into the Linux PC's SD card reader causes three partitions to automatically be located and (typically) auto-mounted. If the hard disc is /dev/sda, the card may (for example) appear on /dev/sdb* as the next available device.

Unmounting the automounted partitions and using 'dd' to copy the entire card (/dev/sdb in this example) yields several minutes of boredom ended by the creation of a 2GB file containing everything in one big, unwieldly package.

Quote:
# umount /dev/sdb1
# umount /dev/sdb2
# umount /dev/sdb3
# dd if=/dev/sdb of=koboimage
At this point, the original microSD card may be removed and tucked away in a safe place as a backup copy. Inserting a new, larger SDHC card into the PC reader should automount just one partition - an empty FAT32 which occupies the whole card is normally already pre-installed at the microSD card factory.

To overwrite the entire card with the stored Kobo wifi reader data, use:

Quote:
# umount /dev/sdb1
# dd if=koboimage of=/dev/sdb
If copying from an entire microSD card is slow, copying all the data back to the new card will be slower still... but it will finish eventually. You will need to force Linux to re-read the card's disk partition table before reading the card:

Quote:
# fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 16.0 GB, 15997075456 bytes
31 heads, 61 sectors/track, 16522 cylinders
Units = cylinders of 1891 * 512 = 968192 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 5 283 263794+ 83 Linux
/dev/sdb2 284 839 525698 83 Linux
/dev/sdb3 840 2042 1137436+ b W95 FAT32

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
#
At this point, the content of the two cards is identical. All that's left to do is re-size the FAT32 partition (the one which you will use to store your books) in order to use the full amount of space on the card.

Quote:
# umount /dev/sdb1
# umount /dev/sdb2
# umount /dev/sdb3

# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print
Model: Generic STORAGE DEVICE (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 3873kB 274MB 270MB primary ext2
2 274MB 812MB 538MB primary ext2
3 812MB 1977MB 1165MB primary fat32

(parted) resize 3 812MB 100%

(parted) print

Model: Generic STORAGE DEVICE (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 3873kB 274MB 270MB primary ext2
2 274MB 812MB 538MB primary ext2
3 812MB 16.0GB 15.2GB primary fat32

(parted) quit
#
At this point, the new microSD card may be removed from the computer and installed internally in the Kobo wi-fi reader.

The device may need a factory reset at this point - this will remove everything but the 100 pre-installed books - but the available memory should now be 14.1GB instead of 1GB with the device no more or less buggy than before.

Last edited by carlb; 02-24-2011 at 07:37 PM.
carlb is offline   Reply With Quote