How to automount a hd partition at boot?
How to automount a hd partition at boot?
What's the most elegant way to make sure a partition on my hard drive is mounted every time I start Puppy?
Hello chris667
On partition hdb2 (sdb2 with the newer kernels) i have all of my Downloads, Pictures, docs etc
So i create a directory called: dudesdata in /root of whatever Puppy i use,
then i open /etc/rc.d/rc.local in a text editor and enter the following command:
changing the hdb2 to sdb2 if the Puppy is a version with the newer kernel.
Now whenever i boot into Puppy, that partition is automatically mounted,
all i need to do is click on the directory dudesdata and i am in partition hdb2 ( or sdb2)
Hope this helps
CatDude
.
I don't know about the most elegant way, but here is what i normally do.chris667 wrote: What's the most elegant way to make sure a partition on my hard drive is mounted every time I start Puppy?
On partition hdb2 (sdb2 with the newer kernels) i have all of my Downloads, Pictures, docs etc
So i create a directory called: dudesdata in /root of whatever Puppy i use,
then i open /etc/rc.d/rc.local in a text editor and enter the following command:
Code: Select all
mount /dev/hdb2 /root/dudesdata
Now whenever i boot into Puppy, that partition is automatically mounted,
all i need to do is click on the directory dudesdata and i am in partition hdb2 ( or sdb2)
Hope this helps
CatDude
.
Create a little script to mount the partition, then put the script in /root/Startup. This way, the script will run each time you boot. Here is the script I use to mount sda3
#!/bin/sh
if [ ! -d /mnt/sda3 ]
then
mkdir /mnt/sda3
fi
mount -t ext3 /dev/sda3 /mnt/sda3
If you are not sure how to create an executable script, just add a request for info here.
#!/bin/sh
if [ ! -d /mnt/sda3 ]
then
mkdir /mnt/sda3
fi
mount -t ext3 /dev/sda3 /mnt/sda3
If you are not sure how to create an executable script, just add a request for info here.
Spup Frugal HD and USB
Root forever!
Root forever!
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
Interesting.CatDude wrote:Hello chris667
I don't know about the most elegant way, but here is what i normally do.chris667 wrote: What's the most elegant way to make sure a partition on my hard drive is mounted every time I start Puppy?
On partition hdb2 (sdb2 with the newer kernels) i have all of my Downloads, Pictures, docs etc
So i create a directory called: dudesdata in /root of whatever Puppy i use,
then i open /etc/rc.d/rc.local in a text editor and enter the following command:changing the hdb2 to sdb2 if the Puppy is a version with the newer kernel.Code: Select all
mount /dev/hdb2 /root/dudesdata
Now whenever i boot into Puppy, that partition is automatically mounted,
all i need to do is click on the directory dudesdata and i am in partition hdb2 ( or sdb2)
Hope this helps
CatDude
.
But I suppose you have a /mnt/hdb2 already, so the mount statement on /mnt/hdb2 could be put directly in rc.local.
But I did a test.
sdb1 was already mounted on /mnt/sdb1.
I created a /root/my-data and gave in a console a mount of sdb1 to my-data.
To my surprise this worked.
So I am now with /dev/sdb1 mounted at two different mounting points.
Is this normal?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
Nice idea of code.DaveS wrote:Create a little script to mount the partition, then put the script in /root/Startup. This way, the script will run each time you boot. Here is the script I use to mount sda3
#!/bin/sh
if [ ! -d /mnt/sda3 ]
then
mkdir /mnt/sda3
fi
mount -t ext3 /dev/sda3 /mnt/sda3
If you are not sure how to create an executable script, just add a request for info here.
I have been looking for something like this.
I have an external HDD which has a partition sdb1.
At boot it isn't mounted but visible on the desktop.
A program needs the partition mounted and sometimes I forget to see if it is.
So I have been trying to find a way to test if the partition is mounted (on /mnt/sdb1) and if not mount it.
I didn't succeed even when trying the idea of your code.
I am not familiar with scripting I must say.
Do you have an idea how to do this?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
thanks daveDaveS wrote:Create a little script to mount the partition, then put the script in /root/Startup. This way, the script will run each time you boot. Here is the script I use to mount sda3
#!/bin/sh
if [ ! -d /mnt/sda3 ]
then
mkdir /mnt/sda3
fi
mount -t ext3 /dev/sda3 /mnt/sda3
If you are not sure how to create an executable script, just add a request for info here.
i have my opera in solitary confinement on it's own partition because, perhaps only when in cahoots with my very naughty internal card reader, it is a known past corrupter of files. so this automount at boot is very nice.
for Beem here is my altered script for comparison and as an additional example
Code: Select all
#!/bin/sh
if [ ! -d /mnt/sdb2 ]
then
mkdir /mnt/sdb2
fi
mount -t ext2 /dev/sdb2 /mnt/sdb2