0

Since I formatted my USB flash drive I can't access it. I get the error:

only system administrators have the permission to do this

I am new to Lubuntu 16.04.

Zanna
  • 70,465
  • There are tips in the following links, https://askubuntu.com/questions/895733/copying-files-to-a-usb-drive/895782#895782 , https://askubuntu.com/questions/881536/cannot-format-usb-flash-drive-after-creating-ubuntu-installation-disk/881551#881551 – sudodus Apr 16 '17 at 11:57

1 Answers1

1

Normally in Lubuntu 16.04.2, when using the desktop GUI, when you attach a properly formatted USB stick, it gets mounted automatically and a wizard says "Removable medium is inserted. Type of medium: removable disk. Please select the action you want to perform: Open in File Manager". You can click "Cancel" or "OK".

Normally the drive also shows as it's own icon on the desktop. You can then double-click to open it.

I don't know what happens in Lubuntu if the stick is not properly formatted. In any case, try selecting the start menu on the lower left corner, then Accessories and then Disks. Does it show the USB drive on the left side list? If so, click it on the list. Then make sure it is the USB drive, not a hard drive (e.g. check the size). Then select the Menu item which looks like three horizontal lines on top of each other. If Format Disk is not greyed out, select it.

If the disk doesn't show up in the Disks program, or if Format Disk is greyed out, then there might be some kind of a problem with the automount functionality. You could try reformatting the stick using another computer and/or operating system.

For more examples for using the Disk Utility, see the first section of How to format a USB or external drive?, although in the beginning it shows how to start the utility in the vanilla Ubuntu distribution.

If you are trying to use the command line, as a general rule, regular users do not have permissions to mount new devices or unmount old ones. GUI's usually ask for root permissions if the user tries to use the GUI to perform an action which needs root permissions. For mounting a USB stick, Lubuntu doesn't ask anything though, at least usually.

To open the command line terminal, select System Tools from the start menu, then LXTerminal. To obtain root privileges for a command, prefix it with sudo. For the first time or if you haven't issued a command as root in a while, it asks you to input your password, then attempts to run the command you issued. Normally USB sticks don't have a predefined mount point in Lubuntu, but there might be a dynamically allocated one in effect, or someone/something may have added a manual definition to /etc/fstab. So check whether there is a mount point entry for the USB stick:

mount

If there already is a mount in effect for a USB stick, it should like something like this:

/dev/sdb1 on /media/someuser/My Stick type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

If not, check for any definition resembling the above in /etc/fstab:

cat /etc/fstab

If there is a definition in /etc/fstab, it might be improperly defined. You could then backup /etc/fstab and use an editor (e.g. vim) to remove or change the entry.

If the USB stick is mounted but doesn't work, there might be something wrong with the (auto)mount or the formatting of the stick. I don't think I have ever used the command line to format a USB stick in Linux. But in case the stick is just incorrectly mounted, try unmounting the disk first, either based on the device name shown by mount, e.g.:

sudo umount /dev/sdb1

or the mount point, e.g.:

sudo umount "/media/someuser/My Stick"

Then try remounting the stick forcing the file system type, e.g. to use the vfat formatting. The first command makes sure the mount point exists as an empty directory:

mkdir -p "/media/someuser/My Stick"
sudo mount /dev/sdb1 "/media/someuser/My Stick" -t vfat

if vfat doesn't work, try using ntfs:

mkdir -p "/media/someuser/My Stick"
sudo mount /dev/sdb1 "/media/someuser/My Stick" -t ntfs

If there isn't a mount point shown by mount or /etc/fstab, you can try adding one and mounting the USB stick manually, although it may be difficult to guess the symbolic device ID under /dev/. Here it is assumed the USB stick is represented by the device /dev/sdb1 in Linux:

sudo mkdir -p /media/usb
sudo cp /etc/fstab /etc/fstab.bu
sudo sh -c 'echo "/dev/sdb1 /media/usb auto rw,nosuid,nodev,flush,errors=remount-ro" >> /etc/fstab'
sudo mount /dev/sdb1

If that doesn't work, you should return the original /etc/fstab configuration from the backup you created above with the cp command:

sudo cp /etc/fstab.bu /etc/fstab