![]() |
#1 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
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
![]() ![]() ----- 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) Last edited by NiLuJe; 06-28-2020 at 11:43 PM. |
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
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). |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 900
Karma: 270670
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. |
![]() |
![]() |
![]() |
#4 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 37418
Join Date: Jan 2013
Device: H2OE2, Libra 2
|
Thanks for the workaround, is it safe to use on mk6 and other devices?
|
![]() |
![]() |
![]() |
#5 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
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 ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 37418
Join Date: Jan 2013
Device: 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. ![]() |
![]() |
![]() |
![]() |
#7 | |
Linux User
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Quote:
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 ... |
|
![]() |
![]() |
![]() |
#8 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
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. |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,801
Karma: 6990707
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.
|
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#11 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
|
![]() |
![]() |
![]() |
#12 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 37418
Join Date: Jan 2013
Device: H2OE2, Libra 2
|
Fixed the issue in my kobo glow.
windows nolonger complains when USB is connected. ![]() |
![]() |
![]() |
![]() |
#13 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,078
Karma: 144284144
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.
|
![]() |
![]() |
![]() |
#14 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
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.
|
![]() |
![]() |
![]() |
#15 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,730
Karma: 168431851
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |