How to mount all partitions at bootup?
How to mount all partitions at bootup?
I've remastered and running "live" without using a save file. Tried placing the script: mount -t ntfs /dev/sda5 /mnt/sda5 in local.rc and also tried it in the startup folder. No luck seems to want to mount momentarily but not. Any ideas?
How do I include a slight time delay of say 10 seconds in the script as that may do the trick, I think?
How do I include a slight time delay of say 10 seconds in the script as that may do the trick, I think?
Re: Mounting all partitions at bootup running "live session"
Hello nic007
CatDude
.
Try thisnic007 wrote:..How do I include a slight time delay of say 10 seconds in the script as that may do the trick, I think?
Code: Select all
sleep 10
.
[img]http://www.smokey01.com/CatDude/.temp/sigs/acer-futile.gif[/img]
Hi 007,
Try Startmount from 01micko - download from below then delete the last three (dot g z) characters.
If I understand you correctly and if that doesn't work you could use xdotool in your Startup and say,
Name the file say, "mntsda5" make it executable and exchange xxx xxx for your sda5 desktop icon coordinates. Experiment with "sleep 10" to find a value that suits.
My regards
Try Startmount from 01micko - download from below then delete the last three (dot g z) characters.
If I understand you correctly and if that doesn't work you could use xdotool in your Startup and say,
Code: Select all
sleep 10
xdotool mousemove xxx xxx
sleep 0.5
xdotool click 1
My regards
- Attachments
-
- Startmount-0.5.5.pet.gz
- (7.98 KiB) Downloaded 157 times
Hi, Jasper. Startmount does not work, I've tried it before and get an error that I'm operating in "live" mode. Xdotool works and mounts the partition to be explored but that's not really what I want. I want to mount the partition but not explore it immediately, necessarily (so no window)..Jasper wrote:Hi again,
I assume pass means neither of my suggestions work.
Which Pup are you using and can you include a desktop screen shot?
My regards
Code: Select all
#!/bin/bash -a
#------------------------------------------------------------------------------
# Full Drive Mounter Backend, Original by W.Schmidt and SFR
# 2013-03-06 RSH for LazY Puppy
#------------------------------------------------------------------------------
# Sort out swap and mounted partitions
blkid | egrep '(hd|sd)' | egrep -v "/dev/loop*" | egrep -v "swap" | cut -f 1 -d ':' | sed 's/\/dev\///'>/tmp/list_of_drives
sort -u /tmp/list_of_drives > /tmp/sorted_list_of_drives
mv /tmp/sorted_list_of_drives /tmp/list_of_drives
#cp -af /tmp/sorted_list_of_drives /tmp/list_of_drives
#rm -f /tmp/sorted_list_of_drives
for drive in `cat /tmp/list_of_drives` ; do
mkdir -p /mnt/$drive
if [ "`blkid /dev/$drive | grep -o "TYPE=.*" | cut -f2 -d '"'`" = "ntfs" ]; then
mount -t ntfs /dev/$drive /mnt/$drive
else
mount /dev/$drive /mnt/$drive
fi
echo $drive
done
exit 0
#------------------------------------------------------------------------------
# End
#------------------------------------------------------------------------------
I'm using this in all of my remastered Operating Systems.
RSH
Edit:
In addition to the Script above, I do use the next Script to unmount all ISO, SFS, 2FS, 3FS and 4FS Files mounted under /mnt.
Code: Select all
#!/bin/bash -a
#------------------------------------------------------------------------------
# Unmount all ISO, SFS, 2FS, 3FS and 4FS Files (used at shutdown)
# 2012-12-28 RSH for LazY Puppy
#------------------------------------------------------------------------------
Path=/mnt
Files=`find $Path -maxdepth 1 -type d`
echo "$Files" |while read F
do
if [ "$F" != "" ]; then
# Set to don't unmount $F
do_unmount="false"
if [[ "$F" == *\.sfs* ]]; then
do_unmount="true"
elif [[ "$F" == *\.SFS* ]]; then
do_unmount="true"
elif [[ "$F" == *\.2fs* ]]; then
do_unmount="true"
elif [[ "$F" == *\.3fs* ]]; then
do_unmount="true"
elif [[ "$F" == *\.4fs* ]]; then
do_unmount="true"
fi
# Unmount if $F is SFS or Save File (do_unmount="true")
if [ "$do_unmount" = "true" ]; then
echo $F > /dev/null
umount $F
sleep .2
rox -D $F
rm -r $F
fi
fi
done
Path=/mnt
Files=`find $Path -maxdepth 1 -type d`
echo "$Files" |while read F
do
if [ "$F" != "" ]; then
# Set to don't unmount $F
do_unmount="false"
# Check for mounted ISO or SFS
if [[ "$F" == *\.iso* ]]; then
do_unmount="true"
elif [[ "$F" == *\.ISO* ]]; then
do_unmount="true"
fi
# Unmount if $F is ISO (do_unmount="true")
if [ "$do_unmount" = "true" ]; then
echo $F > /dev/null
umount $F
sleep .2
rox -D $F
rm -r $F
fi
fi
done
exit 0
#------------------------------------------------------------------------------
# End
#------------------------------------------------------------------------------
Code to unmount all Partitions can be found either in /sbin/pup_event_frontend_d (older Pups like Lucid) or in /usr/local/pup_event/frontend_funcs (newer Pups like Precise). Search for function: unmount_drive and use this code to execute it:
Code: Select all
# Unmount all ISO, SFS, 2FS, 3FS and 4FS
/usr/sbin/UnMount_all_ISO_files
sleep .2
# All loaded/mounted Files should be unmounted now, so try to unmount all drives
for MNTPT in `mount | grep '^/dev/' | grep -vE '^/dev/loop|^/dev/ram' | cut -f 3 -d ' ' | grep -v '^/initrd/' | grep -v '^/$' | tr '\n' ' '`
do
unmount_drive
done
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
By the way:
You can see this working in combination in L.A.S.S.I.E. 002, when doing a right-click onto a drive icon and choosing to shutdown the computer (only in L.A.S.S.I.E. 002).
It first unloads all SFS Files that are mounted in the pup_ro mount points, then all ISO, SFS, 2FS, 3FS and 4FS Files under /mnt and at last it unmounts all mounted drives.
Finally the Shutdown-GUI appears on the Screen and you can choose to reboot or shutdown.
You can see this working in combination in L.A.S.S.I.E. 002, when doing a right-click onto a drive icon and choosing to shutdown the computer (only in L.A.S.S.I.E. 002).
It first unloads all SFS Files that are mounted in the pup_ro mount points, then all ISO, SFS, 2FS, 3FS and 4FS Files under /mnt and at last it unmounts all mounted drives.
Finally the Shutdown-GUI appears on the Screen and you can choose to reboot or shutdown.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
Put the code into script /usr/bin/xwin above that code.nic007 wrote:Thanks RSH. Just a little follow up - Puppy's welcome message seems to "hold back" the scripts in the start-up folder until it closes. How can I get rid of the welcome screen or shorten the time it pops up. Thanks
Code: Select all
#now done in /etc/rc.d/rc.modules...
##alsa sound setup...
#if [ "`cat /etc/modprobe.conf | grep 'snd\-card\-0'`" = "" ];then
# #auto option created by BK for fast operation, less questions...
# alsaconf --auto
#fi
More to your question in a few minutes. Need to search for the code.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
(Have you noticed my previous additional posts?)
Ok.
File /usr/sbin/delayedrun contains the code:
Just comment it out = #welcome1stboot & #110412 now in /usr/sbin.
To get rid of the personal settings popup gui create file, /tmp/etc/personal_settings_popup_disabled when remastering offers option to edit /tmp/etc - it's just an empty file.
Ok.
File /usr/sbin/delayedrun contains the code:
Code: Select all
#if [ -c /dev/mixer ];then #110113 test for sound ready, see /etc/init.d/10alsa.
# aplay /usr/share/audio/2barks.au &
# #wavplay /usr/share/audio/2barks.wav &
# RETAPLAY=$?
# PIDAPLAY=$!
#fi
welcome1stboot & #110412 now in /usr/sbin
To get rid of the personal settings popup gui create file, /tmp/etc/personal_settings_popup_disabled when remastering offers option to edit /tmp/etc - it's just an empty file.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
Feedback - using a remaster of puppy 412 I ran into the following problems. Placing RSH's mount script in xwin as advised, my puppy won't start X. Starting X message and then nothing happens. Alright back to keeping the script in startup folder, works but clicking on the first partition icon and three instances of the explorer window opens. I got rid of the welcome message by uncommenting the relevant section in delayedrun script (probably not the correct way but it works).
My delayedrun file is slightly different in that the location of the welcome1stboot's htm file is stipulated ('usr/share/doc). Nevermind, I actually uncommented that whole section before I actually saw your reply here and the message does not show now. See the other problems I ran into in my previous post.RSH wrote:(Have you noticed my previous additional posts?)
Ok.
File /usr/sbin/delayedrun contains the code:Just comment it out = #welcome1stboot & #110412 now in /usr/sbin.Code: Select all
#if [ -c /dev/mixer ];then #110113 test for sound ready, see /etc/init.d/10alsa. # aplay /usr/share/audio/2barks.au & # #wavplay /usr/share/audio/2barks.wav & # RETAPLAY=$? # PIDAPLAY=$! #fi welcome1stboot & #110412 now in /usr/sbin
To get rid of the personal settings popup gui create file, /tmp/etc/personal_settings_popup_disabled when remastering offers option to edit /tmp/etc - it's just an empty file.
I'm sorry for that.nic007 wrote:Feedback - using a remaster of puppy 412 I ran into the following problems. Placing RSH's mount script in xwin as advised, my puppy won't start X. Starting X message and then nothing happens. Alright back to keeping the script in startup folder, works but clicking on the first partition icon and three instances of the explorer window opens. I got rid of the welcome message by uncommenting the relevant section in delayedrun script (probably not the correct way but it works).
My Puppies are Remasters of 5.2 and above. Never used a Puppy 4, so I can't say anything on that.
Btw: if placing the Script into xwin, do not place the complete code. Make a extra script from that code, name it mnt_all_drives and place it into /usr/sbin.
Then just put into xwin: /usr/sbin/mnt_all_drives &
Note the '&', which lets a script continue while the called script still runs/executes.
RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]