Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-31-2013, 09:07 AM   #1
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 895
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Creating a dedicated library partition for koreader.

This post reports the commands I've used for creating a library on a independent partition. This is only relevant for the use of koreader, since Kobo's Nickel won't see it. It assumes you modified your internal microSD to a larger size, for example 32GB. It also would make Syskin's thread for a faster filesystem more relevant. In principle you could move koreader to the ext2 partition to increase speed.

Pros: When Aura restores, I do not lose the library!
Cons: You will need to mount the partition and have usbnet started, before you can copy files to it with for example WinSCP.

1.Enable telnet via usb with 1-step-hack.
2.Telnet into the Aura with putty, login as "root".
3.[root@(none) ~]# fdisk /dev/mmcblk0
a. Command (m for help): m
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
b. Command (m for help): p
Disk /dev/mmcblk0: 32.3 GB, 32311869440 bytes
4 heads, 16 sectors/track, 986080 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 305 8497 262144+ 83 Linux
Partition 1 does not end on cylinder boundary
/dev/mmcblk0p2 8497 16689 262144+ 83 Linux
Partition 2 does not end on cylinder boundary
/dev/mmcblk0p3 16689 138759 3906271 83 Linux
/dev/mmcblk0p4 138760 986080 27114272 83 Linux
c. To get here I
I. deleted partition 3,
II. created a new partition 3 with starting cylinder 16689 and size +4000M and
III. created a new partition (4) with starting cyclinder 138760 and default to maximum size.

At this point you have to reboot and hold the light button to do a factory restore!!
Then Upgrade, then install 1-step-Hack, then continue...


4.[root@(none) ~]# mkdir /mnt/library
5.[root@(none) ~]# mkfs.ext2 -m 1 /dev/mmcblk0p4
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1695744 inodes, 6778568 blocks
67785 blocks (1%) reserved for the super user
First data block=0
Maximum filesystem blocks=8388608
207 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000
6.[root@(none) mnt]# mount /dev/mmcblk0p4 /mnt/library/

The results can be seen with the following commands:
7.[root@(none) mnt]# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /tmp type tmpfs (rw,relatime,size=16384k)
none on /dev type tmpfs (rw,relatime)
none on /var/lib type tmpfs (rw,relatime,size=16k)
none on /var/log type tmpfs (rw,relatime,size=16k)
none on /var/run type tmpfs (rw,relatime,size=128k)
none on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mmcblk0p3 on /mnt/onboard type vfat (rw,noatime,nodiratime,fmask=0022,dmask=0022,codep age=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/mmcblk0p4 on /mnt/library type ext2 (rw,relatime,barrier=1,data=writeback)
8.[root@(none) ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 253871 132693 121178 52% /
none 16384 4 16380 0% /tmp
none 256952 12 256940 0% /dev
none 16 4 12 25% /var/lib
none 16 0 16 0% /var/log
none 128 24 104 19% /var/run
/dev/mmcblk0p3 3898652 247920 3650732 6% /mnt/onboard
/dev/mmcblk0p4 26688548 3872492 22544916 15% /mnt/library
If you use:
5.alternative [root@(none) mnt]# mke2fs -j -m 1 /dev/mmcblk0p4
You make an ext3 filesystem which you can mount as ext4.

Every time before starting koreader your should mount the filesystem. I've modified my KoreaderLaucher.sh to include this command and start in the library:
#!/bin/sh
mount /dev/mmcblk0p4 /mnt/library/
/mnt/onboard/.kobo/KoboLauncher/usbnet/start.sh
/mnt/onboard/.kobo/koreader/koreader_kobo.sh /mnt/library

Last edited by Markismus; 08-31-2013 at 09:25 AM.
Markismus is offline   Reply With Quote
Old 08-31-2013, 09:51 AM   #2
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
I must be missing something, what does this give me, for Koreader, that just using a hidden folder/directory approach doesn't? With Koreader set to see hidden folders you can have part of your internal uSD card available to Koreader and not processed by Nickel. Just as you can with the external uSD card.

After a factory restore don't you have to reinstall all your added software? Isn't that what you are using the "1 Step Hack" for? If your internal SD card looses it's library directory during the restore, couldn't you just copy the contents from your PC?

Is it just using a Linux partition instead of extending the FAT partition? Has it been shown to really increase performance? Something you can see reading an ebook?

Good directions and maybe having a separate partition would have some real advantages, I'll keep it in mind, thanks.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Advert
Old 08-31-2013, 10:16 AM   #3
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 895
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by Ken Maltby View Post
I must be missing something, what does this give me, for Koreader, that just using a hidden folder/directory approach doesn't?
A factory restore, upgrade, 1-step-hack and copying the newest nightly onto my Aura costs minutes: 15 or so. Copying my library costs hours.

In that sense it is a _lot_ faster. But I also expect koreader to be faster on ext2. And if it isn't, than I'll probably change it to ext4.
Update: It is snappier.

Last edited by Markismus; 09-01-2013 at 09:59 AM.
Markismus is offline   Reply With Quote
Old 08-31-2013, 10:54 AM   #4
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
So the factory restore leaves your new partition alone? Is the reason that Nickel doesn't see the partition because it's not mounted when Nickel starts? Would the same be true if you made the unallocated space an additional FAT partition? I'll have to fire up Mini-Tool Partition Wizard and see what I can do, in Windows7.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 09-02-2013, 03:46 AM   #5
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 895
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by Ken Maltby View Post
So the factory restore leaves your new partition alone?
Yes. It changes the 3rd partition from ext2 to fat32, and configures it. The fourth partition is left alone.

Quote:
Originally Posted by Ken Maltby View Post
Is the reason that Nickel doesn't see the partition because it's not mounted when Nickel starts?
No. I've mounted the 4th partition now with run.sh (, the script which comes with 1-step-hack and is taken from a wiki for enabling telnet.) So it is mounted before Nickel. The location I've used /mnt/library as mount-point is not searched by Nickel. I assume it only searches /mnt/onboard and /mnt/sd, but to be on the safe side I also didn't use /mnt/user.

Quote:
Originally Posted by Ken Maltby View Post
Would the same be true if you made the unallocated space an additional FAT partition?
Yes it would. Although I doubt it would show up in windows if you plug in your Aura. It only shows the 3rd partition.
Markismus is offline   Reply With Quote
Advert
Old 09-02-2013, 08:35 AM   #6
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
Quote:
Originally Posted by Markismus View Post
Yes. It changes the 3rd partition from ext2 to fat32, and configures it. The fourth partition is left alone.


No. I've mounted the 4th partition now with run.sh (, the script which comes with 1-step-hack and is taken from a wiki for enabling telnet.) So it is mounted before Nickel. The location I've used /mnt/library as mount-point is not searched by Nickel. I assume it only searches /mnt/onboard and /mnt/sd, but to be on the safe side I also didn't use /mnt/user.


Yes it would. Although I doubt it would show up in windows if you plug in your Aura. It only shows the 3rd partition.
Right, the MiniTool Partition Wizard gives you a warning to that effect. Apparently Windows will only see the first FAT partition in this situation.

This is an interesting way to do it and could be essential for the Mini. I can see how to do it now, but I think I'll stick with my "library" on my external uSD card. Neat, though.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 09-02-2013, 09:02 AM   #7
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 895
Karma: 149877
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
You could change the mount point for your external uSD card to any empty directory in the script run.sh. That way you would not have to eject it before Nickel starts.
" The move operation.
Since Linux 2.5.1 it is possible to atomically move a mounted tree to another place. The call is
mount --move olddir newdir

or shortoption
mount -M olddir newdir"
Markismus is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Koreader running on Kobos (all of them, hopefully!) giorgio130 KOReader 3517 03-24-2024 05:43 PM
Creating a virtual library KoGs Library Management 1 04-28-2013 05:45 PM
How to copy apps from unrooted partition to a rooted partition? fredlave Nook Color & Nook Tablet 2 06-16-2012 12:46 PM
kindle touch partition within a partition? geekmaster Kindle Developer's Corner 8 03-12-2012 08:53 AM
Creating a library in Calibre galadriel Calibre 5 09-16-2010 06:17 PM


All times are GMT -4. The time now is 01:10 PM.


MobileRead.com is a privately owned, operated and funded community.