How to mount the data partition on boot? [SOLVED]

Booting, installing, newbie
Post Reply
Message
Author
Barkingmad
Posts: 156
Joined: Fri 21 Nov 2008, 17:20

How to mount the data partition on boot? [SOLVED]

#1 Post by Barkingmad »

Hello

Now, I have done this before but it was some time ago and I can't remember how :oops:

If I have the set up of Puppy on it's own partition and a separate one for user stored stuff how do I have the data partition mount each time Puppy boots? I would be doing this with Tahr 606.

Thanks for any pointers.
Will
Last edited by Barkingmad on Thu 10 Oct 2019, 15:58, edited 1 time in total.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#2 Post by rufwoof »

/etc/fstab
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#3 Post by mikeslr »

There is (used to be) a setting somewhere which would auto-mount partitions other than Puppy's Home partition. But I can't seem to find it.

Installing Startmount, http://www.murga-linux.com/puppy/viewto ... 699#377699 should do the job.

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#4 Post by 666philb »

hi Barkingmad,

from tahrpup onwards the option to mount at boot is available in 'pmount' which is the mount icon on the desktop or find it in the menu
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Script in /root/Startup

#5 Post by davids45 »

G'day,

I have at least one data partition on each computer and to mount these on starting, put a script into the root Startup directory.
On this laptop, to mount my data partition, sda5, it is:
#!/bin/sh
mount /dev/sda5 /mnt/sda5
modprobe coretemp
Where I have a second data partition, I add another 'mount /dev/sd??....' line.

Where Bootmanager no longer works in a Pup (as it once did - a Woof problem??), I now add a line to load the temperature module for the particular computer, hence the final line in my script.

I write the script in the text editor, save it as 'mount_at_boot', make it executable, and save it to my data partition. It then gets copied into the /root/Startup in each new Pup - 'copied' because it doesn't work as a symlink back to the data partition which isn't mounted until the script is run - 'Catch22' sort-of.

David S.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

Is it just me, or is everybody else forgetting this?

Phil's right about pMount.....but the way I access it is to rt-clk any desktop drive icon, and it's the first option in the list; "Run pMount Puppy Drive Mounter".

To me, it's the most logical place to look. You want to (auto)mount a drive, look in the drive's rt-clk menu..... The option only really works from Slacko 570 onwards, or thereabouts; Micko was the first to use the 'new-style' pMount in a release Puppy; click on the 'twistie' in each drive label, then check the 'Auto-Mount at Boot' option.

Simple as that. I do use the same strategy as David in some older Pups (like Precise 571), where the old-style pMount only permitted manual mounting & unmounting. I place a wee script in /etc/init.d, the contents of which get executed at start-up.

Ruffers is right, too. /Etc/fstab has always been the 'traditional' location for setting mount behaviour; this is used more by the mainstream distros, and Linux veterans (it was the 'accepted' way they all learnt to do it in the early days.)

Or, as Mikeslr says, use Startmount 0.5.5, by Micko & tasmod:-

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

It might be nearly a decade old, but it still works fine. It auto-mounts my drives in Racy to this day.....and gives you the option to auto-start apps/programs, too.

It's like so much stuff in Linux; multiple ways to achieve the same outcome. :D


Mike. :wink:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

There is still another way! :)

Similar to davids45's solution, but in /etc/rc.d/rc.local.
Like so:

Code: Select all

mount -t extX /dev/sdaN /mnt/sdaN
(Please adapt X and N to your need.)

Say partition sda2 is formatted in ext4.
Load /etc/rc.d/rc.local in your editor. Then type

Code: Select all

mount -t ext4 /dev/sda2 /mnt/sda2
sleep 0.5s # to give it time to complete the mount correctly.
# else some other (unknown) command may interfere.
Save and exit your editor. Reboot.
That's it.

Now at each boot sda2 will get mounted.
Just make sure you already have a directory called sda2 in /mnt.

The advantage of this approach is that the partition gets mounted a bit earlier in the
process than if the command is in /root/Startup. It may be important if you have scripts
or apps in /root/Startup that need sda2 to be already mounted before they can swing
into action.

IHTH
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Barkingmad
Posts: 156
Joined: Fri 21 Nov 2008, 17:20

#8 Post by Barkingmad »

Thanks, Phil

I've been using Tahr on my main PC since soon after you released it but I've never found that.

last time was with Lupu so I must have done something like Davids45 suggests but using Pmount sounds handier


Thanks again
Will

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#9 Post by 666philb »

musher0 wrote:There is still another way! :)
Similar to davids45's solution, but in /etc/rc.d/rc.local.
this is what pmount does, puts an entry in /etc/rc.d/rc.local or removes it when deselected
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

zagreb999
Posts: 567
Joined: Fri 11 Apr 2014, 06:39
Location: Yugoslavija

tazpuppy-automount

#10 Post by zagreb999 »

regards!

tazpuppy-automount

how to automount in tazpuppy 32
and to see all partitions
in side pane?

thanks

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#11 Post by bigpup »

You need to ask that question in the Tazpuppy topic.
http://murga-linux.com/puppy/viewtopic.php?t=113255
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Post Reply