Flash DD-WRT firmware after turning off USB

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page 1, 2  Next
Author Message
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 5:45    Post subject: Flash DD-WRT firmware after turning off USB Reply with quote
Hi,

I had read somewhere, that every time you want to update the dd-wrt build, you should deactivate the flashdrive (USB Support > opt,jffs) correct?


Last edited by marcus83 on Tue Feb 13, 2024 7:40; edited 1 time in total
Sponsor
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1080
Location: WV, USA

PostPosted: Tue Feb 13, 2024 5:54    Post subject: Reply with quote
I went years without doing this, with zero issues. The drive was always formatted with ext4. However, when trying k6.1 builds, my USB3 drives got trashed. After that, I had read you should unmount them before shutting down. I added this to my shutdown script, but not sure it entirely works when files are open. Usually this would only affect those using Entware.
Code:

umount /dev/sda1
umount /dev/sdb1

_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Wireless 5ghz only

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r55779
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r55799

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port. DD-WRT r55779

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 6:07    Post subject: Reply with quote
lexridge wrote:
I went years without doing this, with zero issues. The drive was always formatted with ext4. However, when trying k6.1 builds, my USB3 drives got trashed. After that, I had read you should unmount them before shutting down. I added this to my shutdown script, but not sure it entirely works when files are open. Usually this would only affect those using Entware.
Code:

umount /dev/sda1
umount /dev/sdb1


I also did the latest update without deactivating the flash drive (ext4-kernel 6.1) and there were no problems
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 6:15    Post subject: Reply with quote
For information, could you tell me why this unsupported format appears in USB Support? my flash drive is formatted in ext4....


ScreenShot-OSX 2024-02-13 alle 07.12.55.jpg
 Description:
 Filesize:  235.76 KB
 Viewed:  1071 Time(s)

ScreenShot-OSX 2024-02-13 alle 07.12.55.jpg


lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1080
Location: WV, USA

PostPosted: Tue Feb 13, 2024 6:20    Post subject: Reply with quote
It is because your partition is sda1. sda is the drive itself. If you had multiple partitions, they would most likely be sda1, sda2, etc. sda is the entire drive, not the partitions. However, you CAN format sda and use the full drive without partitions. Makes things a bit confusing if you are not familiar with doing this. What you have is fine.
_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Wireless 5ghz only

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r55779
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r55799

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port. DD-WRT r55779

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 6:27    Post subject: Reply with quote
I understand, however the partition was created automatically during formatting...

If this doesn't cause any problems, I'll leave everything as it is
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 1080
Location: WV, USA

PostPosted: Tue Feb 13, 2024 6:29    Post subject: Reply with quote
Yep, you should be good. I have the same as I have two partitions sda1 (opt) and sda2 (jffs). My sda shows the same as yours, for years. Not an error.
_________________
Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Wireless 5ghz only

Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r55779
Features in use: multiple VLANs over single trunk port

Linksys EA8500 WDS Station x2 - DD-WRT r55799

Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port. DD-WRT r55779

OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.

Forum member #248
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 6:30    Post subject: Reply with quote
perfect! thx again for your support friend! Cool
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 7:06    Post subject: Reply with quote
I just activated jffs, why isn't it recognized as a partition /dev/sda2? then also noticed that it only assigned me 70mb...


ScreenShot-OSX 2024-02-13 alle 08.04.14.jpg
 Description:
 Filesize:  309.71 KB
 Viewed:  1045 Time(s)

ScreenShot-OSX 2024-02-13 alle 08.04.14.jpg


mwchang
DD-WRT Guru


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

PostPosted: Tue Feb 13, 2024 7:36    Post subject: Reply with quote
lexridge wrote:
I went years without doing this, with zero issues. The drive was always formatted with ext4.

I went one step further.

I flashed new builds using the firmware file downloaded into the USB drive (ext4 partition). But I was NOT using WEBUI but commands. Smile

If you think about the commands used by the WEBUI to flash firmware, it's quite safe.

_________________
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


Last edited by mwchang on Tue Feb 13, 2024 7:41; edited 1 time in total
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 7:38    Post subject: Reply with quote
mwchang wrote:
lexridge wrote:
I went years without doing this, with zero issues. The drive was always formatted with ext4.

I went one step further.

I flashed new builds using the firmware file downloaded into the USB drive (ext4 partition). But I was NOT using WEBUI but commands. Smile


good job!
mwchang
DD-WRT Guru


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

PostPosted: Tue Feb 13, 2024 7:39    Post subject: Re: [DD-WRT update information] Reply with quote
marcus83 wrote:
I had read somewhere, that every time you want to update the dd-wrt build, you should deactivate the flashdrive (USB Support > opt,jffs) correct?

Suggestion: change the subject of this thread from "[DD-WRT update information]" to "Flash DD-WRT firmware after turning off USB?"

_________________
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
marcus83
DD-WRT User


Joined: 04 Jan 2024
Posts: 229

PostPosted: Tue Feb 13, 2024 7:41    Post subject: Re: [DD-WRT update information] Reply with quote
mwchang wrote:
marcus83 wrote:
I had read somewhere, that every time you want to update the dd-wrt build, you should deactivate the flashdrive (USB Support > opt,jffs) correct?

Suggestion: change the subject of this thread from "[DD-WRT update information]" to "Flash DD-WRT firmware after turning off USB?"


done! Cool
mwchang
DD-WRT Guru


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

PostPosted: Tue Feb 13, 2024 7:45    Post subject: Reply with quote
marcus83 wrote:
mwchang wrote:
I flashed new builds using the firmware file downloaded into the USB drive (ext4 partition). But I was NOT using WEBUI but commands. Smile

good job!

Well.. just some commands. If you think about the commands used by the WEBUI to flash firmware, it's quite safe.

Can you specify a file from a mounted ext4 partition in a USB drive using WEBUI (hitting the Browse button)? I doubt it...

That's why it's not talked about, at least not that often. Smile

_________________
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
Alozaros
DD-WRT Guru


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

PostPosted: Tue Feb 13, 2024 7:59    Post subject: Reply with quote
correct way to unmount...prior flash...

# Stop all init scripts in /opt/etc/init.d including symlinks
/opt/etc/init.d/rc.unslung stop

# "Stop mDNS & SAMBA service before unmounting USB thumbdrive & filesystem checks!"
service mdns stop
service samba3 stop

# Unmount thumb-drive partitions jffs and optware
umount /jffs
umount /opt

with last command you can go to extreme and unmount with magic number command..

echo u > /proc/sysrq-trigger

you can download your update files at /tmp so those will not be affected by the unmount...

for the record i used to download my files to /opt and than flash with no unmount...than delete the files from /opt ..i know it was a dirty game but it was ok...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 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 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 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
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
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