Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.rst | 2022-08-12 | 5.5 kB | |
part2.tar.xz | 2016-06-15 | 129.9 MB | |
bootloader-Mini.img.xz | 2016-06-15 | 4.5 MB | |
bootloader-Glo.img.xz | 2016-06-15 | 2.3 MB | |
Totals: 4 Items | 136.7 MB | 0 |
This is how to create a plain (factory-reset) SD-card to be used in older Kobo-Mini/Glo devices from scratch.
Be aware that the device-id and information about built-in hardware is stored inside the bootloader. By following this procedure you will basically clone one of my personal devices. This will work only if we have truly the same hardware (mainboard revision, chipset etc) ! You will loose the serial number of your device (will be replaced with serial number of my device).
To execute this procedure you will need a Linux-PC, root permissions on it, a empty micro SD-card and a USB card-reader for it.
Prerequisites
- Linux-PC
- SDcard-Reader
- Class-4 SD-card (Class-10 cards may not work)
Steps
Download the part2.tar.xz archive and the appropriate bootloader image.
open a terminal and gain root access, change into the directory where you saved the downloaded files.
sudo bash
put the SD card into the card-reader and connect it to the PC
find out which drive letter was assigned to it (in my example it is sdg)
dmesg
repartition the SD card to create 3 partitions, first partition must start after 10MB and must be at least 250MB large (you may increase the size for the first partition but larger than 512MB is really not neccessary), second partition must be at least 250MB large, assign the rest of the card space to the third partition. Assign partition type b to the third partition. (please consult the manual page how to operate the fdisk program).
fdisk /dev/sdg
it should now look similar to this, in the example the first partition starts at sixth unit, one unit is approximately 2MB so there are 5*2MB = 10MB free space before the first partition starts.
Disk /dev/sdg: 1977 MB, 1977614336 bytes
61 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 3782 * 512 = 1936384 bytes
Device Boot Start End Blocks Id System /dev/sdg1 6 144 262144+ 83 Linux /dev/sdg2 144 283 262144+ 83 Linux /dev/sdg3 283 1013 1380864+ b W95 FAT32 uncompress and copy the bootloader to the SD card (in my example for the Mini)
xz -d bootloader-Mini.img.xz
dd if=bootloader-Mini.img of=/dev/sdg bs=512 seek=1 skip=1
format the first and second partition with the ext4-filesystem
mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit /dev/sdg1
tune2fs -o ^user_xattr,^acl /dev/sdg1
mkfs.ext4 -L rescuefs -O ^metadata_csum,^64bit /dev/sdg2
tune2fs -o ^user_xattr,^acl /dev/sdg2
format the third partition with vfat-filesystem
mkdosfs -f 2 -F 32 -R 6 -h 0 -n KoboEReader -s 8 /dev/sdg3
create mount-points and mount the first and second partition to it
mkdir /mnt/1 /mnt/2
mount -o noatime /dev/sdg1 /mnt/1
mount -o noatime /dev/sdg2 /mnt/2
expand the downloaded archive to the second partition
xz -cd part2.tar.xz | tar -C /mnt/2 -xvf -
expand the root-filesystem to the first partition
tar -xvzf /mnt/2/upgrade/fs.tgz -C /mnt/1
mount the third partition
mount -o noatime /dev/sdg3 /mnt/1/mnt/onboard
expand the data filesystem to the third partition
tar -xvzf /mnt/2/upgrade/db.tgz -C /mnt/1/mnt/onboard
un-mount everything
umount /dev/sdg3
umount /dev/sdg2
umount /dev/sdg1
sync
disconnect the USB card-reader, remove the card
insert the SD card into the Kobo, the Kobo need to be switched off before (all LEDs off, backlight off)
switch the Kobo on, LED should be lit blue, then green flashing, then off
you are ready to install E-Books or any other software to it now
How to obtain original serial number and mainboard revision
put the original SD card into the card-reader and type
dd if=/dev/sdg bs=512 of=myBootloader.img count=20480
to restore see item 7. obove
How to clone a complete SD-card (only with identical cards)
Creating a card from scratch as described above may be faster since not all data has to be written to the card. The following procedure describes a way to create a truly 1:1 copy
put the original card into the card-reader and type
dd if=/dev/sdg bs=1k of=whole-card.img
put the backup card into the card-reader and type
dd if=whole-card.img bs=1k of=/dev/sdg