[SOLVED] Mounted USB stick immediately unmounts itself - why?

Hi all,
I thought I was unable to mount a USB stick, however it does actually mount but then it gets immediately unmounted by something:
# mount /dev/sdd1 /mnt
# ls /mnt
<empty folder>
# umount /mnt
umount: /mnt: not mounted
# mount /dev/sdd1 /mnt && ls /mnt
<contents of USB stick>
# ls /mnt
<empty folder>
Somehow the USB stick is getting automatically *unmounted* almost immediately after I mount it!
I don't have any automounts enabled, so I'm not sure why this would happen.  If I make a different folder (e.g. /root/test) and mount it there then it sticks, it is only the /mnt folder that gets automatically unmounted.
Any idea what's going on?  I've never seen this happen before, and last time I tried this (a week or two ago) it worked fine.
Last edited by Malvineous (2015-03-15 01:15:16)

brebs wrote:Use "mount -v" (i.e. "verbose") to get some feedback - it's most likely not being mounted.
Like I said in my first post, if you run "ls" immediately after the mount then you can see the contents of the USB stick, so it's definitely getting mounted, but waiting only a few hundred milliseconds after the mount reveals it has been unmounted again.  What is causing the unmount is unknown.
brebs wrote:
Immediately after running that mount command, run:
echo $?
To see the return code. It should be 0.
Yes it is zero, because the mount command succeeds.  "ls" wouldn't be able to list the files on the USB stick if the mount failed.  It is something else that is unmounting the folder mere milliseconds after it is successfully mounted, but I don't know where else to look to find out what it could be.
brebs wrote:Also, mounting to /mnt is very weird - you should be mounting a directory *inside* /mnt.
I am mounting inside /mnt, I just used /mnt as an example to keep things simple.
Vain wrote:
I made the same “mistake”. Try running “systemctl status mnt.mount” and see which device the output refers to. For me, it still listed the old device name. Hence, when you mount it, systemd tries to find the (old) device—which it can’t—and thus unmounts your device immediately.
I was too lazy/annoyed to find out how to solve this properly. I rebooted my system.
Interesting idea!  Unfortunately I have nothing listed for this particular mount point.  The only *.mount services on my system are the ones that are mounted at boot (e.g. srv.mount for /srv).  I have the "noauto" option against this mount point in fstab (as USB sticks aren't normally attached to my system when I boot) so sensibly enough I don't seem to have a mount service running for this particular mount point.

Similar Messages

  • Problem mounting usb stick with ISO installed on it [SOLVED]

    I'm experiencing a weird problem regarding mounting usb sticks. Archlinux stopped auto-mounting usb sticks on my machine, but only those that contains an operating system.  Empty or data usb sticks mount without problem.
    A few weeks or month ago, I don't remember exactly, still everything was all right, but due to updates(?) usb sticks won't auto mount any more.
    I have two arch partitions none of them mount usb sticks anymore with operating systems on them.
    Today, I wanted to test a new operating system and write it on my usb stick, and of course I couldn't because arch didn't mount it. Luckily, on my other partitions a few old distos are still installed – I don't use them anymore for years- I booted them up and they mounted the usb stick without problem; it seems only the up-to-date system have problem handling the usb sticks. I have two Arch system installed on two different partitions, Gnome 3 and Enlightenment, both system are up to date.
    Here are some info:
    [mak@myhost ~]$ dmesg | grep -E "sd[a-z]"
    [ 1.369732] sd 2:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
    [ 1.369819] sd 2:0:0:0: [sda] Write Protect is off
    [ 1.369821] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [ 1.369872] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 1.369924] sd 3:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
    [ 1.369982] sd 3:0:0:0: [sdb] Write Protect is off
    [ 1.369985] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    [ 1.370070] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [ 1.371642] sda: sda1 sda2 sda3 sda4 sda5 sda6
    [ 1.372298] sd 2:0:0:0: [sda] Attached SCSI disk
    [ 1.429438] sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 sdb7 sdb8 sdb9
    [ 1.430159] sd 3:0:0:0: [sdb] Attached SCSI disk
    [ 2.244580] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
    [ 2.348031] systemd[1]: Expecting device dev-sdb8.device...
    [ 2.362842] EXT4-fs (sda5): re-mounted. Opts: discard,data=ordered
    [ 3.358252] Adding 2097148k swap on /dev/sdb8. Priority:-1 extents:1 across:2097148k FS
    [ 5.458907] EXT4-fs (sda5): re-mounted. Opts: discard,data=ordered,commit=0
    [ 52.120360] sd 6:0:0:0: [sdc] 15679488 512-byte logical blocks: (8.02 GB/7.47 GiB)
    [ 52.121310] sd 6:0:0:0: [sdc] Write Protect is off
    [ 52.121319] sd 6:0:0:0: [sdc] Mode Sense: 43 00 00 00
    [ 52.122191] sd 6:0:0:0: [sdc] No Caching mode page present
    [ 52.122199] sd 6:0:0:0: [sdc] Assuming drive cache: write through
    [ 52.125825] sd 6:0:0:0: [sdc] No Caching mode page present
    [ 52.125838] sd 6:0:0:0: [sdc] Assuming drive cache: write through
    [ 52.126999] sdc: sdc1 sdc2
    [ 52.131071] sd 6:0:0:0: [sdc] No Caching mode page present
    [ 52.131084] sd 6:0:0:0: [sdc] Assuming drive cache: write through
    [ 52.131093] sd 6:0:0:0: [sdc] Attached SCSI removable disk
    [mak@myhost ~]$
    [root@myhost mak]# fdisk -l
    WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
    Disk /dev/sda: 120.0 GB, 120034123776 bytes, 234441648 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: gpt
    # Start End Size Type Name
    1 2048 18431 8M BIOS boot parti BIOS boot
    2 18432 56641478 27G Linux filesyste sda2
    3 56641536 113264582 27G Linux filesyste sda3
    4 113264640 169887686 27G Linux filesyste sda4
    5 169887744 226510790 27G Linux filesyste sda5
    6 226510848 234441614 3.8G Linux filesyste Spare
    WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
    Disk /dev/sdb: 320.1 GB, 320072933376 bytes, 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: gpt
    # Start End Size Type Name
    1 2048 18431 8M BIOS boot parti Bios boot
    2 18432 54544383 26G Microsoft basic Partition 2
    3 54544384 109070335 26G Linux filesyste Partition 3
    4 109070336 163596287 26G Microsoft basic
    5 163596288 218122239 26G EFI System Partition 5
    6 218122240 272647630 26G Microsoft basic Partition 6
    7 272648192 327174143 26G Linux filesyste Partition 7
    8 327174144 331368447 2G Linux swap Swap
    9 331368448 625142414 140.1G Linux filesyste Storage
    Disk /dev/sdc: 8027 MB, 8027897856 bytes, 15679488 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x5fadc669
    Device Boot Start End Blocks Id System
    /dev/sdc1 * 0 4040703 2020352 0 Empty
    /dev/sdc2 4036 38595 17280 ef EFI (FAT-12/16/32)
    Disk /dev/sdc1: 2068 MB, 2068840448 bytes, 4040704 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x5fadc669
    Device Boot Start End Blocks Id System
    /dev/sdc1p1 * 0 4040703 2020352 0 Empty
    /dev/sdc1p2 4036 38595 17280 ef EFI (FAT-12/16/32)
    [root@myhost mak]#
    [root@myhost mak]# blkid -o list -c /dev/null
    device fs_type label mount point UUID
    /dev/sda1 (not mounted)
    /dev/sda2 ext4 (not mounted) 0a76a275-1798-495b-aa27-732626029de2
    /dev/sda3 ext4 (not mounted) 0e9363ef-3791-409c-8db9-393385007689
    /dev/sda4 ext4 (not mounted) 8f043c02-8b56-4689-a0ee-ed34ccc6f21f
    /dev/sda5 ext4 / 82699b0e-8fe9-41e2-be13-65c798ed8a73
    /dev/sda6 ext4 (not mounted) 3eaab6bf-2d05-4a7b-a6f7-8675e5f18723
    /dev/sdb1 (not mounted)
    /dev/sdb2 ext4 (not mounted) 17069311-9f14-4430-8298-be48194eb874
    /dev/sdb3 ext4 (not mounted) 2e3b383d-3fa7-40df-b52d-c5d07caf252e
    /dev/sdb4 ext4 (not mounted) 9d9b0656-d4ca-4efa-b6f8-1797bd4ead1f
    /dev/sdb5 ext4 (not mounted) 05abf58a-ae6e-4377-9b3d-d6bacd92226d
    /dev/sdb6 ext4 (not mounted) 8d7c6d55-dc47-471f-84f6-aae8864dfdd7
    /dev/sdb7 ext4 (not mounted) b2155741-8f88-4063-bd1b-39b210004b17
    /dev/sdb8 swap <swap> 97cf7cdf-299c-4e0d-a438-c8b79766699c
    /dev/sdb9 ext4 (not mounted) 426648fd-98f5-4fb0-9114-bdbdfea9047c
    /dev/sdc1 udf Sabayon GNOME (not mounted) 2013-07-29-13-08-13-27
    /dev/sdc2 vfat (not mounted) CF68-C2B6
    [root@myhost mak]#
    Thanks for the help.
    jmak
    Last edited by jmak (2013-08-14 00:12:54)

    cfr wrote:
    What is sdc1p? Is that another USB stick? It seems to have an equally weird partition map.
    By the way, you can't create an Arch USB bootable in EFI mode with dd. Obviously don't know about sabayon.
    EDIT: Did you dd to the disk or to a partition? What command exactly did you use? Because it almost looks as if you did something like dd once and create one thing and then dd over the top of one of the partition so you've got a partition which itself has a partition map. Not sure that's possible but it sure looks weird.
    I would wipe the key and start over.
    I don't know what is that. It is a partition on the same usb stick, it was the “dd” that made that partition automatically, I guess. When I burn images into usb, I always use this command:
    # dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx && sync
    I used this when burned Sabayon and it works perfectly.
    The problem is that Arch can't auto-mount its own installation usb either. I put the arch install usb in and I get the following output:
    [root@myhost mak]# blkid -o list -c /dev/null
    device fs_type label mount point UUID
    /dev/sda1 (not mounted)
    /dev/sda2 ext4 (not mounted) 0a76a275-1798-495b-aa27-732626029de2
    /dev/sda3 ext4 (not mounted) 0e9363ef-3791-409c-8db9-393385007689
    /dev/sda4 ext4 (not mounted) 8f043c02-8b56-4689-a0ee-ed34ccc6f21f
    /dev/sda5 ext4 / 82699b0e-8fe9-41e2-be13-65c798ed8a73
    /dev/sda6 ext4 (not mounted) 3eaab6bf-2d05-4a7b-a6f7-8675e5f18723
    /dev/sdb1 (not mounted)
    /dev/sdb2 ext4 (not mounted) 17069311-9f14-4430-8298-be48194eb874
    /dev/sdb3 ext4 (not mounted) 2e3b383d-3fa7-40df-b52d-c5d07caf252e
    /dev/sdb4 ext4 (not mounted) 9d9b0656-d4ca-4efa-b6f8-1797bd4ead1f
    /dev/sdb5 ext4 (not mounted) 05abf58a-ae6e-4377-9b3d-d6bacd92226d
    /dev/sdb6 ext4 (not mounted) 8d7c6d55-dc47-471f-84f6-aae8864dfdd7
    /dev/sdb7 ext4 (not mounted) b2155741-8f88-4063-bd1b-39b210004b17
    /dev/sdb8 swap <swap> 97cf7cdf-299c-4e0d-a438-c8b79766699c
    /dev/sdb9 ext4 /run/media/mak/426648fd-98f5-4fb0-9114-bdbdfea9047c 426648fd-98f5-4fb0-9114-bdbdfea9047c
    /dev/sdc1 iso9660 ARCH_201305 (not mounted) 2013-05-01-07-12-33-00
    [root@myhost mak]#
    It doesn't appear in nautilus side panel.
    Last edited by jmak (2013-08-13 02:44:45)

  • External USB hard drive unmounts itself.

    Hi all,
    I have a 2.5" hard drive connected via USB to my MacBook that keeps unmounting itself. This happens under some (what seems to be) undetermined amount of time, the drive will all of a sudden unmount itself and disappear from the Finder, Disk Utility, et al.
    Is there some fix, setting or work around for this? Very annoying. If not, is there a way to re-mount the hard drive without turning it off then on or reconnecting the USB cable?
    Any help would be greatly appreciated.
    Cheers,
    Diego

    I have had the same problem trying to use an USB disk as my Time Machine destination. The disk unmounts when the computer is left alone.
    Inspecting the logs I discovered that the system requests the disk to unmount and that the backupd allows it. Since it only happens when I am not actively using the computer my guess is that it has to do with the computer trying to fall asleep or at least preserving it.
    With time machine, this is a problem before you have made that first backup; subsequent backups are shorter and do not "time out". My solution was to keep the computer awake and, when I forgot that and the computer fell asleep, requesting a new (continuation of the) backup. Unattended about 7GB would be backed up. (There might be a solution if changing the power settings, but I didn't bother.)
    Apple might consider not having the backupd allowing unmounts during a backup, or at least before one full backup has been completed.

  • Cant mount usb sticks with fat32 ISO-8859-1 2.6.31-ARCH

    when trying to mount my usb sticks from xfce4 desktop(halmount).
    Following error occurs (as told by dmesg).
    FAT: IO charset ISO-8859-1 not found
    First i suspected hal being the culprit but now im not so sure anymore.
    im using stock 2.6.31-ARCH.
    when i checked the .config for the stock kernel CONFIG_NLS_ISO8859_1=y is enabled in the kernelconfig, and also everything below to support fat32.
    CONFIG_FAT_FS=m
    CONFIG_MSDOS_FS=m
    CONFIG_VFAT_FS=m
    CONFIG_FAT_DEFAULT_CODEPAGE=437
    CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
    CONFIG_NTFS_FS=m
    but when i list the modules nls_iso8859-1.ko is missing.
    #~ls -a /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso*
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-13.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-14.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-15.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-2.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-3.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-4.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-5.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-6.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-7.ko
    /lib/modules/2.6.31-ARCH/kernel/fs/nls/nls_iso8859-9.ko
    So i suspect the newest kernel broke mounting with hal.
    Last edited by nichlas.johansson (2009-10-17 14:25:56)

    Based on the information given in http://bbs.archlinux.org/viewtopic.php?id=82176, I changed in /etc/rc.conf from LOCALE=en_GB.iso88591 to LOCALE=en_GB.utf8, uncommented en_GB.UTF-8 UTF-8  in /etc/locale.gen, issued # locale-gen and after a reboot, I was able to mount my usb sticks again.
    However, now I get "FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!" in dmesg. Is this something, I need to worry about...?
    Last edited by smurf (2009-10-19 08:29:15)

  • Mount USB stick on an ASA 5505?

    Hello,
    I have an ASA 5505 and the built in flash is pretty small and I need to put 3 .pkg on it for Anyconnect 4.
    I formated an USB Stick (4GB) to FAT32 and put in the USB Port 2 on the back and rebooted the firewall.
    But in the filemanager I see disk0 and disk1, but disk1 does not work, doesn't list anything and I can't create folders on it.
    Can I mount the USB stick manually or something?
    Kind Regards.

    The USB port on the 5505 is not a supported file storage location.
    On the newer 5500-X series (including the 5506-X) you can do that.

  • Auto Mounting USB sticks

    So, I've looked around a lot, but I can't find much at all about mounting my usb sticks whenever they're plugged in. It'd be nice to not have to # mount /dev/sde1 /home/droid/usb
    I've set it up as the wiki says to do so with Thunar, but it's still not working. Any help?

    As jasonwryan mentioned the wiki is your friend. If you are trying to automount volumes with thunar make sure to install thunar-volman:
    pacman -S thunar thunar-volman
    Then you must configure thunar to automount your thumbdrive(s):
    From the wiki https://wiki.archlinux.org/index.php/Th … tomounting
    Configuration
    It can also be configured to execute certain actions when cameras and audio players are connected. After installing the plugin:
        1. Launch Thunar and go to Edit -> Preferences
        2. Under the 'Advanced' tab, check 'Enable Volume Management'
        3. Click configure and check the following items:
               Mount removable drives when hot-plugged.
               Mount removable media when inserted.
    also add dbus-launch to your .xinitrc making sure it comes before your windows manager/desktop environment
    for example my .xinitrc contains:
    exec dbus-launch openbox-session
    Granted there are numerous different ways to automount usb drives, but based on your post I assume that this is the method you are trying to use.
    Last edited by Gr0t92 (2013-05-16 05:20:36)

  • USB drive started unmounting itself after OS X update

    Has anyone a work around to get a USB hard drive to stop unmounting itself? The drive used to work flawlessly and only started behaving as though the cable were disconnected following an OS X update.

    Don't know about the update as a possible cause, but WD externals have a reputation for being very flakey with Macs, or flakey period. You could try a PRAM reset: hold CMD-Option-P-R keys down together at the startup chime, keep holding down until you hear two more chimes, total three, then let go and it will finish booting.
    Also, you might try re-applying the 10.5.8 Combo Update.
    http://support.apple.com/downloads/MacOS_X_10_5_8_ComboUpdate

  • Mount USB Stick (Solved), SSHD (Solved), Root Logon (Still open)

    Sorry this is about 3 problems:
    1. Already for longer time I can not login as root on one computer on the console. This machine has no X as it is a server. Access via SSH and console logon as other user works. One logged on I can use SU or sudo for root actions. There was a similar thread over here, which didn't help.
    /etc/securetty:
    # /etc/securetty
    console
    tty/1
    tty/2
    tty/3
    tty/4
    tty/5
    tty/6
    # End of file
    Recent update related problems:
    Updated files:
    [2009-10-29 08:51] upgraded kernel-headers (2.6.30.5-1 -> 2.6.31.4-1)
    [2009-10-29 08:51] Generating locales...
    [2009-10-29 08:51]   de_DE.UTF-8... done
    [2009-10-29 08:51]   de_DE.ISO-8859-1... done
    [2009-10-29 08:51]   de_DE.ISO-8859-15@euro... done
    [2009-10-29 08:51]   en_US.UTF-8... done
    [2009-10-29 08:51]   en_US.ISO-8859-1... done
    [2009-10-29 08:51]   zh_CN.UTF-8... done
    [2009-10-29 08:51]   zh_CN.GB2312... done
    [2009-10-29 08:51] Generation complete.
    [2009-10-29 08:51] upgraded glibc (2.10.1-4 -> 2.10.1-5)
    [2009-10-29 08:51] upgraded binutils (2.19.1-5 -> 2.20-1)
    [2009-10-29 08:51] upgraded gcc-libs (4.4.1-1 -> 4.4.2-2)
    [2009-10-29 08:51] upgraded xulrunner (1.9.1.3-2 -> 1.9.1.4-1)
    [2009-10-29 08:51] upgraded firefox (3.5.3-1 -> 3.5.4-1)
    [2009-10-29 08:51] upgraded gcc (4.4.1-1 -> 4.4.2-2)
    [2009-10-29 08:51] upgraded libatasmart (0.16-1 -> 0.17-1)
    [2009-10-29 08:51] upgraded openntpd (3.9p1-7 -> 3.9p1-8)
    [2009-10-29 08:52] Updating font cache... done.
    [2009-10-29 08:52] installed ttf-freefont (20090104-2)
    [2009-10-29 08:52] upgraded vlc (1.0.2-3 -> 1.0.2-4)
    2. SSH logon does not work anymore. Another thread solved the proble by creating a /var/empty directory and restart sshd. This works, so the solution is confirmed.
    3. Mount of USB media does not work as user although the user is in the storage group. In fact it worked before.
    Mount as root by hand works, but in case of VFAT media without acl there is no way to access the media by user other than root.
    Umount of course also need root rights in this case.
    I'm using HAL and the message mentions "permission denied by policy"
    Last edited by jcci (2009-10-31 04:23:33)

    I've got some kind of problems with removable media too. My solution was to edit /etc/PolicyKit/PolicyKit.conf
    I don't remember what i've changed there, so this is my file, maybe this will help:
    <?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
    <!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
    "http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
    <!-- See the manual page PolicyKit.conf(5) for file format -->
    <config version="0.1">
    <match action="org.freedesktop.hal.storage.mount-removable">
    <return result="yes" />
    </match>
    <match action="org.freedesktop.hal.storage.eject-removable">
    <return result="yes" />
    </match>
    <match action="org.freedesktop.hal.storage.mount-fixed">
    <return result="yes"/>
    </match>
    <match action="hal-storage-mount-fixed-extra-options">
    <return result="yes"/>
    </match>
    <match action="hal-storage-mount-removable-extra-options">
    <return result="yes"/>
    </match>
    </config>

  • [SOLVED]Mounting usb drives "not authorized" with thunar-volman (XFCE)

    Hi,
    I'm new to Arch (even though I must be approximately at my 15th try at installing it properly) and I have a problem with thunar-volman.
    Whenever I log in as user, and try to mount a usb drive with thunar, let's say I want to plug a drive labeled Ext3_8Go, I get the same message in a pop-up window : "Failed to mount Ext3_8Go (or anything close, not in English in the text), not authorized (that part is in English)"
    My install is :
    - net install
    - partitions : 9Go for /, no swap, no separate /home
    - packages : base and base-devel. The only modifications in the package list is that I remove ppp, pcmciautils, and xfsprogs.
    - config : at the install stage I only modify rc.conf to change LOCALE and HOSTNAME, and pacman's mirrorlist to allow all French mirrors in addition to the one at the top.
    When the usb installation is over, I run this script :
    "installation_xfce.sh"  (there may be some errors left, I modify this script as I learn) :
    #!/bin/bash
    # expected environment : freshly installed archlinux, login : root.
    echo "Are you connected to internet ? If not, please Ctrl+C and reload this script when connected"
    echo "Otherwise, press ENTER to continue installation"
    read var_dummy
    echo "Creation of the user : please type in your user name :"
    read var_username
    useradd -u 1000 -g users -G audio,lp,storage,optical,video,wheel,games,power,network -d /home/$var_username/ -s /bin/bash -m $var_username
    echo "You will now be asked to create the password for this user:"
    passwd $var_username
    # Add servers for pacman to find packages
    cat >> /etc/pacman.conf << EOF
    [multilib]
    Include = /etc/pacman.d/mirrorlist
    [archlinuxfr]
    Server = http://repo.archlinux.fr/\$arch
    [catalyst]
    Server = http://catalyst.apocalypsus.net/repo/catalyst/\$arch
    EOF
    # Install packages
    pacman -Syyu
    pacman -S acpi acpid alsa-oss alsa-plugins alsa-utils catalyst catalyst-utils cpufrequtils cups dbus gstreamer0.10-base-plugins iptables laptop-mode-tools mesa net-tools netcfg ntp pm-utils rfkill rsync sudo ttf-dejavu vim wireless_tools xf86-input-evdev xorg-server xorg-utils xorg-xinit xorg-xinput yaourt conky gamin gnome-icon-theme gnome-keyring gvfs-afc network-manager-applet networkmanager slim slim-themes archlinux-themes-slim hicolor-icon-theme xfce4 xfce4-goodies
    # If pacman failed, better stop the script here, and wait for a network connection
    if [[ $?!=0 ]]
    then
    echo : failed to install packages - check your network connection, or review script
    exit 1
    fi
    # Fix sound issue
    cat > /home/$var_username/.asoundrc << EOF
    pcm.!default{
    type hw
    card 1
    device 0
    ctl.!default{
    type hw
    card 1
    device 0
    EOF
    chown $var_username:users /home/$var_username/.asoundrc
    # Configure video settings for X to use Catalyst
    if [[ ! -e /etc/X11/xorg.conf.d ]]
    then
    mkdir /etc/X11/xorg.conf.d
    fi
    cat > /etc/X11/xorg.conf.d/20-fglrx.conf << EOF
    Section "Monitor"
    Identifier "aticonfig-Monitor[0]-0"
    Option "VendorName" "ATI Proprietary Driver"
    Option "ModelName" "Generic Autodetecting Monitor"
    Option "DPMS" "true"
    EndSection
    Section "Device"
    Identifier "aticonfig-Device[0]-0"
    Driver "fglrx"
    EndSection
    EOF
    sed -e 's/top_left/bottom_right/' -e '/alignment/i\double_buffer yes' -e '/CPU Usage/a\${color lightgrey}Temperatures:' -e '/CPU Usage/a\ CPU:$color ${hwmon 0 temp 1}°C' </etc/conky/conky.conf >/home/$var_username/.conkyrc
    chown $var_username:users /home/$var_username/.conkyrc
    # Install clickpad support
    yaourt -S xf86-input-synaptics-clickpad
    # Add french keyboard to X
    sed '/MatchIsKeyboard/a\\tOption "XkbLayout" "fr"' </etc/X11/xorg.conf.d/10-evdev.conf >/etc/X11/xorg.conf.d/10-evdev.conf.new
    mv -f /etc/X11/xorg.conf.d/10-evdev.conf.new /etc/X11/xorg.conf.d/10-evdev.conf
    # Add new daemons, remove old ones, disable hwclock and remove netfs since I don't use it. add it if you need it
    sed '/DAEMONS=/c\DAEMONS=(!hwclock dbus syslog-ng networkmanager laptop-mode acpid @alsa @cupsd @cpufrequtils ntpd crond)' </etc/rc.conf >/etc/rc.conf.new
    mv -f /etc/rc.conf.new /etc/rc.conf
    # Slim login manager ; change theme
    mv /usr/share/slim/themes/archlinux-darch-grey /tmp/
    mv /usr/share/slim/themes/default /tmp/
    rm -r /usr/share/slim/themes/*
    mv /tmp/archlinux-darch-grey /usr/share/slim/themes
    mv /tmp/default /usr/share/slim/themes
    sed '/^current_theme/c\current_theme archlinux-darch-grey' </etc/slim.conf >/etc/slim.conf
    # XFCE login, and thunar launched as a daemon
    sed '/^# exec/c\' </etc/skel/.xinitrc >/tmp/.xinitrc
    sed '/^# .../c\' </tmp/.xinitrc >/home/$var_username/.xinitrc
    cat >> /home/$var_username/.xinitrc << EOF
    exec ck-launch-session startxfce4
    thunar --daemon &
    EOF
    chown $var_username:users /home/$var_username/.xinitrc
    # Boot to runlevel 5 now, and run slim then
    sed -e 's/id:3/#id:3/' -e 's/#id:5/id:5/' -e 's|x:5:respawn:/usr/bin/xdm|#x:5:respawn:/usr/bin/xdm|' -e 's|#x:5:respawn:/usr/bin/slim|x:5:respawn:/usr/bin/slim|' </etc/inittab >/etc/inittab.new
    mv -f /etc/inittab.new /etc/inittab
    # Add colored prompt to user and root
    sed '/^PS1/c\' </etc/skel/.bashrc >/root/.bashrc
    cat >> /root/.bashrc << EOF
    PS1='\[\e[0;32m\]\u@\h\[\e[m\] \[\e[0;35m\]\w\[\e[m\] \[\e[m\] \[\e[0;32m\]\t -\[\e[m\] \[\e[1;31m\]\$ \[\e[m\] '
    EOF
    cp /root/.bashrc /home/$var_username/.bashrc
    chown $var_username:users /home/$var_username/.bashrc
    # How does one do that automatically ?
    # Manually add user to sudoers
    EDITOR="vim" visudo
    # Reboot, because it's quick and I'm too lazy to learn how to start all the daemons and others.
    reboot
    I can mount as a user, no password asked, with :
    udisks --mount /dev/sdb2
    but the GUI method tells me "not authorized".
    "groups user" outputs :
    lp wheel games network video audio optical storage power users
    the command "ck-list-sessions" outputs :
    Session2:
    unix-user = '1000'
    realname = ''
    seat = 'Seat1'
    session-type = ''
    active = TRUE
    x11-display = ':0.0'
    x11-display-device = '/dev/tty7'
    display-device = ''
    remote-host-name = ''
    is-local = TRUE
    on-since = '2011-08-15T08:56:03.716103Z'
    login-session-id = '1'
    Session1:
    unix-user = '1000'
    realname = ''
    seat = 'Seat2'
    session-type = ''
    active = FALSE
    x11-display = ':0.0'
    x11-display-device = ''
    display-device = ''
    remote-host-name = ''
    is-local = TRUE
    on-since = '2011-08-15T08:56:03.573029Z'
    login-session-id = '1'
    For those who don't have time to read the installation script, DBUS is in the DAEMONS list of rc.conf, and .xinitrc launches : exec ck-launch-session startxfce4
    Any idea ?
    Last edited by choubbi (2011-08-15 15:05:04)

    Thanks a lot !
    That worked !
    I stumbled across this part of the wiki several times before, but didn't really understand so I had not tried.
    If anyone's interested in the script, here's the corrected version :
    #!/bin/bash
    # expected environment : freshly installed archlinux, login : root.
    echo "Are you connected to internet ? If not, please Ctrl+C and reload this script when connected"
    echo "Otherwise, press ENTER to continue installation"
    read var_dummy
    echo "Creation of the user : please type in your user name :"
    read var_username
    useradd -u 1000 -g users -G audio,lp,storage,optical,video,wheel,games,power,network -d /home/$var_username/ -s /bin/bash -m $var_username
    echo "You will now be asked to create the password for this user:"
    passwd $var_username
    # Add servers for pacman to find packages
    cat >> /etc/pacman.conf << EOF
    [multilib]
    Include = /etc/pacman.d/mirrorlist
    [archlinuxfr]
    Server = http://repo.archlinux.fr/\$arch
    [catalyst]
    Server = http://catalyst.apocalypsus.net/repo/catalyst/\$arch
    EOF
    # Install packages
    pacman -Syyu
    pacman -S acpi acpid alsa-oss alsa-plugins alsa-utils catalyst catalyst-utils cpufrequtils cups dbus gstreamer0.10-base-plugins iptables laptop-mode-tools mesa net-tools netcfg ntp pm-utils rfkill rsync sudo ttf-dejavu vim wireless_tools xf86-input-evdev xorg-server xorg-utils xorg-xinit xorg-xinput yaourt conky gamin gnome-icon-theme gnome-keyring gvfs-afc network-manager-applet networkmanager slim slim-themes archlinux-themes-slim hicolor-icon-theme xfce4 xfce4-goodies
    # If pacman failed, better stop the script here, and wait for a network connection
    if [[ $?!=0 ]]
    then
    echo : failed to install packages - check your network connection, or review script
    exit 1
    fi
    # Fix sound issue
    cat > /home/$var_username/.asoundrc << EOF
    pcm.!default{
    type hw
    card 1
    device 0
    ctl.!default{
    type hw
    card 1
    device 0
    EOF
    chown $var_username:users /home/$var_username/.asoundrc
    # Configure video settings for X to use Catalyst
    if [[ ! -e /etc/X11/xorg.conf.d ]]
    then
    mkdir /etc/X11/xorg.conf.d
    fi
    cat > /etc/X11/xorg.conf.d/20-fglrx.conf << EOF
    Section "Monitor"
    Identifier "aticonfig-Monitor[0]-0"
    Option "VendorName" "ATI Proprietary Driver"
    Option "ModelName" "Generic Autodetecting Monitor"
    Option "DPMS" "true"
    EndSection
    Section "Device"
    Identifier "aticonfig-Device[0]-0"
    Driver "fglrx"
    EndSection
    EOF
    sed -e 's/top_left/bottom_right/' -e '/alignment/i\double_buffer yes' -e '/CPU Usage/a\${color lightgrey}Temperatures:' -e '/CPU Usage/a\ CPU:$color ${hwmon 0 temp 1}°C' </etc/conky/conky.conf >/home/$var_username/.conkyrc
    chown $var_username:users /home/$var_username/.conkyrc
    # Install clickpad support
    yaourt -S xf86-input-synaptics-clickpad
    # Add french keyboard to X
    sed '/MatchIsKeyboard/a\\tOption "XkbLayout" "fr"' </etc/X11/xorg.conf.d/10-evdev.conf >/etc/X11/xorg.conf.d/10-evdev.conf.new
    mv -f /etc/X11/xorg.conf.d/10-evdev.conf.new /etc/X11/xorg.conf.d/10-evdev.conf
    # Add new daemons, remove old ones, disable hwclock and remove netfs since I don't use it. add it if you need it
    sed '/DAEMONS=/c\DAEMONS=(!hwclock dbus syslog-ng networkmanager laptop-mode acpid @alsa @cupsd @cpufrequtils ntpd crond)' </etc/rc.conf >/etc/rc.conf.new
    mv -f /etc/rc.conf.new /etc/rc.conf
    # Slim login manager ; change theme
    mv /usr/share/slim/themes/archlinux-darch-grey /tmp/
    mv /usr/share/slim/themes/default /tmp/
    rm -r /usr/share/slim/themes/*
    mv /tmp/archlinux-darch-grey /usr/share/slim/themes
    mv /tmp/default /usr/share/slim/themes
    sed '/^current_theme/c\current_theme archlinux-darch-grey' </etc/slim.conf >/etc/slim.conf
    # XFCE login, and thunar launched as a daemon (note that the part with 'if [ -d /etc/X11/xinit/xinitrc.d ]" is not present, to avoid mounting problems when logged as regular user)
    cat > /home/$var_username/.xinitrc << EOF
    #!/bin/sh
    # ~/.xinitrc
    # Executed by startx (run your window manager from here)
    exec ck-launch-session startxfce4
    thunar --daemon &
    EOF
    chown $var_username:users /home/$var_username/.xinitrc
    # Boot to runlevel 5 now, and run slim then
    sed -e 's/id:3/#id:3/' -e 's/#id:5/id:5/' -e 's|x:5:respawn:/usr/bin/xdm|#x:5:respawn:/usr/bin/xdm|' -e 's|#x:5:respawn:/usr/bin/slim|x:5:respawn:/usr/bin/slim|' </etc/inittab >/etc/inittab.new
    mv -f /etc/inittab.new /etc/inittab
    # Add colored prompt to user and root
    sed '/^PS1/c\' </etc/skel/.bashrc >/root/.bashrc
    cat >> /root/.bashrc << EOF
    PS1='\[\e[0;32m\]\u@\h\[\e[m\] \[\e[0;35m\]\w\[\e[m\] \[\e[m\] \[\e[0;32m\]\t -\[\e[m\] \[\e[1;31m\]\$ \[\e[m\] '
    EOF
    cp /root/.bashrc /home/$var_username/.bashrc
    chown $var_username:users /home/$var_username/.bashrc
    # How does one do that automatically ?
    # Manually add user to sudoers
    EDITOR="vim" visudo
    # Reboot, because it's quick and I'm too lazy to learn how to start all the daemons and others.
    reboot
    The important part of the script to solve the problem is :
    cat > /home/$var_username/.xinitrc << EOF
    #!/bin/sh
    # ~/.xinitrc
    # Executed by startx (run your window manager from here)
    exec ck-launch-session startxfce4
    thunar --daemon &
    EOF
    chown $var_username:users /home/$var_username/.xinitrc

  • Mount USB stick manually

    Hi there!
    I'm new to Darwin and I'm wondering how to mount a USB flash drive manually. Actually I got the problem that my USB MP3 Player (Fat32 formatted) is being mounted read-only. So I'm looking for the device which has to be mounted. Something like this:
    mount -t vfat /dev/DEVICE /mnt/usbdevice -o uid=1000 (how do I get the UID in darwin?)
    I tried to get the 'DEVICE' info from /etc/fstab.hd (which should be the same as /etc/fstab in linux ?) when it's mounted automaticly but no success here (it says: 'IGNORE THIS FILE').
    That brings me to my second question: Where can I find all mounted devices listed like it's in fstab in other UNIX systems?
    I hope that's not to much asking
    greetings
    z00k

    That brings me to my second question: Where can I find all mounted devices listed like it's in fstab in other UNIX systems?
    Open Disk utility located in Applications/Utilities. Disk Utility can mount/unmount and eject external media, (and do a lot more).

  • [SOLVED] Mounting USB drive in Gnome

    I just got a brand new music player (USB, HD-based) and try to mount it in Gnome. Of course i want it to automount, and tried to enable the gnome-volume-manager, which i finally managed. But nothing happens when i plug in the USB. I also created a /media  directory (i hoped it would like to mount there...).
    Then i searched these forums and found  http://bbs.archlinux.org/viewtopic.php?t=7572, which i followed. Still without any success. Now i have no clue, whatsoever...
    (It works of course in M$ 'dos)

    make sure to modprobe usb-storage and check your logs to see what /dev entry is connected to your usb drive. add that to fstab and gnome-volume-manager should work if you followed iphitus' advice above.

  • Satellite C660 - USB sticks are not mounted

    I have a *Satellite C660 with Windows 7 64 bit*. When I conect a USB stick (2GB LG or another), Windows mount the USB new drive, but after some seconds, the USB stick is unmount and mount and unmount indefinitely.
    With my old *Toshiba Sattelite M50, Windows XP* both sticks work fine.

    Hi mkobets,
    Probably something is wrong with USB ports or chipset driver if the USB sticks work with your old Toshiba notebook
    Easiest way would be updating the chipset driver in my opinion that you can download here:
    http://eu.computers.toshiba-europe.com/innovation/download_drivers_bios.jsp

  • Auto mount of USB sticks and hard drives?

    Hello.
    I'd like ArchLinux to auto-mount USB sticks, hard drives, etc... when plugging them in. How do I manage to do this?
    These are my daemons: DAEMONS=(syslog-ng network netfs crond dbus hal ntpd alsa gdm)
    Thank you in advance.
    EDIT: Somehow, autofs does not work.
    And btw, I use Thunar as file manager.
    Last edited by rik (2011-04-24 13:24:40)

    You need to have gvfs and thunar-volman installed. Make sure you are a member of the storage group. https://wiki.archlinux.org/index.php/Xf … le_Devices
    Last edited by yugrotavele (2011-04-24 14:55:59)

  • Hard Drive Unmounting Itself

    Hi,
    I have a WD MyBook USB external hard drive that used to work fine. Now, it will not mount unless I unplug its power for at least 15 minutes, plug the power back in, and then plug it into my MacBook Pro. Once it mounts, it will then unmount itself after about an hour. The power light on the hard drive never turns off, though. I've searched the discussion and can't find any similar problems. Any help with this would be greatly appreciated. Thanks.

    I am having the same issue.... the USB drive unmounts at unexpected moments.
    For me, it happens always with iTunes open, or when trying to transfer files to or from the external drive.
    Mine is a new issue since the latest iTunes update. Apple refuses to give phone support and does not answer email event reports.

  • I can't write to usb stick [solved]

    I've installed arch on my notebook yesterday. It took a few hours, but I got almost everything working correctly.
    My issue is that when I plug in a usb stick, it gets automatically mounted, but I can't write to it.
    I had the same issue with my ntfs data partition, but I solved it by adding an entry to /etc/fstab.
    Unfortunately that won't be  an efficient solution for usb sticks, since their partition type might vary.
    /dev/sda1: LABEL="arch" UUID="6c7ecf62-2ffb-4bfe-9af0-39d7cdb89751" TYPE="ext4" PARTUUID="000e19e1-01"
    /dev/sda2: LABEL="swap" UUID="ff87fb8b-773b-45ca-9198-c2abf9a1a017" TYPE="swap" PARTUUID="000e19e1-02"
    /dev/sda3: UUID="AAACDC9DACDC657B" TYPE="ntfs" PARTUUID="000e19e1-03"
    /dev/sda4: LABEL="Dados" UUID="EC60740C6073DC30" TYPE="ntfs" PARTUUID="000e19e1-04"
    /dev/sdb1: UUID="2013-11-01-08-10-26-00" LABEL="ARCH_201311" TYPE="iso9660" PTUUID="0d738582" PTTYPE="dos" PARTUUID="0d738582-01"
    [hfluz@hfluz-arch ~]$ sudo fdisk -l
    Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x000e19e1
    Device Boot Start End Blocks Id System
    /dev/sda1 2048 398753791 199375872 83 Linux
    /dev/sda2 398753792 402948095 2097152 82 Linux swap / Solaris
    /dev/sda3 402948096 1399447551 498249728 7 HPFS/NTFS/exFAT
    /dev/sda4 1399447552 1953519615 277036032 7 HPFS/NTFS/exFAT
    Disk /dev/sdb: 14.8 GiB, 15879634944 bytes, 31014912 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x0d738582
    Device Boot Start End Blocks Id System
    /dev/sdb1 * 0 1056767 528384 0 Empty
    /dev/sdb2 84432 147919 31744 ef EFI (FAT-12/16/32)
    My usb stick is /dev/sdb.
    Anyone already had the same problem?
    Last edited by hfluz (2013-11-11 16:40:38)

    MW wrote:Check your groups, you should be in the storage group.
    https://wiki.archlinux.org/index.php/Users_and_Groups
    I don't think that the storage group covers this.  All USB storage devices that I have seem to come up as being part of the disk group.  You should really not make your user part of the disk group.
    If you read the post, and saw the info provided by the OP, you would see that he/she is trying to write to an iso, which is read-only.

Maybe you are looking for

  • How can i calculate the percentages and update the progressBar in the splash screen form ?

    I created a splash screen form: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Thre

  • Changing 'host' machine with which iPad was first sync'd

    Because my OS was too old to work with newly purchased iPad, had to use someone else's Mac, here in office, to set up the iPad. Now I have a newer MacBook at home, and would like to use that with the iPad, for upload of pdf files etc. Can I change th

  • Equivalent of SunPKCS11 class in HP JRE

    SunPKCS11 class in present in Solaris JRE, Linux JRE and Windows JRE but it is not present in HP JRE. Can any one tell what is the equivalent of this class in HP JRE. I heard that PKCS11 interfaces are present in every platform. Can any one tell what

  • Data Controls

    Hello, is it possible to create mutiple datacontols in adf application ? OR is it always only one. thx

  • Flash cs6 createjs not exporting action script

    Hi , I had installed cs6 in my laptop(trail version). Basically I am Action Script 3.0 programmer. I try to develop one application and create js file. Using programming I did simple drag and drop functionality. its working in swf file. Once I publis