Feeds:
Posts
Comments

Posts Tagged ‘USB’

A couple of years or so ago, Ubuntu‘s file manager, Nautilus, gave you the ability to “Safely Remove Drive” when right-clicking an attached USB hard drive (or flash drive), rather than just simply “Unmount” it. The difference between the two is that when you simply unmount a drive, it is still listed as attached (but not mounted) in Nautilus‘s left-pane. For many, seeing the drive completely removed was reassuring, since it could then be unplugged safe in the knowledge there would be no data loss, or physical damage to the device.

However, in the Ubuntu 12.10 upgrade, we lost this option, and now only have “Unmount” and “Eject” (which is exactly the same as “Unmount“, except in the case of CD/DVD drives where it will eject the disc tray).

Device Context-Menu

While “Safely Remove Drive” may yet make a return (it has caused a flood of complaints about this backward move), for now you can do it via the command-line if you really prefer this to simply unmounting.

First, if you’re unsure what the drive’s address is, run the following in the terminal:

mount|grep ^'/dev'

If you only have one internal hard drive, and no other storage devices attached, it should be something like /dev/sdb. To safely unmount and totally remove the drive, enter the following command, replacing /dev/sdb with your own drive’s designation if need be:

udisks --unmount /dev/sdb1 && udisks --detach /dev/sdb

You should now see your drive disappear from the file manager’s left-pane.

Note that in the unlikely event you have a partition other than the first partition on the drive mounting, you will need to change the “1” (ie: sdb1) in the command to reflect that.

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »

Ubuntu is pretty awesome when it comes to automounting your drives and USB devices; in my experience, it is miles ahead of Windows, and it keeps getting better with each release. But for a greater level of control, you can’t beat the old-fashioned way: mounting your drives via fstab at boot.

While Ubuntu now mounts drives and partitions in folders with names based on the labels, which includes spaces in the names, fstab is a tad more touchy when it comes to this. If you try mounting a drive in fstab to a mount-point with a path name like /media/Windows XP, the mounting will fail because of the space. Usual methods to get around this, like close the path off with / (ie: /media/Windows XP/) or put it in quotes (ie: ‘/media/Windows XP’ or “/media/Windows XP”), will fail – but there is a solution other than replacing spaces with hypens or underscores.

Simply replace any spaces with \040, so your line in fstab should look something like:

UUID=1D666EVIL6661D /media/Windows\040XP

The drive will mount in the appropriate folder from then onwards (ie: /media/Windows XP), and there’s no need to reboot if you’re urgently trying to access a drive – simply open a terminal and run sudo mount -a to mount all devices in fstab.

°ºÒθÓº°¤°ºÒθÓº°¤°ºÒθÓº°

Just in case you are unfamiliar with fstab, the way you edit it is sudo gedit /etc/fstab. However, if you needed that bit of info, chances are you really shouldn’t be doing so, unless you’ve first read a little of the abundant info available out there on the subject of fstab and mounting drives in Ubuntu (and other Linux distros). The last thing you would want to do is render your system unbootable because you made an error in editing fstab. While this guide is just for how to deal with spaces in paths, still exercise caution if this is all new to you.

°ºÒθÓº°¤°ºÒθÓº°¤°ºÒθÓº°

☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻

Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!

Buy Ubuntu Genius a Beer to say Thanks!

Read Full Post »