Ubuntu - second hard drive?

LazyLion

King of de Jungle
Joined
Mar 17, 2005
Messages
107,423
Reaction score
9,943
Location
District 9
OK, there are some things that are still not so easy to do in Ubuntu! :eek:

I had two old Windows hard drives in the system when I installed Ubuntu. Ubuntu asked me if I wanted to use the entire first drive, but no option on the second drive. So after Ubuntu was installed the second drive was still an NTFS partition. So I managed to delete the NTFS partition and added a new partition and File System... This is what my drives look like now...

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 28521112 5110084 21973616 19% /
varrun 387640 116 387524 1% /var/run
varlock 387640 0 387640 0% /var/lock
udev 387640 56 387584 1% /dev
devshm 387640 52 387588 1% /dev/shm
lrm 387640 39760 347880 11% /lib/modules/2.6.24-19-generic/volatile
gvfs-fuse-daemon 28521112 5110084 21973616 19% /home/garyvdh/.gvfs
/dev/sdb1 38809480 49032 36804536 1% /media/disk

The second drive is sdb1

But now I can't do anything to this drive, won't let me write to it and I keep having to remount it.

I also can't edit my fstab file cos Ubuntu keeps telling me I don't have permission to do that.

so, how do I edit my fstab file... and what line do I put in there to mount the drive permanantly? ... and to enable read write permissions for all users? :confused:

garyvdh@garyvdh-ubuntu:~$ ls /dev/disk/by-uuid -l
total 0
lrwxrwxrwx 1 root root 10 2008-08-24 17:00 3bcf0b67-dd79-4c26-aedd-37254e50e06a -> ../../sda5
lrwxrwxrwx 1 root root 10 2008-08-24 17:00 61d2ea8f-96a5-4701-aa2b-35c3dfa882d1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2008-08-24 17:00 e49fb9a4-b793-49e1-8663-804d60f431cb -> ../../sdb1

Disk /dev/sda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00071985

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3579 28748286 83 Linux
/dev/sda2 3580 3738 1277167+ 5 Extended
/dev/sda5 3580 3738 1277136 82 Linux swap / Solaris

Disk /dev/sdb: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0e790e78

Device Boot Start End Blocks Id System
/dev/sdb1 1 4870 39118243+ 83 Linux
 
First of, what file system did you put on /dev/sdb1?

And what do you mean you do not have permission to write to /etc/fstab? Did you:
$sudo nano -w /etc/fstab

(I think Ubuntu comes with nano...)
 
thanks... I think I put ext3 as the File System

what line should I add to my FSTAB file? to mount it permanently as "DISK"?

how is this line?...

/dev/sdb1 /disk ext3 defaults,errors=remount-rw 0 1
 
Last edited:
Try this:
Code:
cd /
sudo mkdir /disk
sudo nano -w /etc/fstab

Add this line:
/dev/sdb1               /disk  ext3            noatime         0 0

Ctrl+o to save and Ctrl+x to exit
sudo chown +hR [your username] /disk
sudo mount -a

That should sort you.

edit:
Ubuntufied it
 
Try this:
Code:
cd /
sudo mkdir /disk
sudo nano -w /etc/fstab

Add this line:
/dev/sdb1               /disk  ext3            noatime         0 0

Ctrl+o to save and Ctrl+x to exit
sudo chown +hR [your username] /disk
sudo mount -a

That should sort you.

edit:
Ubuntufied it

Thanks... will try that at home tonight! :)
 
Try this:
Code:
cd /
sudo mkdir /disk
sudo nano -w /etc/fstab

Add this line:
/dev/sdb1               /disk  ext3            noatime         0 0

Ctrl+o to save and Ctrl+x to exit
sudo chown +hR [your username] /disk
sudo mount -a

That should sort you.

edit:
Ubuntufied it

This is the messages I get on the last two commands....

garyvdh@garyvdh-ubuntu:/$ sudo chown +hR [garyvdh] /disk
chown: invalid user: `+hR'
garyvdh@garyvdh-ubuntu:/$ sudo mount -a
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
 
Your username should not be in " [ ] "
sudo chown -hR garyvdh /disk

Oops, I also made a mistake, the + should be -.

Try that.
:p

Also, once it is mounted and you get an error of "Access denied", then do the chown again against the mounted volume, ie:
sudo chown -hR garyvdh /disk
mount -a
mkdir /disk/test
mkdir: cannot create directory `/disk/test': Permission denied
sudo chown -hR garyvdh /disk

That should sort you now.
 
Your username should not be in " [ ] "
sudo chown -hR garyvdh /disk

Oops, I also made a mistake, the + should be -.

Try that.
:p

Also, once it is mounted and you get an error of "Access denied", then do the chown again against the mounted volume, ie:
sudo chown -hR garyvdh /disk
mount -a
mkdir /disk/test
mkdir: cannot create directory `/disk/test': Permission denied
sudo chown -hR garyvdh /disk

That should sort you now.

OK, thanks! :)

Those two commands worked... I can now see the disk under /disk... but it is hanging off my root folder (is that OK?)

I can navigate to the disk folder and see the contents of the Hard Drive... I can also create folders there without a "denied" message.

But I don't see the disk appearing in my list of drives when I click on "places"?
 
Top
Sign up to the MyBroadband newsletter
X