WD My cloud USB drive mount command???

Hello,
I've a backup script which is autoscheduled and backs up my data to the usb drive. I would like to keep usb drive unmounted until the script starts since twonky scans my usb drive as well and I couldn't disable it from both twonky setup and my cloud UI. After reboot it starts scanning again. (if you know this, it will be a better solution)
So after reboot I would like to unmount the usb disk. I found the unmount command in the forum. Thansk to Nazar.
However I don't know how to mount the drive from the script.
Can you please help me on this?
Thanks...

mount [ -o options,.. ] /dev/sdb1 /path/to/existing/directory  or if you know your stuffs let it auto mount on boot, edit /etc/fstab as below, then mount -a or mount /dev/sdb1: /dev/sdb1   /path/to/existing/directory   filesystem(i.e. vfat)  options(i.e. defaults)    backup-dump(i.e. 0)   pass-fsck(i.e. 0) Note all above is not supported by WD and warrants warranty void. Wrong fstab entries may not boot up your nas properly so I don't recommend this unless you fully understood. I did a mistake once while mounting additional swap space which end up opening the drive just to recover. Read more https://en.wikipedia.org/wiki/Fstab

Similar Messages

  • All USB drives mount as read only for user

    I have searched a bunch and thee results I find seem to be irrelevant to my situation. Most relate to a single USB media that is a problem and won't read or write.
    On a new Arch install on a new computer (my third base system install). Running Gnome.
    All USB mass storage devices mount as read only for the logged in user. Root has write permissions and I can mkdir no problem. It is not an issue with the USB drive itself as this occurs with multiple USB media (I've tested several SD cards on a reader and at least two drives, all the media works correctly on my existing installations)
    I'm posting the contents of my /etc/group file in case there's an obvious error there I don't see, and my dmesg output upon plugging in the drive. User name is changed in the group file posted to "archie"
    This is a single-user system.
    /ect/group
    root:x:0:root
    bin:x:1:root,bin,daemon
    daemon:x:2:root,bin,daemon
    sys:x:3:root,bin
    adm:x:4:root,daemon
    tty:x:5:
    disk:x:6:root
    lp:x:7:daemon
    mem:x:8:
    kmem:x:9:
    wheel:x:10:root,archie
    ftp:x:11:
    mail:x:12:
    uucp:x:14:archie
    log:x:19:root
    utmp:x:20:
    locate:x:21:
    rfkill:x:24:
    smmsp:x:25:
    http:x:33:
    games:x:50:
    lock:x:54:
    uuidd:x:68:
    dbus:x:81:
    network:x:90:
    video:x:91:
    audio:x:92:
    optical:x:93:
    floppy:x:94:
    storage:x:95:
    scanner:x:96:
    power:x:98:
    nobody:x:99:
    users:x:100:archie
    systemd-journal:x:190:
    archie:x:1000:
    avahi:x:84:
    polkitd:x:102:
    rtkit:x:133:
    gdm:x:120:
    brlapi:x:999:
    kvm:x:78:
    ntp:x:87:archie
    dmesg output
    [ 968.044188] usb 4-3: new high-speed USB device number 4 using ehci-pci
    [ 968.170628] usb-storage 4-3:1.0: USB Mass Storage device detected
    [ 968.171435] scsi7 : usb-storage 4-3:1.0
    [ 969.174450] scsi 7:0:0:0: Direct-Access Generic USB SD Reader 1.00 PQ: 0 ANSI: 0
    [ 969.175068] scsi 7:0:0:1: Direct-Access Generic USB MS Reader 1.03 PQ: 0 ANSI: 0
    [ 969.939417] sd 7:0:0:0: [sdb] 15572992 512-byte logical blocks: (7.97 GB/7.42 GiB)
    [ 969.941028] sd 7:0:0:0: [sdb] Write Protect is off
    [ 969.941037] sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00
    [ 969.944664] sd 7:0:0:1: [sdc] Attached SCSI removable disk
    [ 969.945509] sd 7:0:0:0: [sdb] No Caching mode page found
    [ 969.945517] sd 7:0:0:0: [sdb] Assuming drive cache: write through
    [ 969.952682] sd 7:0:0:0: [sdb] No Caching mode page found
    [ 969.952693] sd 7:0:0:0: [sdb] Assuming drive cache: write through
    [ 969.956396] sdb: sdb1
    [ 969.965003] sd 7:0:0:0: [sdb] No Caching mode page found
    [ 969.965011] sd 7:0:0:0: [sdb] Assuming drive cache: write through
    [ 969.965015] sd 7:0:0:0: [sdb] Attached SCSI removable disk
    I'm sure I'm just missing something in user management, but I can't find what.
    Last edited by hooya (2014-04-27 03:10:49)

    I am also having the same problem. Root can read and write to automounted drives, but my user cannot. I've tried with a variety of drives, I am assuming they are being automounted by root instead of the logged-in user somehow. (I am running x directly, and am not using a display manager, if that has anything to do with it).
    When I look at how it is mounted it is as follows:
    /dev/sdc1 on /run/media/myuser/drivename type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

  • [SOLVED]How exactly are USB drives mounted?

    When I plug in a USB drive, Cinnamon brings up the device in Nemo so I can see its files. The location it's mounted at is /run/media/<username>/<long string I assume to be a UUID>/. How is it that I can mount it again at another directory and use it from there? Also, when I unmount it from the second directory, is it already safe to remove it or do I need to unmount it from the first one as well?
    Last edited by Hurricane (2014-01-01 18:52:25)

    ewaller wrote:How, "Exactly"?
    http://www.usb.org/developers/docs/usb2 … 070113.zip
    http://www.usb.org/developers/docs/devc … 9-2010.pdf
    This is actually along the lines of what I was looking for, lmao.
    nd7rmn8 wrote:cant you place the relevant info by uuid in your /etc/fstab, and then when it automounts, it should mount to that location specified.  twas what i did back in my ubuntu days...
    That's the way I had it on my 8.04. I remember having to set that myself though.
    xtraroot wrote:If it's mounted on more than one place, you'd have to unmount it in those places if you've done file transfers and want to make sure it's safe to remove. You only mentioned one place that it's mounted though?
    I had it mounted at that default location and then I had mounted it onto ~/mnt (I recreated /mnt in my home directory)
    tomk wrote:You seem to lack some understanding about your own system. If your USB devices are automounted when you plug them in, that's because you configured your system to do that. The fact that you are asking how that works should worry you IMO.
    I never configured my system to do that. When I used Arch and XFCE, I don't remember USB drives being automatically mounted. I had to do it myself. Cinnamon apparently does it automatically. What I wanted to know was why, if it does it automatically, does mount not give me an error about trying to mount the same partition again in a different place.
    Thanks for your answers everybody.

  • Usb drive mount by a normal user

    how can i make a normal user mount usb drives? i added a line in fstab that allows users to mount /dev/sdb1, but this solves only partially the problem

    After a recent sys upgrade, I am having a somewhat similar problem.  I can still mount my usb stick, but the permissions are now a little screwy (EDIT: i.e. permission denied when trying to change into /mnt/usb directory).
    fstab entry:
    /dev/sdc1 /mnt/usb vfat rw,user,noauto 0 0
    after performing a mount /mnt/usb the permissions on /mnt are:
    d-wxrw-rwx 6 root users 16384 1969-12-31 19:00 usb
    well, the permissions on this drive seem strange to me, as well as the 1969 date.  Additionally if I look at the directory as root everything is executable, which should not be the case.  I've added my username to users and storage in /etc/groups to no effect.  I can mount fine using pmount, but I would much prefer things my way, plus i dislike the idea of being forced to mount things under /media (notions of liberty and such)
    Any thoughts or additional info needed?  I've become stumped enough by this odd behavior to actually register and post.
    Last edited by tousborne (2007-12-01 17:42:08)

  • "Drive not properly ejected"--How do I keep a USB drive mounted constantly?

    I have a 2-month-old iMac, and have had a USB external SATA-enclosure 2.5" 500gb drive attached the whole time. About a week ago, it started randomly giving the "Drive not properly ejected" message and usually it remounts after a few seconds. Sometimes it doesn't and I have to unplug it and plug it back in.
    I thought the drive was at fault, so I switched it with a similar drive that was connected to my AirPort Extreme base station. The problem stayed with the Mac. Also I imagined that (somehow) the iMac wasn't supplying enough power, so I bought a powered USB hub. The result is the same.
    I don't understand how it can work for two months and then suddenly get this problem. The only change along the line is that about a week ago I did a software update ("About this Mac" says it is 10.6.7). The latest update DOES coincide with the appearance of this problem.
    How do I resolve this?
    (Notes: There at least one other thread here where people seem to think that this is a Time Machine problem. I think this is because many people connect large external drives for the purpose of backup. I upgraded to iMac from Mac Mini. I installed Snow Leopard right after I bought the iMac and then tried to restore from my Time Machine backup. Something went wrong, so I mirrored my Mac Mini drive onto a 500gb SATA 2.5", put it in a FireWire enclosure and boot from that. I use the iMac's internal 1T drive for Time Machine. That may sound like "lazy man solution", but it could have a great advantage someday where I could plug that FireWire drive into my Mac Mini and not have any downtime should iMac need to be repaired. The random disconnecting of the USB drive doesn't coincide with any Time Machine events. TM is working fine.)

    Kappy,
    Thank you for your help with this problem!
    Your hypothesis for the drive/enclosure being a problem is good thinking, however:
    -The problem never existed for the first two months I had the iMac.
    -I can switch similar drives with iMac and AirPort Extreme, and the problem stays with the iMac.
    -It has nothing to do with Time Machine as I am using a FireWire drive to boot, and the iMac internal 1TB for Time Machine.
    -A friend suggested a cable problem, but I have tried many combinations and it wouldn't explain why suddenly after 2 months three sets of USB cables can fail at the same time (at least one, I used for 3 years with Mac Mini.)
    I now have a 111gb drive connected to my AirPort Extreme and it has been copying files to my FireWire drive slowly but surely for two hours now. The same drive disconnected after 13 minutes on the iMac. All indications are pointing to OSX 10.6.7. The perfect test (for anyone with convenient resources) would be to install Snow Leopard from disc on a clean Mac and not upgrade it, plug in a USB drive and see if it can last a day or two. Then, upgrade to 10.6.7 and see what happens. I hope someone can try this.
    (Is this a ploy to try to sell more FireWire equipment? I hope not.)

  • USB Drives mount become a device

    My usb flash drives have random decided to not become a device. Basically I put them in, and they get recognized but not deviceified.
    Some info:
    http://pastebin.com/fy1Ddy7u         lsmod
    http://pastebin.com/rgQahfpZ        dmesg
    http://pastebin.com/xmK0BHQN      df -l
    http://pastebin.com/NU6Lfiv4          fstab
    http://pastebin.com/S0ceh4fn        ls /dev
    Sorry about the links. I couldn't figure the url function out.
    Thanks for your help

    I don't know, but I had http://wiki.archlinux.org/index.php/HAL open and it says:
    There are a number of factors involved in 'hotplugging' and HAL is only one of them. When a new device is added, e.g. a USB drive is plugged in, the following occurs (roughly):
        * The kernel becomes aware of a new device and registers it in /sys.
        * Udev creates a device node (e.g. /dev/sdb1), and loads the drivers/modules needed.

  • USB Drive Mounts Read Only

    For some reason now on all my Linux systems but particularly Arch Linux, my USB thunb drive gets auto mounted in Gnome when I plug it in but for some reason it's 'read only'.
    [carlos@tuna ~]$ cd /media/usb/
    [carlos@tuna usb]$ ls -l
    total 3722352
    drwx------ 2 carlos users 8192 Feb 11 10:34 files
    drwx------ 2 carlos users 8192 Feb 13 20:32 movies
    drwx------ 2 carlos users 8192 Jan 31 19:18 music
    drwx------ 4 carlos users 8192 Feb 11 10:34 pics
    drwx------ 2 carlos users 8192 Jan 28 12:17 tv
    -rw-r--r-- 1 carlos users 1564807588 Feb 14 17:40 WELCOM~1.AVI
    /dev/sdg1 on /media/usb type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=100,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
    Both on CLI & through my Gnome file browser (Nautilus), I can't re-name, delete, or create new files. I don't understand what has changed. I then tested this on a spare laptop running Ubuntu 10.10 and it too has the same issue.
    Can anyone please explain this to me or help me resolve this problem?

    Correct. In both cases (CLI & GUI) I can't remove, add, or change existing files:
    [carlos@tuna ~]$ cd /media/
    [carlos@tuna media]$ ls -l
    total 8
    drwx------ 9 carlos users 8192 Dec 31 1969 CORSAIR
    [carlos@tuna media]$ cd CORSAIR/
    [carlos@tuna CORSAIR]$ ls -l
    total 3722352
    drwx------ 2 carlos users 8192 Feb 11 10:34 files
    drwx------ 2 carlos users 8192 Feb 13 20:32 movies
    drwx------ 2 carlos users 8192 Jan 31 19:18 music
    drwx------ 4 carlos users 8192 Feb 11 10:34 pics
    drwx------ 2 carlos users 8192 Jan 28 12:17 tv
    -rw-r--r-- 1 carlos users 1564807588 Feb 14 17:40 WELCOM~1.AVI
    [carlos@tuna CORSAIR]$ rm WELCOM~1.AVI
    rm: cannot remove `WELCOM~1.AVI': Read-only file system
    I can't even change the permissions on the file:
    chmod: changing permissions of `WELCOM~1.AVI': Read-only file system

  • USB Drive unmounts from airport extreme

    I have a 1TB segate USB drive mounted on my Airport etreme which I mapped as drive z: on my win 8 laptop.
    Somtimes when the laptop comes out of sleep mode, the drive will not remount unless I reboot the PC.
    Somtimes I can't even remount the drive using the base station agent, it will not let me log into the drive.
    Yes the drive is formatted as fat32.
    Any suggestions?

    You can use thumb drive.. it has to be formatted correctly.. fat32 or HFS+ of course.
    And they are not very big.. so I am not sure how big your songs are.. in the apple world you have your songs on itunes and definitely this is unsuitable for the itunes library.. you still need itunes on a computer to share it to the network.

  • Installing Leopard on external USB drive

    Hi there,
    I am trying to wipe a drive clean via an external USB drive box. Might somebody explain how I can do this? When I boot on the Leopard DVD I arrive at the drive choice screen and there is a big red "exclamation point" on the external USB drive mount icon. What can I do to get around this problem?
    Cheers,
    Noah

    Noah Wallach wrote:
    Hi there,
    I am trying to wipe a drive clean via an external USB drive box. Might somebody explain how I can do this? When I boot on the Leopard DVD I arrive at the drive choice screen and there is a big red "exclamation point" on the external USB drive mount icon. What can I do to get around this problem?
    Cheers,
    Noah
    Although you can boot some systems via USB, the drive must first and foremost be bootable. Not all external drives are bootable. The firmware must support booting. For example, my Maxtor 160 that I use for TM on my G5 states in the manual that it cannot boot.
    You are having a somewhat different issue, in that you are not yet ready to boot, but the drive cannot be seen by DU.
    I would see if the external drive can first be partitioned and formatted in Leopard directly by running DU in the Leopard Utility folder, not from the DVD.
    I would check for a firmware update for your drive box.

  • ? Command to Mount USB drive attached to Time Capsule ?

    Looking for the terminal commands that would let me mount and unmount the USB drive I have attached to my Time Capsule so that I can have a shell script to mount the drive, RSync some folders, and then eject/unmount the drive.
    Any suggestions? Thanks in advance.

    One time bump - anyone?

  • [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

  • How to change mount options on an install usb drive ?

    Situation:
    I did create an USB drive with three bootable partitions;
    - one bootable volume named “Install OS X Yosemite”, created with the ‘createinstallmedia’ command
    - one bootable volume named “Install OS X Mavericks”, created with the ‘createinstallmedia’ command
    - one bootable volume named “Install OS X Mountain Lion”, created by restoring the /Install OS X Mountain Lion.app/Contents/Shared Support/InstallESD.dmg image within the 10.8 Installer app
    Everything works fine, and I can select any of the three boot volumes in order to boot and install a computer with 10.8, 10.9 or 10.10.
    Here are my two questions:
    1. When booting with the Startup Manager, I can see the three boot volumes on the USB stick listed as startup options. When the first two are named “Install Yosemite” or “Install Mavericks”, the Mountain Lion one appears as “Mac OSX”. Is there a way to change this value / string ?
    NB: renaming the Mountain Lion volume on the USB drive using the Finder was done, but does not change in the way the volume appears in the Startup Manager
    2. When connecting the USB drive to a running OS X system, all volumes mount well, but the Mountain Lion one automatically opens a Finder window. Is there a way to change this behaviour, having the volume mounted, but preventing this Finder window to automatically open ?
    Read about the 'bless' command, but I am not sure this could solve the issue, as my Install Mountain Lion drive is already bootable and working ...

    I haven't had chance to test but bless looks promising…
    http://apple.stackexchange.com/questions/2350/how-can-i-change-the-title-of-a-bo ot-image
    http://apple.stackexchange.com/questions/19183/how-to-prevent-finder-windows-fro m-automatically-popping-up-when-i-attach-a-disk
    … in more ways than one.

  • How can I mount an external hard drive via command line

    I have an external hard drive that's been formatted as "Mac OS Extended (Journaled)" (the default option from Disk Utility). I'm in single-user mode and want to mount the drive. I noticed that when I plug in the drive to the USB port I get some new items in the /dev/ directory, namely:
    disk3, disk3s1, disk3s2, rdisk3, rdisk3s1, rdisk3s2
    I imagine I'm only interested in the disk3*, but I'm not sure which one (or what the differences are, there's only 1 partition on the drive).
    Also, I'm not sure which mount command to use, there are several in the /sbin/ directory. I tried the "mount" command and got a message that noted: "Incorrect super block." Any ideas?

    /usr/sbin/diskutil mount /dev/disk3

  • Single-user mode: How to mount and access an external USB drive?

    My MacBook Pro HD is acting up. Cannot boot normally or into "safe mode". Cannot reinstall OS without wiping out the HD. Need to recover some critical files but DiskUtil First Aid and Restore options cannot successfully complete. Problem traced down to "invalid node structure" which means I either have a hardware problem or my filesystem partition directory structure is corrupted. I need to recover some files that are not backed up (timin issue with my regular backup process).
    I can boot into single-user mode, mount the root file system (/sbin/mount -uw /) and can see/navigate the rot filesystem structure via good UNIX command line. Here's what I would like to do (in single-user mode):
    1. Mount an external USB drive (250 GB already formatted as Mac OS X Extended)
    2. Copy various files and/or directories from my HD to the external USB drive (UNIX cp command)
    I realize I could go spend $$ for the Disk Warrior or Data Rescue products (or something similar) that SHOULD help me recover my HD or files, but it seems silly to do this when I can see, touch and taste them from within single-user mode....
    Comments? Suggestions?
    TIA --
    Trent
    P.S. Once I've recovered my files, I'll try to reformat the HD and then reinstall the OS. And THEN go have Apple look at my machine (thank goodness for AppleCare coverage)!

    Resolution:
    1) Boot system in single-user mode (SUM) with external HD attached.
    2) Execute the following UNIX CLI commands once SUM boot process is completed:
    # fsck -fy
    # mount -uw /
    # mkdir /Volumes/target_directory
    # mount -t hfs -w /dev/diskXXX /Volumes/target_directory
    # cp -RXv /source_directory /Volumes/target_directory
    Where XXX is the device-level name for your external HD's data partition. In my case this was /dev/disk1s2. It may take some experimentation to identify this device name if your system has multiple HD's.
    3) Verify contents were successfully copied onto the /Volumes/target_directory.
    Comments and observations:
    - Do NOT use "/" as your source directory - cp will make a second (redundant) copy of /volumes/target_directory
    - I was able to successfully copy ALL files off my HD despite the fsck command's "invalid node structure" error message with this simple procedure. YMMV, depending on the state of your HD.
    - The repeated disk0s2: I/O error warnings displayed during the SUM boot process did not seem to have a negative effect on this procedure. I also received this same error warning intermittently as I navigated the mounted filesystem did not seem to be a problem, either. Again, YMMV.
    Commercial software:
    I downloaded ProSoft Engineering's Data Rescue 3 product (trial version) before spending $99 to attempt to recover my "bad" HD's data via mounting to a good system with FW target mode. It could not successfully complete its "QuickScan" process and immediately hung on block 0 of 390M during its "Deep Scan" process. The product did seem to function properly on an operational system. ProSoft's technical support was responsive and helpful but had no answer for my "Deep Scan" error.
    I did not attempt to use Alsoft's Disk Warrior 4 product. I could not find any trial software available and was reluctant to spend $100 based upon the mixed reviews and comments on this discussion forum as well as other reviews. Alsoft does claim to address the "invalid node structure" error in their marketing materials. Hindsight being 20/20 - I saved $100 by using this simple procedure.
    Final note:
    Neither Leopard nor Snow Leopard's installation DVD could recognize the bad internal HD when trying to do a reinstall. While DiskUtil was able to "see" the bad internal drive it immediately failed when I tried to do an "erase and format". Took the system to my local Apple store and the Genius ran a tool called "SMART Utility" from Volitans Software (www.volitans-software.com). SMART utility confirmed that my HD was bad so it was replaced. AppleCare pays for itself (once again!).

  • Mounting USB drives in general

    Hello,
    I am having trouble trying to figure out how to mount a usb jumpdrive or similar product in Solaris 10. I have a good understanding of the mount command, it is just trying to figure out what I am supposed to mount. I can't seem to find what was assigned to the jumpdrive when I plugged it in. Does anyone know where I can find a good guide on this topic?I'm used to the BSD/Linux way of doing things.

    this is what I do ,
    1) check /var/adm/messages to make sure sd attaches to the usb device
    here i've just plugged in my dell axim.
    Dec 29 11:15:41 timu-home usba: [ID 912658 kern.info] USB 2.0 device (usb0,0) operating at full speed (USB 1.x) on USB 1.10
    root hub: storage@1, scsa2usb4 at bus address 2
    Dec 29 11:15:41 timu-home usba: [ID 349649 kern.info] Softick Dell Axim X51v 0087AB6095E7
    Dec 29 11:15:41 timu-home genunix: [ID 936769 kern.info] scsa2usb4 is /pci@0,0/pci1179,1@1d,1/storage@1
    Dec 29 11:15:41 timu-home genunix: [ID 408114 kern.info] /pci@0,0/pci1179,1@1d,1/storage@1 (scsa2usb4) online
    Dec 29 11:15:41 timu-home scsi: [ID 193665 kern.info] sd5 at scsa2usb4: target 0 lun 0
    Dec 29 11:15:41 timu-home genunix: [ID 936769 kern.info] sd5 is /pci@0,0/pci1179,1@1d,1/storage@1/disk@0,0
    Dec 29 11:15:41 timu-home genunix: [ID 408114 kern.info] /pci@0,0/pci1179,1@1d,1/storage@1/disk@0,0 (sd5) online
    Dec 29 11:15:41 timu-home genunix: [ID 314293 kern.info] device pciclass,030000@2(display#0) keeps up device sd@0,0(disk#5), but the latter is not power managed
    so I can see that sd5 is the target driver instance that is controlling my axim.
    then run rmformat as root to get the /dev/rdsk/cXtXdX number to mount
    # rmformat
    Looking for devices...
    1. Logical Node: /dev/rdsk/c6t0d0p0
    Physical Node: /pci@0,0/pci1179,1@1d,1/storage@1/disk@0,0
    Connected Device: Softick Card Export 0001
    Device Type: Removable
    Bus: USB
    Size: 488.7 MB
    Label: <None>
    Access permissions: <Unknown>
    2. Logical Node: /dev/rdsk/c1t0d0p0
    Physical Node: /pci@0,0/pci-ide@1f,1/ide@1/sd@0,0
    Connected Device: TOSHIBA DVD-ROM SD-R2412 1431
    Device Type: DVD Reader
    Bus: IDE
    Size: <Unknown>
    Label: <Unknown>
    Access permissions: <Unknown>
    so /dev/rdsk/c6t0d0p0 is the device to mount.
    now at this point you might well find that some
    media manager has mounted up the device for you.
    ( the later the solaris version the better the media managers)
    if not you want to do something like ( note the :c)
    # mount -F pcfs /dev/dsk/c6t0d0p0:c /mnt
    # ls /mnt
    Business Inbox.mst2 Program Files music
    FilesToBeDeleted MSMETADATA junk
    Inbox.mst29My Music mindmaps
    hope that helps a bit
    tim

Maybe you are looking for

  • Cannot move songs from 'Purchased' playlist on my iPod (touch 8gb)

    Soooooo I've purchased a handful of songs on my ipod touch and I cannot move them back to iTunes or to another playlist. They are all listed in the Purchased playlist from the device. Only one shows in the Purchased on [device] under Store in iTunes.

  • 13" Air has required SMC reset twice due to weird behavior (fan, backlight)

    Note: MacOS version is really 10.6.7 plus Supplemental Update for the 13.3" MacBook Air. My MacBook Air 13.3" 2.13 GHz/4GB/256GB, purchased in late November 2010, has twice now started acting weirdly after I installed MacOS 10.6.7 Supplemental Update

  • Text file needed for Defor01

    hi,,      i need the text file for (Delfor01)Idoc type. whether its possible to see, if means say me the steps, Or Say the links to refer.. Advance thaks.

  • Is  mountain lion compatible with parallels desktop 5 for Mac?

    I currently have Mac OS X. 6 snow leopard and want to upgrade to the latest version of Lion.  But I use Parallels desktop 5 for Mac.  Will this be compatible?

  • Derived column containing radio button

    Hi, I have a derived column in a report. In the field HTML Expression, I have the following HTML code: <INPUT TYPE="radio" NAME="radTypeSelectionStatut"><   <INPUT TYPE="radio" NAME="radTypeSelectionStatut" CHECKED>=   <INPUT TYPE="radio" NAME="radTy