Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-03-2020, 12:51 PM   #1
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Workaround lingering dirty bit on Mk.7 USBMS partition

NOTE: This was officially implemented in FW 4.22.15190 . Nothing to see here anymore if you're running an up-to-date firmware .

-----

As people with a Mk.7 device are probably aware, there's been a recurrent glitch which sometimes leaves the FAT filesystem of the partition exported over USBMS with the dirty bit set.

This makes most OS complain loudly about it when trying to mount it (and might cause the most stringent of 'em to refuse to mount it with write access).

I'm still not quite sure what's triggering the issue in the first place (but I figure Nickel is sometimes a bit hasty with how it unmounts the partition), but there are mechanisms in place to attempt to fix minor issues with the FAT partition automatically. These rely on the fsck tool from dosfstools. Unfortunately, like most of the sysroot, the version Kobo ships is *hilariously* old. So much so, that it doesn't actually know how to deal with the dirty bit.
Which means the existing fail-safe mechanisms are powerless to "fix" this issue.

I stumbled onto this entirely by chance (c.f., this post for more details), but the good news is that replacing that old binary with a recent version should take care of the problem (well, not the root cause, of course, but at least the built-in "fix" will now actually work).

So, here it is, in the form of a custom update package (i.e., a KoboRoot tarball), which you'll find inside the attached ZIP. As usual, put it (the tgz, not the zip) in the .kobo folder to install it.

----

fsck.fat -> dosfsck: DOSFSTools, c.f., individual source files for detailed Copyright attribution,
Released under the GNU General Public License version 3+ (https://www.gnu.org/licenses/gpl.html),
(https://github.com/dosfstools/dosfstools)
Attached Files
File Type: zip KoboRoot-dosfstools.zip (31.2 KB, 327 views)

Last edited by NiLuJe; 06-28-2020 at 11:43 PM.
NiLuJe is offline   Reply With Quote
Old 06-03-2020, 12:53 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Pinging @davidfor or anyone on the beta team to elevate this to someone who can actually do something about it for real .

(Might take a while, because GPLv3, but, there you have it).
NiLuJe is offline   Reply With Quote
Old 06-03-2020, 01:32 PM   #3
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
I checked (Clara) and yes, the popup with complain disappeared.
Very well.

Edit:

After rebooting the device, the complaint appears once. I don’t remember if it was on Mark 5 and 6.

Checked - does not appear there. But still good, for they popped up too often.

Last edited by Semwize; 06-03-2020 at 02:04 PM.
Semwize is offline   Reply With Quote
Old 06-03-2020, 02:00 PM   #4
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 102
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
Thanks for the workaround, is it safe to use on mk6 and other devices?
npr is online now   Reply With Quote
Old 06-03-2020, 02:01 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
It (should) be completely harmless even on earlier devices, not that you'd necessarily have any need of it there.

Won't magically fix truly broke filesystems, though .
NiLuJe is offline   Reply With Quote
Old 06-03-2020, 02:17 PM   #6
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 102
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
It's magically fixed the problem on my H2OE2.

I'll try it on my glow and aura later.
Thanks for a great fix.

npr is online now   Reply With Quote
Old 06-03-2020, 03:20 PM   #7
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Quote:
Originally Posted by NiLuJe View Post
I'm still not quite sure what's triggering the issue in the first place (but I figure Nickel is sometimes a bit hasty with how it unmounts the partition)
well it still uses the umount -l (lazy umount) in the /etc/local/Kobo/udev scripts. lazy umount only makes the filesystem invisible. it does not umount anything at all, as long as the filesystem is still in use. thus you export mounted filesystems and the result is corruption.

and the kobo device never reports any error so no one knows that there is a problem or what triggers it or how to fix it

remove the -l option and the script would run into "filesystem is busy" errors instead. e.g. it used to happen when connecting to usb from inside the kepub reader or at least that was the case years ago when I wrote UsbDebug to try and track down the culprits (outdated by now)

remove the -l and add a few loops of retry umount and it'll still work as long as the filesystem would unbusy itself eventually

but if something blocks the filesystem permanent, with this fix you'd lose usb connectivity altogether, and end up locked out if you don't have another channel like telnet/ftp to access the device

maybe if it fails to umount five times, it should umount -l then display a warning message on the screen just to notify that there was a problem ...
frostschutz is offline   Reply With Quote
Old 06-03-2020, 03:43 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@frostschutz: it's also fairly easy to identify & murder anything that might be holding a fd to the fs on a non-lazy umount failure (and/or fail gracefully (i.e., reboot) if it's unrecoverable, e.g., from nickel itself)).

But, yeah, USBMS is tricky.

Amazon went with a giant Jenga tower of indirection to tackle the problem, and it's been the root of a number of sneaky issues over the years, too.
NiLuJe is offline   Reply With Quote
Old 06-03-2020, 04:21 PM   #9
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
I wonder if a remount ro before umount would prevent the worst of the corruption without hanging.
geek1011 is offline   Reply With Quote
Old 06-03-2020, 08:19 PM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by NiLuJe View Post
Pinging @davidfor or anyone on the beta team to elevate this to someone who can actually do something about it for real .

(Might take a while, because GPLv3, but, there you have it).
Already done when I saw your original post yesterday. I'm under an NDA for that, but, I can probably say I am happy with the response
davidfor is offline   Reply With Quote
Old 06-03-2020, 09:28 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by davidfor View Post
Already done when I saw your original post yesterday. I'm under an NDA for that, but, I can probably say I am happy with the response
Yay, cheers!
NiLuJe is offline   Reply With Quote
Old 06-04-2020, 10:06 AM   #12
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 102
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
Fixed the issue in my kobo glow.
windows nolonger complains when USB is connected.
npr is online now   Reply With Quote
Old 06-06-2020, 04:48 PM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,049
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I've never had Windows complain about my original H2O. That's about 5.5 years of use.
JSWolf is offline   Reply With Quote
Old 06-06-2020, 04:50 PM   #14
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@JSWolf: Same, which is why I initially thought it was limited to either Mk. 7 and/or devices with an eMMc instead of an SD card.
NiLuJe is offline   Reply With Quote
Old 06-06-2020, 06:00 PM   #15
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,513
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by NiLuJe View Post
@JSWolf: Same, which is why I initially thought it was limited to either Mk. 7 and/or devices with an eMMc instead of an SD card.
Of my Kobo device collection, the Clara HD probably complained the most.
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
USBMS Shenanigans... sherman Kobo Developer's Corner 21 11-25-2023 11:02 AM
Anyone performance tested the calibre 32bit vs 64 bit on Windows 7 32 bit & 64 bit? millan Devices 6 11-07-2014 05:03 PM
Calibre 32-bit and 64-bit Installed; Uninstall 32-bit? J-Mac Calibre 6 06-29-2013 06:40 AM
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


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


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