As I mentioned in my last post, I recently picked up a Western Digital My Book Essential 1 TB external hard drive. Although it doesn't as yet display the same problems that my Simpletech hard drive was having, it does come with an annoying Virtual CD installed, literally in the unit's firmware, that contains Western Digital's SmartWare backup software. Of course the software is not linux compatible and wouldn't be something I would want to use anyway. The big question I had was: how do I get rid of it?
Well the problem has been well documented on the internet, with many people complaining about it. I found a helpful comment on a blog maintained by a mac admin. User 'yakkoj' suggests in his comment to make an entry in the /etc/fstab file on your mac that basically tells Mac OSX to ignore the Virtual CD so that it doesn't load and show up on your desktop. As Mac OSX is a relative of Linux, his comment was easily adaptable as a solution for my Ubuntu system too! Following is the line that I put in my /etc/fstab file and I can vouch that I now no longer see an icon for the WD Smartware Virtual CD on my desktop:
/dev/sr1 none udf rw,noauto 0 0
The Virtual CD always shows up as /dev/sr1, and I don't think there's any danger of other devices taking up that partition label. So, put the above line into your /etc/fstab file, and it will basically tell Linux that any time a device pops up and wants to inhabit the /dev/sr1 partition then it shouldn't be mounted at all. Then you will no longer have to stare at the dumb WD SmartWare icon on your linux desktop again! However, please note that this does not in fact rid the hard drive of the software, it just tells your computer to ignore it.
Showing posts with label External Hard Drive. Show all posts
Showing posts with label External Hard Drive. Show all posts
Thursday, January 14, 2010
Wednesday, January 13, 2010
Bye bye Simpletech and Windows, Hello more space for Ubuntu!
Today I exchanged my terrible terrible Simpletech 500GB [re]Drive for a sleek looking Western Digital 1TB My Book Essential. After filling the new backup drive with the files I previously had on the Simpletech, I had a mind to doing some spring cleaning on my Windows Vista partition.
Yes, I still had Windows Vista after approximately 5 months of using Ubuntu as my primary operating system. I moved some files and folders that I wanted to keep from my Vista partition to the backup drive and then thought it was about time to get rid of Windows and its partition. I never use it anymore! I only had 45 GB allocated to my active Linux partition (ext4 filesystem) and space was beginning to look a little scarce.
So I downloaded a Knoppix iso (little did I know it was German!), burned it to CD, booted off of it, used GParted to get rid of my Windows partition and resized my active Linux partition. It took about 40 minutes to complete but now my computer is rid of Windows! Now Ubuntu has a 148 GB partition to run off of with 120 GB of free space :)
Bye bye Windows, nice knowing ya!
Yes, I still had Windows Vista after approximately 5 months of using Ubuntu as my primary operating system. I moved some files and folders that I wanted to keep from my Vista partition to the backup drive and then thought it was about time to get rid of Windows and its partition. I never use it anymore! I only had 45 GB allocated to my active Linux partition (ext4 filesystem) and space was beginning to look a little scarce.
So I downloaded a Knoppix iso (little did I know it was German!), burned it to CD, booted off of it, used GParted to get rid of my Windows partition and resized my active Linux partition. It took about 40 minutes to complete but now my computer is rid of Windows! Now Ubuntu has a 148 GB partition to run off of with 120 GB of free space :)
Bye bye Windows, nice knowing ya!
Labels:
External Hard Drive,
GParted,
Partitioning,
Resizing,
Simpletech,
Western Digital
Saturday, December 26, 2009
Permissions, Samba Sharing an External NTFS drive, and fstab
For my first post on this blog I wrote about setting up samba shares for my printer and external hard drive. When I wrote that entry, I thought I finally succeeded in sharing both devices. I was disappointed to learn that my solution was temporary, and my external USB hard drive was still unable to be shared with my wife's Windows XP machine.
After hours and hours of pursuing the solution to this problem like Captain Ahab come to life, I started to realize that my problem wasn't anything to do with Samba itself, but the permissions that were automatically assigned to my external hard drive upon its mounting. Every time I looked at the extended information given by the ls -l command in my /media directory, I saw the following:
drwx------ 1 inkhorn inkhorn 4096 2009-12-06 18:24 backup
In other words, my external hard drive was mounted so that I personally would have read, write and execute access to the drive, that I could mount and unmount it, but nobody else could access my drive in any way at all.
From googling my problem, I learned that if you modify the fstab (file system table) file in the /etc directory, you can change the permissions linux assigns to your hard drive when mounting it. I found numerous message board postings with examples of how to set up an entry for your hard drive in the fstab file, but none of them helped for very long. Finally I found a web page that described a program available to Ubuntu users called pysdm (Python Storage Device Manager) that provides a GUI allowing the user to set permissions for any attached storage devices.
As you can see above, it displays all connected partitions and provides an Assistant button that allows you to choose your mounting options intelligently. In my case, without having a USB stick connected first, my external hard drive shows up as partition sdb1, or /dev/sdb1.
When you click on the Assistant button, you're brought to the above Select options window. Most of these options were already set as enabled when this window popped up. I think the only option here that I changed was to enable Allow a user to mount and unmount the file system.
I then found an option I thought might be important in the Miscellaneous tab. I enabled the option above labelled This file system requires network. So, I pressed OK, then at the main window I pressed the Apply button. There was one catch however: the line that it automatically entered into my /etc/fstab file linked the partition to the mounting point, not the device itself. See the fstab entry below:
/dev/sdb1 /media/backup ntfs nls=iso8859-1,_netdev,umask=000,user,owner 0 0
In other words, what this entry in my fstab file says is that any time partition /dev/sdb1 comes online, mount it to /media/backup; even if /dev/sdb1 is my USB stick, and not my external hard drive! You see what I mean?
This is where what's called the UUID comes in handy. The UUID is an alphanumeric sequence that uniquely identifies each connected storage device independently of the partition assigned to that device. After all, if I connect my USB stick and then my external hard drive, it's my USB stick that would show up as partition sdb1, while my external hard drive would show up as partition sdc1. In order to make sure that it's my external hard drive that gets mounted as /media/backup and not my USB stick, I had to replace /dev/sdb1 with the UUID. To find out the UUID of a connected device, go to the terminal and type in sudo blkid. Here's the output on my terminal:
inkhorn@inkhorn-laptop:/media$ sudo blkid
/dev/sda1: UUID="2fb4ca03-eca7-41f8-9767-bbfaf88a1890" TYPE="swap"
/dev/sda2: UUID="34B836C6B8368700" LABEL="S3A6134D002" TYPE="ntfs"
/dev/sda5: UUID="ece79ff2-c123-4a72-80a9-c187b2cfd785" TYPE="ext4"
/dev/sdb1: UUID="010C7CC23301CA6C" LABEL="backup" TYPE="ntfs"
So, I opened up the fstab file again and replaced /dev/sdb1 with UUID=010C7CC23301CA6C. I then saved the fstab file, restarted, and VOILA!!! My Samba share for my external hard drive is finally accessible from my Wife's Windows XP machine!
If you want to install pysdm on your Ubuntu system, type the following in your terminal:
sudo apt-get install pysdm
Then you can access it through the following menu items: System > Administration > Storage Device Manager.
After hours and hours of pursuing the solution to this problem like Captain Ahab come to life, I started to realize that my problem wasn't anything to do with Samba itself, but the permissions that were automatically assigned to my external hard drive upon its mounting. Every time I looked at the extended information given by the ls -l command in my /media directory, I saw the following:
drwx------ 1 inkhorn inkhorn 4096 2009-12-06 18:24 backup
In other words, my external hard drive was mounted so that I personally would have read, write and execute access to the drive, that I could mount and unmount it, but nobody else could access my drive in any way at all.
From googling my problem, I learned that if you modify the fstab (file system table) file in the /etc directory, you can change the permissions linux assigns to your hard drive when mounting it. I found numerous message board postings with examples of how to set up an entry for your hard drive in the fstab file, but none of them helped for very long. Finally I found a web page that described a program available to Ubuntu users called pysdm (Python Storage Device Manager) that provides a GUI allowing the user to set permissions for any attached storage devices.
As you can see above, it displays all connected partitions and provides an Assistant button that allows you to choose your mounting options intelligently. In my case, without having a USB stick connected first, my external hard drive shows up as partition sdb1, or /dev/sdb1.
When you click on the Assistant button, you're brought to the above Select options window. Most of these options were already set as enabled when this window popped up. I think the only option here that I changed was to enable Allow a user to mount and unmount the file system.
I then found an option I thought might be important in the Miscellaneous tab. I enabled the option above labelled This file system requires network. So, I pressed OK, then at the main window I pressed the Apply button. There was one catch however: the line that it automatically entered into my /etc/fstab file linked the partition to the mounting point, not the device itself. See the fstab entry below:
/dev/sdb1 /media/backup ntfs nls=iso8859-1,_netdev,umask=000,user,owner 0 0
In other words, what this entry in my fstab file says is that any time partition /dev/sdb1 comes online, mount it to /media/backup; even if /dev/sdb1 is my USB stick, and not my external hard drive! You see what I mean?
This is where what's called the UUID comes in handy. The UUID is an alphanumeric sequence that uniquely identifies each connected storage device independently of the partition assigned to that device. After all, if I connect my USB stick and then my external hard drive, it's my USB stick that would show up as partition sdb1, while my external hard drive would show up as partition sdc1. In order to make sure that it's my external hard drive that gets mounted as /media/backup and not my USB stick, I had to replace /dev/sdb1 with the UUID. To find out the UUID of a connected device, go to the terminal and type in sudo blkid. Here's the output on my terminal:
inkhorn@inkhorn-laptop:/media$ sudo blkid
/dev/sda1: UUID="2fb4ca03-eca7-41f8-9767-bbfaf88a1890" TYPE="swap"
/dev/sda2: UUID="34B836C6B8368700" LABEL="S3A6134D002" TYPE="ntfs"
/dev/sda5: UUID="ece79ff2-c123-4a72-80a9-c187b2cfd785" TYPE="ext4"
/dev/sdb1: UUID="010C7CC23301CA6C" LABEL="backup" TYPE="ntfs"
So, I opened up the fstab file again and replaced /dev/sdb1 with UUID=010C7CC23301CA6C. I then saved the fstab file, restarted, and VOILA!!! My Samba share for my external hard drive is finally accessible from my Wife's Windows XP machine!
If you want to install pysdm on your Ubuntu system, type the following in your terminal:
sudo apt-get install pysdm
Then you can access it through the following menu items: System > Administration > Storage Device Manager.
Labels:
External Hard Drive,
File Sharing,
fstab,
Networking,
Permissions,
Samba
Subscribe to:
Posts (Atom)