USB partitions reported in exabytes BUG

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
egosumumbravir
DD-WRT User


Joined: 19 Jun 2020
Posts: 58

PostPosted: Sun Oct 09, 2022 1:54    Post subject: USB partitions reported in exabytes BUG Reply with quote
So this has been something I've noticed for a number of builds.

I'm not the only one either - https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=332934

The above thread concludes with BrainSlayer commenting:
BrainSlayer wrote:
the jffs storage is calculated by available flash space on the internal flash memory. now you mounted usb drive to /jffs. so its logic that such strange values are displayed. its not the internal flash memory which is supposed to be used for /jffs. for custom other drives you may use /mmc or /usr/local or even /opt. custom hacks are not considered by the gui


All well and good. But what does it mean when you DONT mount a USB partition to /jffs and it's STILL reported exabytedly wrong.

Now, to avoid the gparted bug where ext2 partitions are erroneously reported as ext4 by DD-WRT I'm using MiniTool Partition Wizard to partition the drive.

In this example I've created a stack of partitions (1g+1.9g+2g+2.1g+3g+4G+rest) to test my obversions - only 2GB partitions are reported incorrectly.

FDISK on the command line


DD-WRT GUI
Sponsor
egosumumbravir
DD-WRT User


Joined: 19 Jun 2020
Posts: 58

PostPosted: Sun Oct 09, 2022 2:17    Post subject: Reply with quote
Experiment #2: again Minitool Partition Wizard.
Partitions created: 1GB + 1.99GB + 2GB + 2.01GB

MuzzleVelocity
DD-WRT User


Joined: 23 Apr 2010
Posts: 125

PostPosted: Wed Oct 12, 2022 15:15    Post subject: Re: USB partitions reported in exabytes BUG Reply with quote
egosumumbravir wrote:
Now, to avoid the gparted bug where ext2 partitions are erroneously reported as ext4 by DD-WRT I'm using


i've noticed dd-wrt report partition types incorrectly for years now, and just learned to ignore it.

but are you saying that the problem isn't with dd-wrt, but that there is a bug in gparted that if it is used to create the partitions, then dd-wrt will report the type incorrectly?
egosumumbravir
DD-WRT User


Joined: 19 Jun 2020
Posts: 58

PostPosted: Thu Oct 13, 2022 3:48    Post subject: Re: USB partitions reported in exabytes BUG Reply with quote
MuzzleVelocity wrote:
but that there is a bug in gparted that if it is used to create the partitions, then dd-wrt will report the type incorrectly?

My findings
gparted bootable USB (v1.3.1-1-amd64): ext2 partitions are reported by the GUI as ext4. Even after refomatting via the gui. mkfs (at least I think it was mkfs) at the command line did correctly show them as ext2.
MiniTool Partition Wizard (v12.6): ext2 partitions are reported correctly as ext2.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12888
Location: Netherlands

PostPosted: Thu Oct 13, 2022 5:48    Post subject: Reply with quote
All routers only have ext4.ko which is compatible with ext2.
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Fri Oct 14, 2022 4:32    Post subject: Reply with quote
egc wrote:
All routers only have ext4.ko which is compatible with ext2.


ext4 and ext3 are basically ext2 with journal. ext2 tools possibly could mount ext4 partitions, as long as you do NOT write to the partition, thus destroying synchronization with its journal. But then you might be able to repair the journal... never tried that.

And Window$ could possibly read ext2 and hence ext4 file systems using explore2fs. There are other methods of course, especially for Window$ 10/11.

Access (Read & Write) Linux Ext2 / Ext3 / Ext4 / HFS+ / ReiserFS Filesystem Partitions in Windows - Tech Journey
https://techjourney.net/access-read-write-linux-ext2-ext3-ext4-hfs-reiserfs-filesystem-partitions-in-windows/


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Fri Oct 14, 2022 10:37    Post subject: Reply with quote
While this topic has been semi answered still would like to see the USB tab full page screenshot just out of pure curiosity.

As for space, BS explains how the calculations work, in this case I suspect since drives mounted to /tmp, it's available space is equal to device free/available RAM.

If I were the OP my attempt would be to mount the drives as /mmc or /usr/local or /opt and see if this improves as suggested by BS and if not then perhaps he will rework and fix the issues.

Most of these DD-WRT areas range from 10 to 15/16 years old and have remained largely unchanged, things were just done/implemented that long ago drives weren't as large as today.

But whos going to refactor all this code in a manner that is both working and that gets merged? User experience matters, but not everyone cares about it.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
egosumumbravir
DD-WRT User


Joined: 19 Jun 2020
Posts: 58

PostPosted: Mon Oct 17, 2022 7:45    Post subject: Reply with quote
the-joker wrote:
As for space, BS explains how the calculations work, in this case I suspect since drives mounted to /tmp, it's available space is equal to device free/available RAM.

Then I must ask - why is it only a 2.00Gb partition that is shown incorrectly when they're ALL mounted to /tmp/mnt (or indeed anywhere else not /jffs)?
1.99Gb and 2.01Gb are reported fine - as are other sizes. 2.00Gb is causing a problem somewhere.

Sadly, I've already deployed the testbench elsewhere offsite along with the USB stick. Will endeavour to remember to grab screenshots next time I can take it offline long enough to have a play.
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Tue Oct 18, 2022 15:58    Post subject: Re: USB partitions reported in exabytes BUG Reply with quote
egosumumbravir wrote:
FDISK on the command line


How about the output of command "df"? Is it the same as "fdisk"?

Related????

partitioning - Units misunderstanding in fdisk / gdisk / parted - Super User
https://superuser.com/questions/1194426/units-misunderstanding-in-fdisk-gdisk-parted

Why fdisk disk size use 1000 not 1024 to calculate? - Ask Ubuntu
https://askubuntu.com/questions/240596/why-fdisk-disk-size-use-1000-not-1024-to-calculate?noredirect=1&lq=1

linux - Discrepancy of disk size in fdisk command output - Unix & Linux Stack Exchange
https://unix.stackexchange.com/questions/679188/discrepancy-of-disk-size-in-fdisk-command-output

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Tue Oct 18, 2022 17:08    Post subject: Reply with quote
RAM space must be set somewhere like some upper limit after that is reached bang. This is a semi uneducated guess.

You have /opt /mmc and other already suggested and if there's an issue there, we can revisit this discussion

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
egosumumbravir
DD-WRT User


Joined: 19 Jun 2020
Posts: 58

PostPosted: Wed Oct 19, 2022 3:16    Post subject: Reply with quote
mwchang wrote:
Related????

I don't think so. This is discussion why DD-WRT GUI is recognising partitions as EXAbyte sized. Not a handful of Gib/Mib vs Gb/Mb differences.
mwchang wrote:
How about the output of command "df"? Is it the same as "fdisk"?

Unsure. I'll add it to the inquiry list when I get a unit back on the testbench.

the-joker wrote:
and if there's an issue there, we can revisit this discussion

Noted.
IONK
DD-WRT Guru


Joined: 19 Aug 2011
Posts: 967

PostPosted: Wed Oct 26, 2022 9:04    Post subject: Reply with quote
Next time you can try with 2KB block size when you format the partitions.
_________________
▫ RSS feed for DD-WRT releases (2024): https://rsseverything.com/feed/7d36ab68-7733-46c3-bd8a-9c54c5cef08c.xml
easyddup - A simple upgrade/downgrade utility by yoyoma2 --- as featured in 📌 Reference Links, stickies retired back to forum (Moderator's Pick 🌟)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum