| Author |
Message |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: 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?
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
Aitch

Joined: 04 Apr 2007 Posts: 6825 Location: Chatham, Kent, UK
|
Posted: 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
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2675 Location: Kiel,Germany
|
Posted: 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
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9844 Location: Arizona USA
|
Posted: 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
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: 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
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
|