DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-01-09 20:34:29

cinergi
Member
Registered: 2011-01-02
Posts: 14

Unmounting USB drive automatically

Like many here, I've installed the USB drive support on my DNS-323.  The wiki recommends manually unmounting the USB drive before rebooting or powering down the unit just in case it's not done automatically.  My question is, couldn't I simply add the "umount" command to a shutdown script that is executed whenever the "Reboot" button is clicked in the Web UI?  I'm assuming, of course, that there is such a script already defined that can be edited?

Thanks
cinergi

Offline

 

#2 2011-01-10 11:49:33

index monkey
Member
From: UK
Registered: 2007-06-14
Posts: 112

Re: Unmounting USB drive automatically

Could the command be linked to pressing the blue button on the front, so you dont have to login to your computer to unmount the drive?


DNS-323, HW B1, 2 x 2TB WD green, fw 1.08, fun_plug 0.5, transmission, automatic, nzbget newsreader & rsync time machine backup.

Offline

 

#3 2011-01-10 12:11:53

scaramanga
Member
Registered: 2010-08-04
Posts: 251

Re: Unmounting USB drive automatically

I was thinking about that myself - I started doing that myself, recently.
It's a bit more involved than that, if the mounted file-system is being used. Simply umount-ing will probably won't be enough.
Some resources on the subject I found here:
cleanboot is a good place to start.
And this thread, about SAFE shutdown using power button through Cleanboot.


DNS-323 HW Rev. C1 FW 1.10 fun-plug 0.5
2 x WD10EARS-00Y5B1 in Standard mode (LCC set to 5 min; Aligned to 4K)
Transmission with Transmission Remote GUI

Offline

 

#4 2011-01-10 16:38:46

scaramanga
Member
Registered: 2010-08-04
Posts: 251

Re: Unmounting USB drive automatically

...And there's João's chkbutton2: http://dns323.kood.org/forum/viewtopic.php?id=4420


DNS-323 HW Rev. C1 FW 1.10 fun-plug 0.5
2 x WD10EARS-00Y5B1 in Standard mode (LCC set to 5 min; Aligned to 4K)
Transmission with Transmission Remote GUI

Offline

 

#5 2011-01-12 19:34:33

cinergi
Member
Registered: 2011-01-02
Posts: 14

Re: Unmounting USB drive automatically

Thanks, I first set up cleanboot as per the wiki, then created my own custom reboot script:

#!/bin/sh
pkill twonky (so that I can unmount the USB drive that twonky runs on)
umount /dev/HD_a2/usb_1
reboot (which takes care of unmounting the HDDs using cleanboot)

... and that's it!

On a related topic, I scanned my disks using fsck because I had been rebooting my DNS-323 without cleanboot installed.  I used the method at http://www.inreto.de/dns323/fsck/.  It worked fine until I rebooted from the custom ramdisk kernel back to the standard one - the unit just hung and I couldn't even use the power button (I had to physically power-cycle it).  After power-cycling all was well.  I wonder why the reboot command didn't work?  If it makes a difference, I don't have bash installed so I used the no_bash version of the fsck script.

Thanks to all
cinergi

Offline

 

#6 2011-01-14 14:38:38

bound4h
Member
Registered: 2010-04-12
Posts: 209

Re: Unmounting USB drive automatically

When I wget cleanboot, and then funpkg -i, it says:
Skipping cleanboot-2.1-ffp05.tgz (installed: cleanboot-2.1-ffp05.tgz)

But there's no /ffp/start/cleanboot.sh?  I even tried funpkg -r cleanboot-2.1-ffp-5.tgz and it said it Removed it.  But when I install again it still says "Skipping..."

And it's not running in top or ps.  Where do I find it and how do I start it?

Any ideas how to get it installed?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB