Mount usb disk after boot

Hi,
How can I mount automatically an usb disk after boot?
Any suggestion would be appreciated.
Thanks

Read this fine article and use it to set up a udev rule, to specifically name the device.  (Otherwise you may never know where it pops up in the disk naming scheme.)
Also note -- after reading the article -- there are plenty of examples of rules in /etc/udev/ files that may further help.

Similar Messages

  • [SOLVED][XFCE] Cannot mount usb disks & manage network connections

    Hi guys,
    I'm using XFCE with 3.3.1-1 kernel. Since yesterday I'm not able anymore to automatically mount usb disks,  manage my WiFi networks (networkmanage connects to the default access point but I can't select another AP nor editing my settings). I'm also prompted to type my password when I clik on the shutdown icon;
    So it seems I lost some privileges but I can't figured out why...
    I still belong to the same grousp as before:
    [root@archLaptop sclarckone]# groups sclarckone
    lp wheel games video audio optical storage scanner power users
    Does anybody has an idea where to take a look?
    Thanks
    Last edited by sclarckone (2012-04-15 20:54:38)

    Me too. Start a new thread?
    Edit; Nope, this worked for me https://bbs.archlinux.org/viewtopic.php?id=142110
    Last edited by Glinx (2012-05-25 11:44:47)

  • GNOME, nautilus, devicekit-disks: mount USB disk

    Hi,
    I recently upgraded and have now nautlius 2.28.2-1 together with devicekit-disks 009-1 installed.
    As usual mounting/unmounting USB disks in nautilus stopped working. I searched the wiki, forums, bugs and google to gather information about this topic, but you know ...
    When I try to mount a disk (they all show up in nautilus) nautilus pops up an error declaring me "Not Authorized". After quite some reading I think nautilus now uses devicekit-disks to actually mount my USB disks, so I tried to mount it with devicekit-disks:
    [resi@nomad ~]$ devkit-disks --mount /dev/sdc
    Mount failed: Not Authorized
    In older versions of nautilus I used to edit some files in /etc to grant myself permissions (PolicyKit.conf), but this does not work anymore.
    I found a hint and edited /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy (this one is coming with devicekit-disks) and modified the default for the actions org.freedesktop.devicekit.disks.filesystem-mount action:
    <allow_any>yes</allow_any>
    Having done so I can now mount the USB disks using nautilus, devicekit-disks or palimpsest (suffering from the same "Not Authorized" problem). Unmounting has a little flaw though, it seems like nautilus tries to eject the medium when unmounting, but then again its "Not Authorized" to do so.
    However, this is the only solution I could come up with. Since the file I modified will probably be replaced without notice during the next upgrade I fear I will have to go all the way again, not remembering anymore what I did to fix this (otoh, after writing this I probably will).
    And since the values in org.freedesktop.devicekit.disks.policy are declared as defaults (and by the fact it lives under /usr) I assume there has to be a site configuration file somewhere in /etc.
    Where should I but my customizations? I mean, whats the proper way to do so?
    Thanks,
    Christoph
    P.S.: I like nautilus, it makes me unhappy to use thunar/pmount/whatever to mount my disks.

    me again ... this whole *kit stuff seems so odd to me.
    I finally read all the devicekit, then the policykit docs, Syu-ed and have now devicekit-disks 009-3 installed.
    Using polkit-actions without arguments prints a list of registered actions (known to policykit). This list was pretty short:
    [resi@nomad ~]$ polkit-action
    org.freedesktop.policykit.read
    org.freedesktop.policykit.revoke
    org.freedesktop.policykit.grant
    org.freedesktop.policykit.modify-defaults
    PolicyKit considers all *.policy files under /usr/share/PolicyKit/policy/, only the policykit package installs its files (well, its one file) there.
    devicekit-disks (and probably some other packages providing *.policy files) seems to forget about that. So I added a symlink:
    [root@nomad policy]# ln -s /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy /usr/share/PolicyKit/policy/
    Thats not enough, the file seems to be out of date. I had to replace all auth_admin_keep defaults with auth_admin_keep_session until the file validated.
    And hurray:
    [resi@nomad ~]$ polkit-action
    org.freedesktop.policykit.read
    org.freedesktop.policykit.revoke
    org.freedesktop.policykit.grant
    org.freedesktop.policykit.modify-defaults
    org.freedesktop.devicekit.disks.filesystem-mount
    org.freedesktop.devicekit.disks.filesystem-mount-system-internal
    org.freedesktop.devicekit.disks.filesystem-check
    org.freedesktop.devicekit.disks.filesystem-check-system-internal
    org.freedesktop.devicekit.disks.filesystem-unmount-others
    org.freedesktop.devicekit.disks.filesystem-lsof
    org.freedesktop.devicekit.disks.filesystem-lsof-system-internal
    org.freedesktop.devicekit.disks.drive-eject
    org.freedesktop.devicekit.disks.drive-detach
    org.freedesktop.devicekit.disks.change
    org.freedesktop.devicekit.disks.change-system-internal
    org.freedesktop.devicekit.disks.drive-ata-smart-refresh
    org.freedesktop.devicekit.disks.drive-ata-smart-selftest
    org.freedesktop.devicekit.disks.drive-ata-smart-retrieve-historical-data
    org.freedesktop.devicekit.disks.luks-unlock
    org.freedesktop.devicekit.disks.luks-lock-others
    org.freedesktop.devicekit.disks.linux-md
    org.freedesktop.devicekit.disks.cancel-job-others
    org.freedesktop.devicekit.disks.inhibit-polling
    org.freedesktop.devicekit.disks.drive-set-spindown
    polkit-auth shows my authorizations, thus:
    [resi@nomad ~]$ polkit-auth | grep mount
    org.freedesktop.devicekit.disks.filesystem-mount
    org.freedesktop.devicekit.disks.filesystem-mount-system-internal
    org.freedesktop.devicekit.disks.filesystem-unmount-others
    It seems to me that I am authorized for all actions listed above, I guess thats because this user is in both the wheel and root groups.
    However, when I try to actually mount something nothing has changed.
    [resi@nomad ~]$ devkit-disks --mount /dev/sdc
    Mount failed: Not Authorized
    Since policykit is now properly configured I can use polkit-action or polkit-gnome-authorization to modify the default values in the way polkit expects me to (not tampering with with the *.policy files).
    [resi@nomad ~]$ polkit-action --action org.freedesktop.devicekit.disks.filesystem-mount
    action_id: org.freedesktop.devicekit.disks.filesystem-mount
    description: Mount a device
    message: Authentication is required to mount the device
    default_any: yes (factory default: no)
    default_inactive: yes (factory default: no)
    default_active: yes
    But even now mounting fails because I'm not authorized.
    Back to the start, if I change the factory defaults in org.freedesktop.devicekit.disks.policy mounting succeeds.
    I think there might be 2 bugs involved here:
    1.) missing links to policy files in /usr/share/PolicyKit/policy/
    2.) policykit fails to consider overrides for factory defaults
    What do you think?

  • Is there any way to browse a USB disk while booted from OSX install disk?

    My hard drive died on me the other day (the mac partition anyway) and I'm trying to use a data recovery program to get my data back. I have the application on my USB key, and I assumed I'd then be able to use the OS X installer disk to boot up and then run this program from the USB drive but the installer doesn't let me browse folders or quit... Is there any way to do this? I don't have another mac to firewire or anything so it's either this or order a recovery program on a bootable disk, which I really don't want to do as I need this done fast... Any suggestions?

    Your utility for data recovery usually should have come with a Mac bootable DVD with its own application on it. If it didn't, contact them for a disc that will boot your Mac with the utility on it. Your other option is to get a Firewire hard drive, partition it, and install the operating system there on one partition large enough for the operating system, while leaving the other partition large enough to recover the entire unbootable hard drive.
    Partitioning is described here, and will WIPE your entire hard drive:
    http://docs.info.apple.com/article.html?artnum=61301

  • Cannot  mount USB disk in SIngle-user mode (solaris 10)

    Hi all ,
    I need some help please :
    I can read/write to my USB disks when i'm in muti-user mode but when to I swith to single-user mode ( init S ), I cannot mount it.
    in Single-user mode , i started volume management daemon :
    #/etc/init.d/volgmt start
    #volcheck
    but i'm still not able to mount it.
    I tried to mount manually:
    #mount /dev/dsk/c2t0d0p0 /testpoint , i have this error: < mount : not a UFS magic number ( 0x0) , dev/dsk/c2t0d0p0 is not of this fstype.
    My system recognizes the USB device though in single-user mode:
    This is an output of #iostat -En
    c2t0d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
    Vendor: BUFFALO Product: ClipDrive Revision: 2.00 Serial No:
    Size:0.07GB <65339392 bytes>
    Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
    Illegal Request: 1 Predictive Failure Analysis: 0

    Hi ,
    thanks for your advice. My problem is resolved.
    The USB drive was actually a FAT filesystem.
    so I did # mount -F pcfs /dev/dsk/c2t0d0p0:c /testpoint and everything went fine
    I can read/write to my USB disks when i'm in
    muti-user mode but when to I swith to single-user
    mode ( init S ), I cannot mount it.
    in Single-user mode , i started volume management
    daemon :
    /etc/init.d/volgmt start
    #volcheck
    but i'm still not able to mount it.It probably requires other items to be started
    first.
    I tried to mount manually:
    #mount /dev/dsk/c2t0d0p0 /testpoint , i have
    this
    error: < mount : not a UFS magic number ( 0x0) ,
    dev/dsk/c2t0d0p0 is not of this fstype.
    Looks like it's assuming UFS. If this is a pcfs
    filesystem, give it the type on the mount line.
    # mount -F pcfs /dev/dsk/c2t0d0p0 /testpointYeah, this was the right command, I had to specify option < -F pcfs >.
    but I read somethere on this forum i had to specify :c as the drive for FAT at the end of c2t0d0p0 , so the full command was:
    # mount -F pcfs /dev/dsk/c2t0d0p0:c /testpoint
    >
    DarrenThanks,
    Sakolan.

  • Can't mount USB disk with the atribute of  fix and read-only

    Hello All,
    I have a usb disk which is set as fix(non-removalbe) and read-only. I tried to connect it to Macbook version 10.4.11 ,but it failed to mount the disk. However, connecting to 10.5.X and windows XP work fine. I am wondering is it a bug specifically in 10.4.11 only ? Could I get any patch for this problem ?
    Thanks,
    Ying

    HI Ying and Welcome to Apple Discussions ...
    Try repairing disk permissions.
    Quit any open applications/programs. Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac.
    Carolyn

  • Eject usb disk after Timemachine backup done! But SpotLight prevent!

    Hi, all
    OS: 10.8.2
    How can I disable Spotlight indexing the Timemachine volume ?
    After I backup with TimeMachine, I can't eject the usb disk because the SpotLight(mds daemon) is indexing on the usb disk, How Can I disable this. I don't want to plug in my usb disk all the way I am using the macbook pro. And I don't want to completely disable spotlight.
    I have try mdutil -i off -d /Volumes/TimeMachineV1
    but it failed, says can't disabled on the tm volume, ***?!

    I would just let the indexing complete - it will stop indexing with the drive disconnected and begin indexing again when the drive is connected. It may take a couple of hours or more to fully index the drive the first time but it should be easy going after the drive is first indexed.
    I'd just wait it out - it shouldn't take too long.
    Clinton

  • Can not mount USB disks with Disk utulity

    Today I received finally received the new Airport Extreme. I had no problems installing it in my WDS wireless net and combining it with the Airport Express.
    BUT... mounting disk does not work.
    I have 3 USB 2.0 Disk: 2 x Maxtor and one WD. All of them are seen by the Airport utility, but do not show up in the Disk Utilty on none of my Macs.
    I realy tried everything:
    - connecting them all at the same time using a USB 2.0 hub,
    - connecting them one by one using an USB cable,
    - reformating on my mac using Mac OS Extended (journaled) and connecting them,
    - renaming the names of the disk to simple names: no space, no numbers,
    - renaming the BaseStation.
    No result, the onlything I see apearing in the Disk Utility Menu is the name of the BaseStation. If I click on this, a "Login" dialog box is displayed, if I try to login (all options tested) no result, and after a long time-out sometimes a message is displayed Not able to mount "drive-name.
    Is there somebody who knows what to do?
    Regards, Marc
    2 x iMac G5; 2 x MacBook, iMac G4   Mac OS X (10.4.8)  

    After you reformatted did you by chance add any files while directly attached to your mac.
    Network drives won't show in disk utility, use airport disk utility to find them and have them mounted or use the network list in your finder.

  • How to select OS X startup disk after booting up in 8.6

    I recently purchased an old iBook G3 (original clamshell model) to run some old Mac games I had laying around (was in a nostalgic mood I guess). It came with OS 8.6 and I installed an old copy of OS X 10.2 Jaguar onto it. It wouldn't let me run in the "Classic" environment, as it has OS 8.6, not OS 9.x. I found I was able to launch the computer from 8.6 by selecting the 8.6 start up disk, and thought I could try running some of my really old Mac apps. Long story short, once I booted up in 8.6 I've been unable to figure out how to boot back up in 10.2. It's been over 10 years since I last used anything older than Mac OS X, and I don't remember where everything is, and how to change the startup disk back to 10.2.
    If anyone knows, please help. I'd really like to avoid doing a complete system restore if possible.

    Two ways:
    Boot Using OPTION key:
      1. Restart the computer.
      2. Immediately after the chime press and hold down the
          "OPTION" key.
      3. Release the key when the boot manager appears.
      4. Select the desired disk icon from which you want to boot.
      5. Click on the arrow button below the icon.
    Use Startup Disk Preferences:
    Open Startup Disk prefs from System Preferences.
    Select the volume from which you want to start.
    Click on the Restart button.
    Click on Restart again.

  • Cannot mount storage disk after running "reboot -- -r"

    I have a server installed Solaris Sparc u4 and integrated with a storage. When executing "reboot -- -r" or "init 6", the storage disk cannot be mounted after system startup again. The output of console said "
    obtaining access to all attached disks
    mount: /dev/md/emads/dsk/d50 or /home, no such file or directory
    I really added item into /etc/vfstab which is "/dev/md/emads/dsk/d50 /dev/md/emads/rdsk/d50 /home ufs 2 yes global,logging ".
    But, if I use "reboot" instead, the storage disk can be mounted normally.
    I'm so confused. Could you please tell me the cause and solution? Well, I don't wanna use "mountall" every time after the system is rebooted.

    in single user mode, I cannot mount it manually
    ema31166# mountall
    /dev/rdsk/c1t3d0s3 is clean
    /dev/md/rdsk/d6 is clean
    /dev/rdsk/c1t3d0s1 is clean
    /dev/rdsk/c1t1d0s1 is clean
    /dev/md/rdsk/d12 is clean
    checking ufs filesystems
    /dev/md/emads/rdsk/d50: No such device
    Can't open /dev/md/emads/rdsk/d50: No such device
    /dev/md/emads/rdsk/d50: CAN'T CHECK FILE SYSTEM.
    /dev/md/emads/rdsk/d50: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

  • Mounting USB drive after dismounting

    The drive I have connected to the AE shows on my two networked computers. I mostly use it on one of them and have dismounted it from the other. Is there a way to mount it again without disconnect/reconnect?
    I have a program called 'Mount Me' which can recognized an unmounted but plugged in Firewire drive. But it does not see this Airport connected drive.

    The drive I have connected to the AE shows on my two networked computers. I mostly use it on one of them and have dismounted it from the other. Is there a way to mount it again without disconnect/reconnect?
    I have a program called 'Mount Me' which can recognized an unmounted but plugged in Firewire drive. But it does not see this Airport connected drive.

  • Prevent volume mounting after booting

    Is there a way to prevent a particular volume to mount after booting? I boot from one volume but have other volumes-disks that I may want to mount at a specific moment, but I not want the Mac to mount automatically after each booting (a waste of energy, disk usage, noise, and so on). Of course I can manually mount each volume-disk after booting, but what I want is something that prevents them from mounting in the first place after booting or rebooting.
    I remember that could be configured with third party applications used to format disks on Mac OS 9 (Casablanca Works Drive 7, LaCie Silverlining, Prosoft Radialogic, etc) but I do not see how to do it on Mac OS X.
    Thanks.

    Search these forums for automount and see this one, for example, http://discussions.apple.com/thread.jspa?messageID=6112779 Remember to try it at your own risk.

  • Mounting partition fails at boot time, but works after system is up

    **EDIT: ok, I know now the daemon array comes too late. Looks like I have to fiddle with initial ramdisk or mount the partition daemon-style. Which is recommended?**
    I have a fakeraid array which works well with device-mapper. I use dmraid as a daemon to create the nodes.
    No problem when I mount the partition after boot. But now I want to move my /home there, so it has to mount during boot.
    When I have it inside fstab, I get a corrupt superblock error during boot and arch throws me into an maintainance shell.
    What's wrong? Is fstab processed before the daemon array? If that is the case, what would be a good clean way to launch dmraid if it cannot be a daemon?
    Last edited by mindfall (2008-01-24 01:14:58)

    All you should have to do is put dmraid in the HOOKS line in /etc/mkinitcpio.conf and rebuild your kernel (pacman -S kernel26). This will enable you to even have your root partition on the raid array. Edit /etc/fstab to include your home as usual using the device-mapper created raid-set and correct partition.
    Wiki on dmraid

  • [SOLVED] How to automatically mount USB drives with custom mount point

    edit:
    Original title was : 'Unable to mount USB disk via /etc/rc.local', but got changed since the /etc/rc.local problem isn't relevant for me anymore.
    Hello,
    Since I am new to this forum, I'll start off with this :
    Thanks to archlinux, its founder and all its contributors, cause this is the operating system (flavour) that annoys me the least.
    The root problem :
    I want to automount USB storage devices to other places than /media/ and without the need for programs that depend on gnome and the like. As I tried some stuff with hald and such, I didn't really get to a nice and easy to configure solution. Any hints in that direction are always welcome.
    For now, automount of known USB storages devices during boot, will do.
    So the things I tried and didnt work :
    1.
    Provide the disk info to /etc/fstab (via the disks UUID and 'auto' filesystem)
    Add 'mount /mountpoint' to /etc/rc.local
    Result : the mount command in rc.local says '... specify filesystem'
    However, after boot, running /etc/rc.local mounts the USB disks correctly.
    2.
    Provide the disk info to /etc/fstab (via the disks UUID and the correct filesystem)
    Add 'mount /mountpoint' to /etc/rc.local
    Result : pc doesn't get through boot process and gives me the 'ctrl-d to reboot or root passwd for maintenance'
    3.
    Provide no disk info in /etc/fstab
    Add the full mount line to /etc/rc.local (mount -t fs /dev/disks/by-uuid/MyUUID /MyMountpoint )
    Result : don't remember the output of the mount execution, but well, it didn't mount
    However, after boot, running /etc/rc.local mounts the USB disks correctly.
    Is there something that isn't loaded at the time of rc.local execution that I need for mounting of USB devices ? Or why else is this failing ?
    Regards,
    BasiK
    Last edited by BasiK (2009-08-28 07:22:50)

    Thanks for the hint hunterthomson, but the pc I will be using it on, is an own-built HTPC/home file server, so there is no way I want to use a graphical file manager to get the usb disks mounted.
    I tried to figure out a little about udev rules, and I got to do what I wanted to do, so thx for pointing me in that direction Mr.Elendig.
    Btw, I am indeed also using auto-sleep/park disks, but this udev way works perfectly.
    I added two rules files to /etc/udev/rules.d/ :
    The first for a known usb disk (with its volume uuid), with a named mountpoint under my media dir /symbiosis/ :
    [basik@plox ~]$ cat /etc/udev/rules.d/80-usb-utopia.rules
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a",SYMLINK+="usb-%n", GROUP="storage", NAME="%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a",RUN+="/bin/mkdir -p /symbiosis/utopia"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /symbiosis/utopia", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a", RUN+="/bin/umount -l /symbiosis/utopia", OPTIONS="last_rule"
    The second for unknown usb disks, to mount under the same dir. This is simply taken from the archwiki http://wiki.archlinux.org/index.php/Ude … .26_Tricks
    Make sure these rules are executed after the ones for specific usb disks.
    [basik@plox ~]$ cat /etc/udev/rules.d/usb-disks.rules
    KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usb%m", GROUP="storage", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usb%n", GROUP="storage", NAME="%k"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /symbiosis/usb%n"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /symbiosis/usb%n", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /symbiosis/usb%n"
    ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /symbiosis/usb%n", OPTIONS="last_rule"
    These may not be the nicest looking udev rules, but it works for what I wanted to do with it.

  • Script to automatically UNMOUT all disks EXCEPT Booting Disk

    The following script works directly as "AppleScript Editor" script or application (without any extra modification required) to automatically unmount the "Macintosh HD" disk after booting from other external disk:
    set volname to "Macintosh HD" -- # name of target volume 
    set p to (POSIX path of (volname & ":" as alias))'s text 1 thru -2
    set sh to "diskutil umount " & quoted form of p & " &> /dev/null &"
    do shell script sh
    How to modify it (or create a new one from scratch) to unmount all disks (except the booting one, of course), whatever their names and number?
    Better if the script does not issue any confirmation or warning of any kind, but works in the background without any feedback to the user.
    That is great to automatically unmount ALL disks (except the booting one) after rebooting or booting, saving energy, heat, noise and speeding up the Mac performance (eg., when selecting save as, etc, since such unused disks do not show), extending the life of the unused disks.
    Of course, any disk can be later on manually mounted using the Disk Utility at any time, if required.
    Thanks.

    You shouldn't make assumptions about what the names of the volumes are - both the Finder and System Events have terminology to determine if a disk is the startup volume (or a local volume, for that matter), for example:
    tell application "System Events"
      repeat with someDisk in (get disks whose startup is false and local volume is true)
        set someDisk to POSIX path of someDisk
        do shell script "diskutil umount " & quoted form of someDisk & " &> /dev/null &"
      end repeat
    end tell
    Note that if you are unmounting a disk from a standard account you will be prompted for administrator authentication.

Maybe you are looking for