You are not logged in.

#1 2008-05-11 00:38:27

Gauvenator
Member
Registered: 2008-04-03
Posts: 172

[SOLVED]Mounting

Is there a way for me to specify exactly where a certain partition mounts at startup?  It keeps changing from boot-to-boot and is throwing off Amarok, as the files keep changing location.

Last edited by Gauvenator (2008-05-12 23:52:52)

Offline

#2 2008-05-11 05:51:34

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: [SOLVED]Mounting

if you know which device it is you could perhaps set it in the /etc/fstab by creating a mountpoint /mnt/{device}

#/dev/cdrom /mnt/cdrom   iso9660   ro,user,noauto,unhide   0      0
#/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide   0      0
/dev/{device} /mnt/{device} FSTYPE OPTIONS 0 0

stefan


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#3 2008-05-11 09:24:37

Wilku
Member
Registered: 2007-07-04
Posts: 41

Re: [SOLVED]Mounting

I'd say more. You should use the following options user,auto,unhide if you want it to mount automatically at startup and the user should have access to the partition. Godspeed.

Offline

#4 2008-05-11 10:08:51

_Marco_
Member
Registered: 2008-04-21
Posts: 242

Re: [SOLVED]Mounting

stefan1975 wrote:

if you know which device it is you could ...

this is interesting... is there any command to show what are the possible devices?

Offline

#5 2008-05-11 12:52:22

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: [SOLVED]Mounting

_Marco_ wrote:
stefan1975 wrote:

if you know which device it is you could ...

this is interesting... is there any command to show what are the possible devices?

these commands might help if that is what you meant:

$ sudo grep -i dev /var/log/everything
$ sudo dmesg
$ sudo lspci (-tv)
$ cat /proc/devices

stefan


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#6 2008-05-12 14:57:07

dschrute
Member
From: NJ, USA
Registered: 2007-04-09
Posts: 183

Re: [SOLVED]Mounting

If you're using ext2 or ext3 ( and I think xfs ) you should be able to use labels on the partitions.

For example you can set a ext2/3 partition label to SOMELABEL by doing :
e2label /dev/sdc1 SOMELABEL

Then mount it by :
mount -L SOMELABEL /mymountpoint

You can add an entry in fstab like :
LABEL=SOMELABEL    /mymountpoint    ext3    OPTIONS HERE.....

That way it won't matter what device the partion labeled MYPART winds up at, it will go to the same place regardless.  Maybe other fs types also have this, but I always use ext3, so I can't say for sure.

For more info see :
http://linux.die.net/man/8/mount
http://linux.die.net/man/8/e2label
https://help.ubuntu.com/community/RenameUSBDrive

Offline

#7 2008-05-12 22:32:57

Gauvenator
Member
Registered: 2008-04-03
Posts: 172

Re: [SOLVED]Mounting

So should this work in the fstab:

/dev/sdb1 /media/windows HPFS/NTFS user,auto,unhide 0 0

Any other options I should use?  (sorry can't use the labels; it's ntfs)

_Marco_ wrote:

this is interesting... is there any command to show what are the possible devices?

try as root:

fdisk -l

Last edited by Gauvenator (2008-05-12 22:36:38)

Offline

#8 2008-05-12 23:52:06

Gauvenator
Member
Registered: 2008-04-03
Posts: 172

Re: [SOLVED]Mounting

I ended up adding this in the fstab:

/dev/sdb1 /media/windows ntfs user,auto,uid=1000,gid=100 0 0

And now it mounts where I want it to automatically on startup.  Hooray big_smile  Thanks everyone!

Last edited by Gauvenator (2008-05-12 23:53:20)

Offline

#9 2008-05-14 12:34:35

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: [SOLVED]Mounting

if you want write access, use ntfs-3g instead of just ntfs (you have to install the "ntfs-3g" package)


☃ Snowman ☃

Offline

#10 2008-05-14 19:43:20

Gauvenator
Member
Registered: 2008-04-03
Posts: 172

Re: [SOLVED]Mounting

robmaloy wrote:

if you want write access, use ntfs-3g instead of just ntfs (you have to install the "ntfs-3g" package)

Cool I hadn't realized I couldn't write yet.  Saved me some frustration!  Thanks!

Offline

Board footer

Powered by FluxBB