You are not logged in.

#1 2010-12-07 02:05:10

shadowjig
Member
Registered: 2010-12-07
Posts: 4

Disable USB boot filesystem automount

I have installed Arch linux on a Seagate Dockstar.  The bootloader is modified so it runs Arch linux from a USB drive.  Once booted, all attached USB drives automatically mount to /media including the USB drive that has the bootable OS installed.

My question is....can I disable the boot filesystem from automounting to /media?  Or can I make it read only in /media?  The reason I want to do this is some other users will not accidentially delete/modify the OS or files.

Thank you

Last edited by shadowjig (2010-12-07 02:13:39)

Offline

#2 2010-12-07 02:29:27

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Disable USB boot filesystem automount

What file manager/desktop environment are you using?

Offline

#3 2010-12-07 03:24:45

shadowjig
Member
Registered: 2010-12-07
Posts: 4

Re: Disable USB boot filesystem automount

thestinger wrote:

What file manager/desktop environment are you using?

None, it's a headless system.  No file manager or desktop environment just the command line interface.

Offline

#4 2010-12-07 03:31:09

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Disable USB boot filesystem automount

Do you have hal running? afaik udev doesn't automount stuff unless it's told to do it via dbus/udisks

Offline

#5 2010-12-07 04:07:26

shadowjig
Member
Registered: 2010-12-07
Posts: 4

Re: Disable USB boot filesystem automount

thestinger wrote:

Do you have hal running? afaik udev doesn't automount stuff unless it's told to do it via dbus/udisks

hal is not installed
afaik is not installed
autofs is installed but not running
udev is running and this is what I believe is automounting in /media

I'd assume that I'd need to configure the udev rules.  However, I wanted to understand what I'm doing before I make any changes.  I'm afraid I might cause the OS to stop booting.

Offline

#6 2010-12-07 12:05:01

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: Disable USB boot filesystem automount

I think you need to provide a little more information. It is guesswork now

-  How was the bootloader ' modified'?

- How did you make arch 'Once booted, all attached USB drives automatically mount to /media i...' OS installed.'   Arch by default isn't set to do automounting. There are probably entries in /etc/fstab, or an udev rule set in /etc/udev/rules.d/. try commenting out relevant entries in fstab, or renaming the rule file. Arch doesn't require any rules files to boot.

- Who do you want to prevent access to what? 'some users' Does that mean some others should have access? Depending on that you can use permissions, mount options, or unmounting after boot in /etc/rc.local.

see:

https://wiki.archlinux.org/index.php/Udev
http://www.reactivated.net/writing_udev_rules.html

Last edited by rwd (2010-12-07 14:25:14)

Offline

#7 2010-12-10 00:31:47

shadowjig
Member
Registered: 2010-12-07
Posts: 4

Re: Disable USB boot filesystem automount

rwd wrote:

-  How was the bootloader ' modified'?

It's modified by nandwriting uboot to the Seagate DockStar.  Instructions are here:
http://plugapps.com/index.php5?title=Pl … ot_on_mtd0

rwd wrote:

- How did you make arch 'Once booted, all attached USB drives automatically mount to /media i...' OS installed.'

udev is definately automounting the USB drives to /media.

I've read those but I can't find anything to prevent udev from mounting a specific drive.  There's a generic rule to mount "sd[a-z][0-9]" which will catch all USB drives connected including the bootable drive.  I just want to be able to write a later rule to remove the bootable drive (from mounting to /media) before udev completes.

Last edited by shadowjig (2010-12-10 00:32:37)

Offline

Board footer

Powered by FluxBB