Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Sep 2014, 18:38
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
drives need unmounting on poweroff/reboot?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
darkcity


Joined: 23 May 2010
Posts: 2452
Location: near here

PostPosted: Tue 25 Oct 2011, 11:14    Post subject:  drives need unmounting on poweroff/reboot?  

I put a couple of line of script in a file in

/root/Startup

to mount extra drives after xwin starts

Quote:
#!/bin/sh
#vfat
mount /dev/sda1 /mnt/sda1
#nfts - needs filesystem declaring to make writable
mount /dev/sda2 /mnt/sda2 ntfs



my question is whether I need to add some code somewhere to unmount these drive on poweroff/reboot? or will puppy automatically unmount?

_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send private message Visit poster's website 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Tue 25 Oct 2011, 13:34    Post subject:  

http://www.murga-linux.com/puppy/viewtopic.php?t=55823

Also
Puppian wrote:

You can write a script to auto-unmount too, e.g,

Code:
#!/bin/sh
#  Command to shutdown the system
umount /mnt/dos
umount /mnt/linux2
umount /mnt/linux3
icewmpoweroff


save it as 'shutdownIce' and make it executable.


http://www.murga-linux.com/puppy/viewtopic.php?t=2996

Aitch Smile
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 25 Oct 2011, 18:52    Post subject:  

The /etc/rc.d/rc.shutdown script called by /bin/poweroff || reboot does in the very end a simple
Code:
busybox umount -ar > /dev/null 2>&1


This might not be enough , though .

There is also 2 times code above about STRAYPART[ITION]S :
Quote:
01micko reported that in Slacko, when poweroff was chosen, a reboot happened instead. This only happened when a partition was left mounted.

http://www.bkhome.org/blog/?viewDetailed=02505

Lupu 52+ has got the ^ bug ^ about passing the -n option to ntfs-3g using the puppy /bin/mount script .
I had a similar problem with new2dir calling installwatch which splitted 'make install' into 'make -i -n -s -t -a' >ERROR :make unknown option '-a' ....
Installing a newer checkinstall.deb fixed that .

I for myself have written several different scripts in different places like /etc/rc.d/rc.shutdown.local
and had put code like that into it :
Code:
M=`mount | grep -v -E 'root|union|*tmpfs|devtmpfs|sysfs|none|initrd'`
SFSdev=`echo "$M" | grep '\.sfs' | tr -s ' ' | cut -f 1 -d ' '`
for i in $SFSdev ; do
echo "unmounting `mount | grep $i` "
umount $i
done

and similar for dotISO , dot2-4fs and normalPartitions .
Since I am using 95% linux fs and only one partition with ntfs and none with vfat it works for me , to ease busybox umount and STRAYPARTS much .
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11070
Location: Arizona USA

PostPosted: Tue 25 Oct 2011, 23:25    Post subject:  

To the question of whether drives even need to be unmounted before the power is turned off, it may depend on what kind of media and what you're using it for. I keep a USB flash drive plugged in and mounted so I can quickly move images to it from camera (CF and SD) cards. Mostly Puppy just sits there waiting, which I presume gives it plenty of time to keep the filesystem of the USB flash drive up to date. Anyway, I don't bother unmounting the drive before switching off the power, and nothing bad has happened. I run Puppy from a multisession DVD in a computer without a hard disk drive but with 512 MB of RAM.
Back to top
View user's profile Send private message 
darkcity


Joined: 23 May 2010
Posts: 2452
Location: near here

PostPosted: Wed 04 Jan 2012, 22:24    Post subject:  

thanks for help, just added unmount for addtitional (non pup files) drive to top of rc.shutdown
_________________
helping Wiki for help | IF SendSpace link = "dead" THEN PM me ("up file to http://meownplanet.net/")
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
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 can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0526s ][ Queries: 11 (0.0025s) ][ GZIP on ]