You are not logged in.

#1 2009-03-24 07:13:13

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Mounting Partitions (Ubuntu Way)

My HDD's partition listing is as follows:

sda2 | ext4 | /
sda5 | ext3 | disk01
sda6 | ext3 | disk02

Everytime I want to use disk01 and disk02 I need to mount them somewhere in /mnt/sth. and then use them, while I want them to be mounted automatically like Nautilus in Ubuntu which asks for a password and then mounts them.
Please tell me what to do....

Last edited by mahan_h (2009-03-24 10:29:34)

Offline

#2 2009-03-24 09:28:04

deej
Member
Registered: 2008-02-08
Posts: 395

Re: Mounting Partitions (Ubuntu Way)

Create two directories in /mnt: disk01 & disk02, for example.

Edit your /etc/fstab file and add:

/dev/sda5               /mnt/disk01       ext3 user,auto       0       1
/dev/sda6               /mnt/disk02       ext3 user,auto       0       1

Reboot.

Let us know if this works OK.

Deej

Last edited by deej (2009-03-24 09:28:29)

Offline

#3 2009-03-24 09:35:08

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

Yes, In know about that.
but what I meant was that Ubuntu creates temporary folders while mounting and deletes them while user unmounts the disk.
Also, it asks for admin password upon mounting.
How to make these procedures happen?
How to reference Nautilus (which identifies my disks and shows them but does not let me browse the content)?

Offline

#4 2009-03-24 10:24:03

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

Its Interesting...
Whenever I mount the drive by command, the Nautilus does not show the partition in 'Places' bar any more, and while I umount that it shows it again but can not browse it, nor asks for any password when I click on the icon.

Last edited by mahan_h (2009-03-24 10:24:37)

Offline

#5 2009-03-24 10:53:10

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

Even the disk mounter applet can not mount my partitions...
Seems the only choice is using the coomand.
BUT WHY?

Offline

#6 2009-03-24 11:01:40

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

This issue is posted here too.

http://bbs.archlinux.org/viewtopic.php?id=67471

Offline

#7 2009-03-24 11:41:48

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Mounting Partitions (Ubuntu Way)

Please use the "edit" feature instead of posting multiple times in a row.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#8 2009-03-24 12:19:27

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

I wanted the post to come upward in the listing to let more people read and comment

Offline

#9 2009-03-24 12:41:55

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: Mounting Partitions (Ubuntu Way)

nvm, what I said earlier, patience is a vitrtue though. Bumping threads here will just get you no help.

Last edited by jacko (2009-03-24 12:43:08)

Offline

#10 2009-03-24 12:42:25

Shunpike
Member
From: France
Registered: 2009-01-28
Posts: 47

Re: Mounting Partitions (Ubuntu Way)

Then please read http://wiki.archlinux.org/index.php/Forum_Etiquette, because Bumping it is not considered good practice. Neither is cross-posting, by the way.

Offline

#11 2009-03-24 13:18:33

CheesyBeef
Member
Registered: 2008-06-04
Posts: 190

Re: Mounting Partitions (Ubuntu Way)

pacman -S pcmanfm
gpasswd -a your_user storage

Add this to your /etc/PolicyKit/PolicyKit.conf (make sure you change to your username in the second line)

<config version="0.1">
    <match user="brian"> <!-- replace with your login or delete the line if you want to allow all users to manipulate devices (keep security issues in mind though) -->
               <match action="org.freedesktop.hal.storage.*">
                       <return result="yes"/>
               </match>
               <match action="hal-storage-mount-fixed-extra-options"> <!-- for internal devices mounted with extra options like a wished mount point -->
                       <return result="yes" />
               </match>
               <match action="hal-storage-mount-removable-extra-options"> <!-- for external devices mounted with extra options like a wished mount point -->
                       <return result="yes" />
               </match>
       </match>  <!-- don't forget to delete this line if you deleted the first one -->
</config>

More info here: http://wiki.archlinux.org/index.php/HAL

Last edited by CheesyBeef (2009-03-24 13:19:22)

Offline

#12 2009-03-24 14:33:06

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Mounting Partitions (Ubuntu Way)

'arch' is _not_ 'ubuntu'.
If you feel compelled to do things the ubuntu way - then I would stay with ubuntu.
Why not accept that arch is different (in many ways, some for better (I would say most, but that's just my personal opinion), some for worse) and do things the 'arch way'?

As for 'automounting' - I'm sorry (and I may well be alone in this), but what's wrong with the time-honoured 'mount'-command (or pmount)? To me - automounting comes from the land of Redmond and I have never, ever seen the need for it. On the contrary - I feel a lot happier actually having to do a 'umount' rather than just disconnecting a usb storage device (in particular). That way I _know_ that everything is properly flushed.

As for disk partitions, set them up in your fstab with 'noauto' and you can mount them whenever you need to. With automatic mountpoints, you are never quite sure exactly _where_ they will be mounted. By explicitly naming them - there is no confusion.

Last edited by perbh (2009-03-24 14:39:03)

Offline

#13 2009-03-24 15:01:28

ljshap
Member
From: Ossining, NY
Registered: 2008-01-23
Posts: 160

Re: Mounting Partitions (Ubuntu Way)

perbh wrote:

'arch' is _not_ 'ubuntu'.
If you feel compelled to do things the ubuntu way - then I would stay with ubuntu.
Why not accept that arch is different (in many ways, some for better (I would say most, but that's just my personal opinion), some for worse) and do things the 'arch way'?

As for 'automounting' - I'm sorry (and I may well be alone in this), but what's wrong with the time-honoured 'mount'-command (or pmount)? To me - automounting comes from the land of Redmond and I have never, ever seen the need for it. On the contrary - I feel a lot happier actually having to do a 'umount' rather than just disconnecting a usb storage device (in particular). That way I _know_ that everything is properly flushed.

As for disk partitions, set them up in your fstab with 'noauto' and you can mount them whenever you need to. With automatic mountpoints, you are never quite sure exactly _where_ they will be mounted. By explicitly naming them - there is no confusion.

I agree with the spirit of your comments, although I use autofs for automounting.  Whats great about autofs is that is ready to go as soon as I boot into bash and does not depend on any particular desktop or file browser.  For me its the best of all worlds, the convenience of automounting, no stupid pop-ups and allows you to give all your "toys" their own name based on serial number (or whatever).  Since you know where devices are mounted you can create specific rsync or other scripts for backups. You can manually unmount your devices as well.  If it wasn't for autofs, I probably would also manually mount my usb devices.

Most of us here do prefer the Arch Way, since you can do things YOUR way without having to undo it THEIR way.


Live Free or Die !

Offline

#14 2009-03-24 15:19:14

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Mounting Partitions (Ubuntu Way)

with the "ubuntu way" the OP just meant nautilus automounting.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#15 2009-03-24 15:49:32

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: Mounting Partitions (Ubuntu Way)

Are you inside a gnome session ?


English is not my native language .

Offline

#16 2009-03-30 06:41:25

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

with the "ubuntu way" the OP just meant nautilus automounting.

EXACTLY!

Are you inside a gnome session ?

Yes

Offline

#17 2009-03-30 09:54:44

Cilyan
Member
From: Toulouse (FR)
Registered: 2006-08-27
Posts: 97
Website

Re: Mounting Partitions (Ubuntu Way)

Try installing gnome-mount and gksu to see if it unlocks some nautilus features. If not, then it was and Ubuntu-only feature that you won't find here.
Then, you can try pmount with some HAL tweaks, or follow some of the previous posts that give, IMHO very good alternatives (fstab or policykit).

And note that you shall not expect from ArchLinux to support gadgets for any of your needs, but it will give you the power to tweak your system to achieve exactly what you need.

Last edited by Cilyan (2009-03-30 09:56:53)

Offline

#18 2009-04-01 21:49:30

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

Try installing gnome-mount and gksu to see if it unlocks some nautilus features. If not, then it was and Ubuntu-only feature that you won't find here.

Thanx alot Cilyan, but they were already installed.

Then, you can try pmount with some HAL tweaks, or follow some of the previous posts that give, IMHO very good alternatives (fstab or policykit).

working on it!

And note that you shall not expect from ArchLinux to support gadgets for any of your needs, but it will give you the power to tweak your system to achieve exactly what you need.

This is exactly what I need along with a million more..

Offline

#19 2009-04-02 16:54:30

grndrush
Member
From: Hamilton, Ontario, Canada
Registered: 2003-12-28
Posts: 136
Website

Re: Mounting Partitions (Ubuntu Way)

I wanted the post to come upward in the listing to let more people read and comment

Credit given for honesty, at least...

Offline

#20 2009-04-02 21:35:46

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Mounting Partitions (Ubuntu Way)

I use autofs, it's the simplest solution in my opinion. For umounting i use a hotkey bound this simple ruby script:

#!/usr/bin/env ruby

# never umount blacklisted mountpoints
$blacklist = ["/media/yakumo"]

quiet = false
quiet = true if ARGV[0] == "--quiet"

# get current mounts
$mounts = `mount`

def mounted?(path)
  $mounts =~ /on #{Regexp.escape(path)}/
end

# get autofs mount points 
autofs = []

# parse auto.master
File.new('/etc/autofs/auto.master').each_line do |line|
  autofs << line.split()
end

autofs.each do |entry|
  dir = entry.shift
  config = entry.shift

  # parse config
  File.new(config).each_line do |line|
    mount = line.split()[0]
    path = "#{dir}/#{mount}"
    if mounted? path and not $blacklist.include? path
      puts "#{path} mounted, unmounting..." unless quiet
      error = `umount #{path} 2>&1`
      if error != ''
        system("zenity --error --text '#{error}'") unless quiet
      else
        system("zenity --info --text '#{path} cleanly unmounted'") unless quiet
      end
    end
  end
end

I can blacklist stuff I don't want umounted, and it gives me nice feedback on whether my sticks etc are safe to unplug. I know I could send USR1 to automount, but I prefer it this way.

Offline

#21 2009-04-03 20:52:52

mahan_h
Member
Registered: 2009-03-11
Posts: 53

Re: Mounting Partitions (Ubuntu Way)

I use autofs, it's the simplest solution in my opinion. For umounting i use a hotkey bound this simple ruby script:

Thanx for the reply, I'll try that for sure.
It seems that Ubuntu does not use the autofs or automount as the packages were not installed.

But the question is that how do Ubuntu and some other distros do that (in Gnome:Nautilus, mounting partitions upon need while acknowledging your administration rights by requesting the password).

I mean in the open source world it should not be hidden or a mistery. Besides, it looks like a trivial issue and although I couldn't find the answer by a simple googling but there should be some guys here who know how.

Doesn't it has to be handled automatically by gnome or nautilus?

Last edited by mahan_h (2009-04-03 20:53:46)

Offline

Board footer

Powered by FluxBB