Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-05-02 20:00:15

M_Mynaardt
Member
From: Victoria, BC, Canada
Registered: 2010-12-12
Posts: 30

Need HELP(!) with /etc/fstab & mkdir to mount spare HDD

Hi!

This is something I just cannot seem to figure out on my own this one is!  sad

My computer runs on Xubuntu (12.04 now) and I have an old hard drive from my previous PC installed internally.  Waste not want not, eh?  Before I got hooked on Xfce (and Xubuntu), I ran Mint 10 with Gnome.  Mint would automatically detect my extra hard drive and allow me to mount and unmount the extra disk with a right click on its icon on the desktop or the Nautilus file manager.  But such is not the case with Xubuntu.

I have had advice on how to be able to mount and unmount this extra drive by making appropriate changes to the /etc/fstab file.  I've been trying this today as many different ways as I can think of with the little knowledge I have on these weighty matters.  The results are always the same: the disk is sort of present, and I can even mount it.  However, I cannot actually save files to it!  This is inconvenient for a drive I'd like to use for backing up data!  tongue

What I want to have is a drive icon for this extra internal drive showing up on my desktop and Thunar so I can mount and unmount the drive with the ever-handy right click from the desktop any time I want.  Much like I was able to do with Mint 10.  I'm trying to make things work properly in the /etc/fstab file, which would have been created when I first installed Xubuntu 11.10 on my PC last year.

I think I'm not using mkdir properly to make a mount point.  I tried to use this to make a mount point:

# mkdir -m 777 /mnt/sparedrive

This did make the directory /mnt/sparedrive, but it does not seem to have the proper permissions when I try to access my extra drive using this as a mounting point.  Am I therefore using the mkdir command wrong?

I'm also not 100% sure if I'm making changes properly in /etc/fstab.  Here is what I tried:

/dev/sda1   /mnt/sparedrive   ext4   rw,exec,noauto,user,sync   0 0

This sort of works.  I can mount the drive, but then I can't actually write anything to it.  I'm not sure if it's because I didn't use mkdir properly.

I also like to be able to make use of the  floppy drive in this ageing computer of mine.  It just won't work.  If I insert a disk, I can hear something happening with the drive.  But it just won't mount.  It's not a big deal in this age of flash drives.  But it would be nice if I could make use of the gear I have on this old machine.  This is the /etc/fstab line for my floppy drive:

/dev/fd0    /media/floppy0    auto    rw,user,noauto,exec,utf8    0  0

If someone could help me with these posers, especially mounting the extra internal hard drive, I'd be ever so grateful!  big_smile

I'm sure I have most of the pieces of this puzzle.  But I'm just having troubles putting them together properly.

Thanks in advance, if someone can help me with this one!


~*~  M_Mynaardt  ~*~

Xfce is a computer's friend
Always trust an OS using Xfce

Offline

#2 2012-05-02 22:40:29

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: Need HELP(!) with /etc/fstab & mkdir to mount spare HDD

I'm not sure about the floppy, but I've had good luck with the following for hard disk partitions:

/dev/sda1 /mnt/sparedrive ext4    noauto,user,umask=0000 0 0

If this is the last line in /etc/fstab, make sure you hit Enter at the end of the line because mount will, I guarentee, complain if you don't.  And, if the rest of the file is lined up in columns, adjust the spacing to fit.  This isn't just (or even mostly) to make it look nice, it's to make it easier to read.  Once you have that done, try this from a terminal:

mount /dev/sda1

If all goes well, the drive will simply mount; if not, you'll be able to see any error messages.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#3 2012-05-02 22:47:29

M_Mynaardt
Member
From: Victoria, BC, Canada
Registered: 2010-12-12
Posts: 30

Re: Need HELP(!) with /etc/fstab & mkdir to mount spare HDD

Sideburns wrote:

I'm not sure about the floppy, but I've had good luck with the following for hard disk partitions:

/dev/sda1 /mnt/sparedrive ext4    noauto,user,umask=0000 0 0

If this is the last line in /etc/fstab, make sure you hit Enter at the end of the line because mount will, I guarantee, complain if you don't.  And, if the rest of the file is lined up in columns, adjust the spacing to fit.  This isn't just (or even mostly) to make it look nice, it's to make it easier to read.  Once you have that done, try this from a terminal:

mount /dev/sda1

If all goes well, the drive will simply mount; if not, you'll be able to see any error messages.

Thanks!  I'll give that a go and see how it goes.


~*~  M_Mynaardt  ~*~

Xfce is a computer's friend
Always trust an OS using Xfce

Offline

#4 2012-05-03 03:13:30

M_Mynaardt
Member
From: Victoria, BC, Canada
Registered: 2010-12-12
Posts: 30

Re: Need HELP(!) with /etc/fstab & mkdir to mount spare HDD

Sideburns wrote:

I'm not sure about the floppy, but I've had good luck with the following for hard disk partitions:

/dev/sda1 /mnt/sparedrive ext4    noauto,user,umask=0000 0 0

If this is the last line in /etc/fstab, make sure you hit Enter at the end of the line because mount will, I guarentee, complain if you don't.  And, if the rest of the file is lined up in columns, adjust the spacing to fit.  This isn't just (or even mostly) to make it look nice, it's to make it easier to read.  Once you have that done, try this from a terminal:

mount /dev/sda1

If all goes well, the drive will simply mount; if not, you'll be able to see any error messages.

Hi!

I tried you method and the results were; temperamental!  I tried and tried and still the same old stuff.  It worked once, then when I rebooted the computer to see if the changes stuck; I couldn't access the old hard drive.

I also got advice here to fix things up: http://ubuntuforums.org/showthread.php?t=1971485

What I overlooked was changing the permissions of my mount point at /mnt/sparedrive.  Even then it was a bit fussy.  I had to change the permissions with either $ sudo chmod -R 0777 /mnt/sparedrive or use $ sudo thunar /etc and then make changes to /etc/fstab.

I finally got the old HDD to work.  Not quite as I would've liked with an icon on the desktop I could use to mount or unmount the drive at will.  But I'm not complaining.  At least I can use this old drive after months of just looking at it and not being able to do anything with it.

This is definitely a DIY special sort of thing!

I also had to use the UUID (from $ sudo blkid) instead of just using /dev/sda1 to make things work right.

However, at the very least, you were right about fixing up my /etc/fstab file.  It was a bit of a mess.  Well, it was a lot of a mess, actually.  But I got it all tidied and prissy now.  Sort of looks like this:

#
# < FS >       <mount point>     <type> <options>                     <d> <p>
proc           /proc             proc   nodev,noexec,nosuid            0   0
UUID=[long#]   /                 ext4   errors=remount-ro,user_xattr   0   1
UUID=[long#]   none              swap   sw                             0   0
UUID=[long#]   /mnt/sparedrive   ext4   defaults                       0   0
/dev/fd0       /media/floppy0    auto   rw,user,noauto,exec,utf8       0   0

It was a good bit of progress.

Wish I could figure out how to get that antiquated old floppy to mount.  Waste not, want not, eh?  I'm not going to worry about that one, though!

Thanks for the input!  At the very least it helped me get some better awareness of what all this fstab stuff is all about!


~*~  M_Mynaardt  ~*~

Xfce is a computer's friend
Always trust an OS using Xfce

Offline

#5 2012-05-03 03:31:36

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: Need HELP(!) with /etc/fstab & mkdir to mount spare HDD

Using UUID when you have it is always a Good Idea, because that way you don't have to worry about which number the drive has.  And, if nothing else, tidying up fstab makes it much easier to read.  I know that it used to be created that way, but I guess that somebody decided that it wasn't worth the bother to keep it neat.

As long as simply using defaults works for you, great.  However, i've had trouble from time to time forcing drives to mount read/write, even when I'd specified rw so I suggested umask=0000 because that one's always worked for me, even when nothing else would.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#6 2012-05-03 04:09:49

M_Mynaardt
Member
From: Victoria, BC, Canada
Registered: 2010-12-12
Posts: 30

Re: Need HELP(!) with /etc/fstab & mkdir to mount spare HDD

Sideburns wrote:

Using UUID when you have it is always a Good Idea, because that way you don't have to worry about which number the drive has.  And, if nothing else, tidying up fstab makes it much easier to read.  I know that it used to be created that way, but I guess that somebody decided that it wasn't worth the bother to keep it neat.

As long as simply using defaults works for you, great.  However, i've had trouble from time to time forcing drives to mount read/write, even when I'd specified rw so I suggested umask=0000 because that one's always worked for me, even when nothing else would.

It was easy enough to get the UUID stuff.

The defaults thing for the old hard drive does work fine.  It seemed kind of odd that it worked once and then it didn't work when I rebooted the computer.  Mind you, I'd not really been aware of changing the permissions of the mount point using either using Thunar as the root user or that chmod thing.  Live and learn, eh?

But, at the very least, my fstab file is just so gosh-darn neat and tidy!

And I did learn a thing or two about what this fstab business is all about too.  And that's a good thing!


~*~  M_Mynaardt  ~*~

Xfce is a computer's friend
Always trust an OS using Xfce

Offline

#7 2012-05-03 17:55:43

M_Mynaardt
Member
From: Victoria, BC, Canada
Registered: 2010-12-12
Posts: 30

Re: Need HELP(!) with /etc/fstab & mkdir to mount spare HDD

Oh ... Heck!

I stumbled on the fact that the floppy drive in my old computer has been working all this time!

I thought it wasn't.  For the simple reason that nothing seemed to happen and no indication that it was mounted when I inserted a floppy disk!  But I checked it out today on a hunch.  It is on, actually.  If I open the mount point set in the /etc/fstab file (/media/floppy0), then there it is!

Sheesh!

Oh well, at least I know it works after all.

Even though it took me all this time to figure it out.

Since Xfce doesn't create a floppy icon on my desktop or in Thunar, I created my own little desktop icon to open the floppy with:

[Desktop Entry]
Encoding=UTF-8
Name=Floppy
Comment=Access a floppy drive, if one's inserted
Icon=/home/user/.extra-icons/floppy-blue-1.png
Exec=/usr/bin/thunar "/home/user/.dev-floppy"
Terminal=false
Type=Application

Lotsa fun!


~*~  M_Mynaardt  ~*~

Xfce is a computer's friend
Always trust an OS using Xfce

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 581.4 KiB (Peak: 598.24 KiB) ]