CLi command to check if there are bad sectors/blocks

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
tigs
DD-WRT User


Joined: 25 Sep 2011
Posts: 84

PostPosted: Mon Jan 23, 2023 2:43    Post subject: CLi command to check if there are bad sectors/blocks Reply with quote
is there a command to check if there are bad sectors/blocks? I searched and could not find anything.

I have R7800 and R9000 routers.

thanks
Sponsor
foz111
DD-WRT Guru


Joined: 01 Oct 2017
Posts: 704
Location: Earth

PostPosted: Mon Jan 23, 2023 9:17    Post subject: Reply with quote
You could try
Code:
dmesg | grep bad

hope this helps

_________________
Netgear R7800 PPPoE Main Router
Network IPV4 - Isolated Vlan's with IoT Devices. Unifi AC-Pro x 3 AP's, Router Wi-Fi Disabled. OVPN Server With Paid Commercial Wireguard Client's. Gateway Mode, DNSMasq, Static Leases & DHCP, Pi-Hole DNS & Running Unbound.

No one can build you the bridge on which you, and only you, must cross the river of life!
tigs
DD-WRT User


Joined: 25 Sep 2011
Posts: 84

PostPosted: Thu Jan 26, 2023 23:33    Post subject: Reply with quote
thanks
MesMurized
DD-WRT User


Joined: 08 Aug 2017
Posts: 83

PostPosted: Wed Feb 01, 2023 16:23    Post subject: Reply with quote
Before USBs are mounted:
Code:
e2fsck -p /dev/sda1


Update: added "2" to correct the cmd.
I assume if you are checking, it might need fixing. Why not all-in-one?

Also, haven't tried on internal flash storage. I've used this to fix external USB flash.

_________________
Current: Netgear R9000 DD-WRT v3.0-r55363 std (03/13/24)
Retired: Linksys WRT32X r39296, TP-Link Archer C7 v2, LinkSys WRT54G v5


Last edited by MesMurized on Wed Feb 01, 2023 21:56; edited 1 time in total
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6407
Location: UK, London, just across the river..

PostPosted: Wed Feb 01, 2023 20:53    Post subject: Reply with quote
MesMurized wrote:
Before USBs are mounted:
Code:
efsck -p /dev/sda1


nope this is incorrect he is asking for checking the bad blocks of the router ram i believe...well he didn't mentioned neither...
more over efsck -p /dev/sda1 is for fixing USB drives bad blocks (ext fs based) please ignore MesMurized comment from above.. even command has a typo (e2fsck) ... Rolling Eyes

more on USB drives e2fsck here in this thread:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=333819

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
MesMurized
DD-WRT User


Joined: 08 Aug 2017
Posts: 83

PostPosted: Wed Feb 01, 2023 21:55    Post subject: Reply with quote
Alozaros wrote:
more on USB drives e2fsck here in this thread:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=333819

Why the hate? Because I misspelled e2fsck? Sorry, I'll try to do better.
Even your link recommends what I posted. Geeze Confused

_________________
Current: Netgear R9000 DD-WRT v3.0-r55363 std (03/13/24)
Retired: Linksys WRT32X r39296, TP-Link Archer C7 v2, LinkSys WRT54G v5
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6407
Location: UK, London, just across the river..

PostPosted: Thu Feb 02, 2023 9:07    Post subject: Reply with quote
MesMurized wrote:
Alozaros wrote:
more on USB drives e2fsck here in this thread:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=333819

Why the hate? Because I misspelled e2fsck? Sorry, I'll try to do better.
Even your link recommends what I posted. Geeze Confused


There is no hate at all m8, dont take it in that way and play im a victim card..

If you carefully read the first post, the OP is asking about checking for bad sectors on his routers...R7000 / R7800
as those could prevent form uploading firmware images..

and your answers is:
-wrong, with misspelled command that actually is meant to fix bad sectors, not to check for router bad sectors.. Laughing
-you are also hijacking the thread and changing the subject...forum rules !!!
....case closed, thread will be locked if the hijack continues .......lets keep it clean Razz
Thank You !

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Thu Feb 02, 2023 9:36    Post subject: Reply with quote
The command "e2fsck" is used to check and fix EXT file system errors.
So for external disks that are formatted with an EXT* file system.

On the one hand the internal flash memory does not use an EXT file system but squashfs and on the other hand BAD blocks can not be fixed.

Bad blocks are physically defective cells in the flash memory.
And since the cells can not be repaired, they can only be recorded in a table (bad block table) which marks the memory areas as defective so that these cells are no longer used.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware 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 cannot attach files in this forum
You cannot download files in this forum