Mount a USB flash drive from a shell

I am about six months new to Linux; I have installed my first arch system but not yet installed a desktop environment.  I am trying to mount a USB flash drive from the shell but I am not having much luck.  I have tried following the instructions in the archwiki, http://wiki.archlinux.org/index.php/USB_Storage_Devices. I am having a problem with the following command:
mount -t vfat /dev/sda1 /mnt/usbstick
I get an error message saying that the mount point does not exist.  I have in the /mnt directory the following:
cd cdrom dvd fd0 f1
(I am not sure what fd0 and fl are, if somebody could please tell me I would appreciate it.  Also I do not have a DVD-ROM on my computer is the dvd listed by default or do I have a package installed I do not need?)  I did some searching online and came across the following site, http://linuxcommando.blogspot.com/2007/ … -from.html. I followed the instructions to identify the correct partition name corresponding to the USB drive by running the following command:
grep SCSI /var/log/messages.log
and I get the following results:
Dec 30 22:16:17 morgan-desktop scsi2 : SCSI emulation for USB Mass Storage divices
Dec 30 22:16:22 morgan-desktop sd 2:0:0:0: [sdb] Attached SCSI removable disk
The next steps in the instructions are to mount the partition to the existing mount point (directory) by using the following command.
mkdir -p /mnt/myusb
mount -t vfat -o rw,users /dev/sda1 /mnt/myusb
This is where I am having a problem, I do not understand the results and how to proceed to the next step, please help me.
One other small question what is the best command to shut down the computer as a normal user?
Thank you
Morgan Smith

Ok, Lots of different advice here, let's see if I can explain it all together, and clear up a few bits...
I'll try to explain why I'm saying what I am, it doesn't matter if you don't follow it all, commands are below.
You are on the right lines here, but a few things missing.  Firstly, to mount the USB stick you are using the correct command, but the locations are a problem.  The command is "mount -t type what/to/mount where/to/mount".   You can find out more about the mount command with "mount --help" or "man mount"
You have correctly identified type as vfat - this means the pen is formated as FAT.
To find out what to mount, you can check /var/log/messages.log, the second command you posted searches trough that file and prints out lines including the phrase SCSI, and the result tells you that a usb storage device had been attached as sdb, so the correct device is /dev/sdb1.  Storage devices are named sda sdb sdc etc in the order they are attached, and the numbers refer to the partitions on the disk.
You can mount it anywhere you want, as any existing directory, but the one you tried to use /mnt/usbstick doesn't exist, so create it, using mkdir.
The commands you need therefore are:
mkdir /mnt/usbstick
mount -t vfat /dev/sdb1 /mnt/usbstick
This will work as root.  There is also, as byte said, a program called pmount (which you can get with pacman -S pmount) which works the same way for a standard user.
Finally, there are also a number of tools like HAL which can be used to automate the process.
As for shutting down, as has been said you must be root or in the power group, then you can use 'halt' 'poweroff' 'reboot' or 'shutdown'. All have slightly different effects, and poweroff is probably the easiest.
Hope this helps
Jack

Similar Messages

  • OS refuses to mount external USB flash drive. Says a piece of OS software is missing.

    OS refuses to mount external USB flash drive. Says a piece of OS software is missing. The flash drive (thumb drive) usually lights up but does not go through the flashing on/off that was tyjpical when first inserting it.
    I tried an external hard drive and got the same results; that is, no result, as if it wasn't connected. No icon appears on the desktop and no device shows up in the sidebar. It (10.6.8, Mac Pro Duo) had worked perfectly before this, of course.

    Hmmmmm,,,,
    Disconnected all peripherals. Did a Safe Mode startup and that worked fine. Very limited features, of course.
    Started up with the Snow Leopart (10.6.3) disk. Used disk utility to verify permissions and ran disk repair on all three internal HDs. No repairs needed.
    Ran Drive Genius and did the same things, as a double-check.
    Plugged in the flash drive (thumb drive) and it came up fine (still operating the OS from the Sno-Leop disk). 
    I wanted to re-start with the disk and bring up the Apple Hardware Test as you suggested. I had lots of kernal panics on a previous machine, a G4 desktop, and has used that at that time (with a 10.2 or 10.4 disk). thought I remembered that you hold the D key down when starting up from the disk and it would open the hardware test, but either I remember wrong or it works different in 10.6 because it was just a normal startup.
    How do I get to the Hardware Test on the 10.6 Snow Leopard disk?
    Restarted without the disk and the Mac Pro desktop still showed the gray screen with what Apple calls the "prohibitory" sign, the circle with the diagonal line in it.
    I decided to load the OS disk onto HD 3 and designate that as the startup disk, which I did and it works fine. The USB flash drive loads properly, opens, etc. just as it should. I haven't yet plugged in the peripherals (scanner, printer, second DVD/CD recorder, tablet, an external drive, or connected to ethernet yet. Will do those one at a time and see if any of them casued a problem.)
    Am I right in thinking:
    A) HD One might have bad sections. I didn't defrag with Drive Genius (26% fragged) or look for bad blocks, which I'll probably do tonight.
    or B) the OS has been slightly corrupted and may need reloading
    or C) I have a virus or conflict (though I haven't added anything new lately). I do have the ButtonManager loading problem for Mac. which is talked about on MacRumors site, etc. but the timing of its appearance and this problem don't match.
    Apologies for being so wordy; want to get all information that may be helpful. I appreciate your interest.

  • 10.5.1:  Unable to mount a USB flash drive.

    I've seen this problem posted elsewhere, but so far I have yet to see a solution:
    After upgrading my MacBook Pro to 10.5.1, it can no longer mount USB flash drives. They show up in System Profiler as well as the USB Probe tool, but do not show up in Disk Utility (and, obviously, not on the Desktop or listed in /Volumes).
    I checked the drives on a co-worker's MBP, also running 10.5, and the problem persisted there. The drives mount and work fine under 10.4, as well as various flavors of Windows. When plugged into the MBPs, the status LEDs light up, so they are getting power, and mice plugged into the USB ports work fine.
    So, the problem seems to be specific to mounting a USB flash drive in 10.5/10.5.1. I'm not sure if this is specific to MacBook Pros, or if the issue is the same on all 10.5 machines.
    Any help would be appreciated.

    I have the USB problem. When I insert my USB memory pen, it flashes then stops. The icon doesn't come up on the Desktop, but the memory shows up on the System Profiler.
    My USB telephone responds in Skype, but the sound input and output don't show up in Preferences, and so the phone doesn't work.
    My Vodaphone USB internet modem won't connect.
    This morning, I have no sound at all.
    All these problems are resolved if the computer is restarted with the external source already plugged in, but it's a big hassle and must be solvable............

  • How do you save PDF to a USB flash drive from iPad 2

    How do you save PDF to a USB flash drive from iPad 2

    You can't, the camera kit connection kit which has a USB connection only supports the copying of photos and videos to the Photos app, and doesn't support the copying of any content off the iPad - you will either need to go via your computer.

  • Is there a way to protect a USB flash drive from virus?

    My daughter's school computer lab is seemingly infected with some PC virus but their school IT folks seem to be unable to clean them and with all the young kids using USB flash drives they brought these viruses home when they plug the flash drive into our home computer but luckily since we are using Mac at home and I have ClamXav installed it detected the virus immediately. So we are kind of safe but I am getting tired of removing this same virus every week using UNIX command in a terminal mode, as it's locked and can only removed using the sudo command (taught by some people). My questions are:
    1. Is there any way to protect a USB flash drive from virus infection (it's a window PC virus)
    2. is there a way or suggestion on how to stop these apart from dis-infecting the whole school computers? The problems are that these young kids are not aware of those viruses in their USB flash drives and their teachers are just too ignorant about it!
    Thanks for any suggestions and help

    I'd still invest in your case into Mac protection against passing along malware.
    Take a look at Intego AV for one for the Mac and for dual-protection.
    http://www.intego.com
    Whatever you are finding is 'dormant' I assume, but that doesn't mean it can't become active or passed along either. And there are some 'man in the middle' spyware and malware, some which target online home banking (some people run their home banking from a virtual OS that is used for that purpose only, I always wished Mac OS X could be run in a VM mode as well).
    The IT folks sound like they need... do their jobs properly and better.
    I don't care how young they are, or the staff's ignorance. Time for education is now.
    Download and install Microsoft Security Essentials in Windows and follow guidelines. And there are tons of FAQs, guidelines and articles on the subject.
    http://www.microsoft.com/Security_Essentials/
    http://www.microsoft.com/security/portal/
    Nearly six months after Apple added a malware blocker to Mac OS X (Snow Leopard), the feature appears to be collecting cobwebs.
    Apple has not added any anti-malware signature updates to the XProtect.plist file that launched with antidotes for OSX.RSPlug.A and OSX.Iservice, two known Trojan horse programs targeting Mac OS X users.
    http://blogs.zdnet.com/security/index.php?cat=20&submit=view

  • Mount a USB Flash Drive

    I am running a 1998 iMac with a PowerPC Processor. It has MacOS 8.5.1. I have a PNY 2 GB USB Flash Drive. How do I mount this.

    The link says it won't work with G3(which is what I have).
    Where does it say that? Both the 8.6 update and the USB Mass Storage Support 1.3.5 are OK for a 1998 iMac (with 8.5.1 right now). Since the USB Mass Storage Support 1.3.5 requires 8.6, install that update first.
    Oh, and I forgot to mention the only means of transporting data is through a CD(which I can burn).
    Yes, you can transfer files on a CD. Use a CD-R (not CD-RW).
    If you are using a PC for the downloads, make sure that the files are kept unaltered. Do not try to decode the MacBinary (.bin) on the PC. Once on the iMac, use an appropriate version of StuffIt Expander (which, hopefully, is there already) for the decoding (drag the .bin file onto the StuffIt Expander program icon). Otherwise, special software (such as TransMac) will be needed on the PC in order to correctly handle Mac files.
    The iMac is not connected to the internet.
    If necessary, that can be resolved within minutes. The iMac has a built-in modem for a dial-up connection, or it can be connected to a broadband router by means of an RJ-45 Ethernet cable.
    Jan

  • Making a bootable USB flash drive from PC

    My DVD drive on Imac is broken and won't recognize anything. It doesn't show up on disk utility and I can't make dmg file from it.
    So I have snow leopard DVD and I want to make a bootable USB flash drive on PC. I want to know how to copy the image from snow leopard dvd on PC. (windows xp)
    Please help!

    AFAIK, you can't use a PC. Consider one of these:
    http://www.amazon.com/LG-Super-Multi-SecurDisc-LightScribe-GE24LU20/dp/B003TTK2X 4/ref=lhni_t
    http://www.lg.com/us/computer-products/optical-media/LG-external-dvd-burner-GE24 LU20.jsp
    http://www.amazon.com/LaCie-16X-LightScribe-DVDRW-300982U/dp/B000BMNM9I#moreAbou tThisProduct

  • How do I safely remove my sd card and usb flash drives from my iMac?

    iMac newbie here.  After years of PC messes and crashes I finally converted to iMac.  However it's not always easy to find what I am looking for.  The first time I disconnected a usb flash drive a warning appeared on the screen.  I neglected to jot down the instructions.  Now I want to remove the SD card for my phone, and I don't want to mess anything up.  Can someone point me in the right direction?  Thanks.

    You posted in the iMac forum; to properly dismount any external drive from a Mac, drag its' icon to the trash can. Then you can unplug it. I don't have an iphone, so I can't answer that. You'd get more knowledgeable answers for that question in an iPhone forum.

  • [Help] How to wireless transfer data to an USB flash drive from an iPad mini 2

    Hi.
    I want to use my iPad for my exams, but I'm not allowed to use the internet to send my files under the exams, so I need an alternative way to do it. I want to copy pages, numbers and keynote files to a wireless USB flash drive when I'm done. Do you know a product that can do it, that is also available in the Amazon UK?
    Thanks.

    Hi Loner,
    Thanks for the reply.
    I have located the program and will give it a try.
    Cheers.

  • Unmounting USB flash drive from cRIO

    Hi all,
    I am using the USB port of a cRIO 9012 to save datafiles (using File I/O) to a USB flash drive.
    After having run the program, I want to unmount the USB drive. Can anyone please tell me if there is a better/nicer way than just taking it out? Since this might result into losing my data if the USB drive gets corrupt (just like under Windows).
    I have searched the forums, but I was not able to find anything on dismounting a USB drive on a cRIO...
    Hopefully you can help me solving this (little) problem.
    Thanks in advance,
    Joep

    Joep,
    under Windows there are two scenarios that could cause data corruption on a USB-Flash-Drive:
    The Flash-Drive is removed during a write operation. This potentially destroys the FAT which results in data loss. There is not much that you can do against this behavior, neither on Windows, nor under VxWorks.
    With caching enabled for the Flash-Drive there is a chance that files are not written to the drive completely because some parts of it are still sitting in the PC's memory. When the drive gets removed the data is corrupt.
    I don't think that VxWorks uses cache for mass storage devices at all so this issue shouldn't be relevant for a cRIO-9012, but I will double check if this is true.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • How to mount fat32 usb flash drive on 10.6.8?

    Hello there,
    I've read many posts about this problem but they don't work for me.
    I've a Kingstone flash drive 16GB that I use mainly to record videos from a Digital terrestrial tuner box or to watch vieos from internet on my videoprojector.
    It used to work fine, then I re formatted it  on the DTV box and recorded a couple of programs with the tuner and they show up correctly, but once connected to my iMac mid2011 usb port or MBPro I'm asked to initialize the drive or ignore, eject.
    - It doesn't show up in DiskUtility.
    - It does show up in System Profiler:
    DT R500:
      Capacity:    15.99 GB (15,988,686,848 bytes)
      Removable Media:    Yes
      Detachable Drive:    Yes
      BSD Name:    disk1
      Product ID:    0x1654
      Vendor ID:    0x0951  (Kingston Technology Company)
      Version:     1.00
      Serial Number:   
      Speed:    Up to 480 Mb/sec
      Manufacturer:    Kingston
      Location ID:    0xfd130000 / 6
      Current Available (mA):    500
      Current Required (mA):    300
      Partition Map Type:    MBR (Master Boot Record)
      S.M.A.R.T. status:    Not Supported
      Volumes:
      Capacity:    15.99 GB (15,988,654,080 bytes)
      Writable:    Yes
      BSD Name:    disk1s1
    - It does show up with mount command in Terminal:
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *16.0 GB    disk1
       1:             Windows_FAT_32                         16.0 GB    disk1s1
    - Tried to make a dir and then mount but with no success:
    sh-3.2# mount -t msdos  /dev/disk1s1 /Volumes/Kingstone/
    mount_msdos: /dev/disk1s1 on /Volumes/Kingstone: Invalid argument
    I just need to copy the recorded files and then format again the flash drive.
    Any suggestion?
    Thank you in advance!
    Piero

    "DTV box may not have formatted properly" --> I'd suspect something like that too...
    FAT32 is limited to file size of 4GB actually (minus one byte).
    In my experience you can copy a larger file to a FAT32 volume, let's say a video file, but when the copying process is finished, you notice the size is 4GB, and when you play the video it ends abruptly at this point.
    (another limit is limited file name length and limited use of characters in the filename. A slash for instance is not allowed.)
    Piero, did you try to connect your flash drive to a windows machine?

  • External USB drive wont mount but USB Flash Drive Wll?

    I have an external usb hard drive formatted to NTFS. When I plug it in it shows up in my file manager as New Volume.
    When I click on it I get an error message that says
    "Cannot get volume fstype alternative"
    I have made changes to PolicyKit and it didnt fix it.
    I also have a Corsair Flash Drive that has no problem mounting and I can access it without errors.
    I dont have a clue how to fix it since one works and the other doesnt.
    Any help would be greatly appreciated
    Last edited by ziegen (2009-06-07 02:22:15)

    Have you got ntfs-3g installed?

  • Install Arch in an USB Flash drive from an existing image

    I want to minimize the amount of writes to the flash drive by avoiding directly installing Arch into it.
    I would like to know if it would be possible to install arch into an small partition, configure it, and then make an image of it and dump it at the USB drive(like when creating the USB install).
    Does it worth the while doing so?
    Thanks!
    Last edited by cristian.rosa (2009-03-05 14:41:11)

    Sure.  You could do that, then just rsync or cp -ax it onto the Flash drive and set up GRUB.

  • I received our wedding photos on a USB flash drive from our professional photographer. I am trying to get these photos on my ipad 4.

    I have enough room on my ipad for all 600 photos.
    I have tried to sync the photos through iTunes by choosing the USB drive on my computer. The folder appears empty.
    I have purchased a lightning to USB camera kit and nothing happened once I plugged the USB into the ipad.
    I thought since the lighting to SD card reader I've been using with my camera works maybe I'll try uploading a photo or two onto the SD card and use the lighting to SD card reader and do it that way. I see the photo I chose on the camera when the SD card is inserted into my desktop, but once I insert it into the camera kit on ipad it doesn't show up. The other photos I have taken show up but not the ones I copied over onto it show up.
    I wonder if our photographer saved the photos in such a way to prevent me from syncing them? I have permission and the rights to use them so that's probably unlikely. The photos are saved as jpegs.
    My other thought is maybe the photos are too large in size to upload onto the ipad? Is there a limit? Under properties they are listed around 400kb and 1800x1200 in dimension.
    Please help! I'm wanting to make a photo book for the holidays as a gift with one of the ipad apps.
    Thank you in advance

    Hi Kat U,
    Many thanks for your question today.
    I am happy to assist you in this process and this method of helping you today will not involve you using your Camera Connection Kit from Apple.
    This method of downloading images onto the iPad requires the following items:
    The USB
    A computer/Mac with a USB Port
    The iPad
    iTunes (preferably iTunes 11, but it won't make much difference if you have iTunes 10)
    Before we start I have based this resolution on the basis that you use:
    iPad 4 with iOS 7.0.0 or better
    iTunes 10 or better
    Mac OS X Mountain Lion or better or Windows 7 or better
    Here are my steps to resolve your issue:
    Insert the USB drive into your computer and then go into the folder in windows explorer or finder where the images are saved on your USB.
    Save all the images from the USB under one folder on your own folder in your document/image folders (not on the USB). On the Hard Drive
    Remove your USB stick from your computer
    Insert your iPad with the lightning connector into your Mac/PC.
    When iTunes pops up click on the iPad icon/textbox - it may say (i.e. Name's iPad). (If iTunes does not pop up open it up manually by clicking twice on the icon on your desktop or Dock Taskbar).
    Click on Photo's Tab and the tick the tick box for: sync photos from
    Click my pictures (located next to sync photos from), then navigate around your folders until you choose the folder where you copied your images from the USB stick to and once you have found the folder click select folder.
    Press sync.
    Go to your iPad once it has synced and log in, click on photos then albums (located bottom right of the menu/screen) then click on the Album of the images - (its name will be what the Album's name was on your computer).
    Your images should be located there.
    If this resolution does not work, you have three other options
    Try the solution provided by the gentleman above using the Camera Connection Kit
    Call Apple - American number is 1800-MY-APPLE (1800-692-7753) and go through to AppleCare for iPad
    Take the USB and iPad to your closest Apple Store and get a Genius to look and possibly fix the problem.
    Many Thanks for your question and allowing me the time to possibly resolve your issue. I hope to hear from you soon regarding this issue.
    iBenjamin
    <Email Edited by Host>

  • Mount USB/Firewire drive from shell or cron job

    Is there a way to mount a USB/Firewire drive from the shell or possibly mount it using a cron job? Here's the situation. I have a user that keeps all of her data on her desktop or in her Documents folder. I have attached a firewire drive to her PowerMac G5 (OS 10.4.6) and successfully created cron jobs to backup her entire user folder every night. The problem is that she logs off of her computer before she leaves work. When she logs of the firewire drive unmounts and the cron job fails because it cannot find the drive. I was hoping there was a way to mount the drive using a script so that it will mount, let the cron job run, and then possibly unmount the drive afterwards. Any help with this would be much appreciated.
    MacMini, PowerMac G5, iMac   Mac OS X (10.4.7)  

    Try adding the following line to the beginning of the job:
    mount -a
    You may need to add u and/or w to the command after the a without any additional spaces for the mount to work properly.
    (13951)

Maybe you are looking for

  • When-new-block-instance trigger

    Hi All Could You please help me in writing this trigger ? My requirement is ' For one responsibility,Insert,Delete,Update and Query must be allowed and Other Responsibility,only Query should be allowed.Here the Responsibilities are 1. Purchasing Supe

  • How can I publish my iCal on my personal website using iCloud?

    I currently have a MobileMe account, a Mac running iCal, and I am using a plugin from Rapidweaver on my personal website so that I can make appointments on either my Mac, iPhone or iPad and they all sync together and also sync and show up on my onlin

  • Any way to get more statistics and response-time info from cache processes?

    I'm currently involved in an evaluation of Coherence for use as a global in-core cache/DB for data in the GB range. We'll try to run multiple cache process per cache in order to stay below 512MB heap-space per cache process. In order to tune cache ac

  • Acrobat Pro 9 Extended?

    Ok, I've been asking a lot of questions on this forum for a while, and now have another one. My boss has asked me to create a form-our company does document imaging, meaning we scan paper and help companies go paperless. One area in which we'd like t

  • Can the XML style sheet be embedded in the report file?

    My customer would like to be able to share test reports with several locations. The problem is that sending just the XML report file is not enough. The report file points to a style sheet that must exist at the specified path on the destination PC. I