Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

How do we add a new hard drive to ubuntu?

  Date: Jan 04    Category: Unix / Linux / Ubuntu    Views: 361
  


Im just a 5 month old user of ubuntu, so forgive me if the questions that I
ask are silly.

I installed ubuntu feisty fawn on my AMD PC with a 160 GB Hard Drive. Now
this hard drive has become full and I had to install a second hard drive,
which was also 160 GB

I formatted it with gnome partition
managerwww.google.com/url?sa=t&ct=res&cd=1&url=http%253A%252F%252Fgparte\
d.sourceforge.net%252F&ei=i7vBRqa4LYqEswLH9Ki1CA&usg=AFQjCNE-yW-wQWqO1Bav4GDAUXM\
WTtaq8A&sig2=deGZNuTYffdHXfgSaS67VQ>and
it got mounted as a removable drive. When i rebooted it, it went away.
I
run ubuntu alone on my system, since i find it very suitable for my
requirements.

I would love to know how to mount it as a home2 or something

Share: 

 

7 Answers Found

 
Answer #1    Answered On: Jan 04    


You'll need to add an entry to "/etc/fstab".

sudo gedit /etc/fstab

see: http://www.tuxfiles.org/linuxhelp/fstab.html

If you mount the drive under "/media", it will show up as a folder on your
desktop. If you mount to "/mnt", it will not. For permanent physical
mounts, I put mine under "/mnt".

 
Answer #2    Answered On: Jan 04    


Something funny is going on on my box. The new hard disk is detected as sda1
and the old hard diks is sdb1 and sdb5, this is what i see from the
partition manager and the /dev folder.

The fstab file reads as follows.

# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
# /dev/sda1
UUID=d413be62-1dc0-434e-8272-23e4fea9a0be / ext3
defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=55873b01-c1ff-463e-9be6-e6d31cb2b3f7 none swap
sw 0 0
/dev/cdrom /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/ /media/floppy0 auto rw,user,noauto 0 0

and its mentioned sda1 and sda5 where it should actually be sdb1 and sdb5
from what i see in the dev folder, but still it seems to be working.

now how do i mount the 2nd hard drive? what is the mount point? and should i
rename the current sda to sdb and mount the new drive as sda to avoid
conflict?

 
Answer #3    Answered On: Jan 04    


# /dev/sda1

The above line in /etc/fstab is a comment whereas the UUID is a Universal
ID number. The comment was created when you installed Ubuntu; when you only
had one drive.

You can edit the comment to reflect the newly designated device name if you
want to avoid confusion in the future.

I put an entry on my LUG site this morning concerning the UUID. You can
read it here:

http://hllug.org/index.php?topic=LinuxTips

Type "df" in a terminal to determine what the device name is of the mounted
drives.

$ df

You can use gparted to determine the partition names of the new drive and
mount it accordingly. For example if the new drive is denoted as
"/dev/sda1", your fstab entry might look like:

/dev/sda1 /mnt/somename ext3 rw,auto,exec,user 0 2

You will need to create the directory under mount.

$ sudo mkdir /mnt/somename
$ sudo chown yourhome:yourgroup /mnt/somename

After you make the fstab entry and create the directory try mounting the
drive manually. Then try to create directories and copy files. If all is
OK, then the next time you boot-up, the new partition will be automaticly
mounted for you.

$ mount /mnt/somename

 
Answer #4    Answered On: Jan 04    


Followed your advise and the drive got mounted. However there is one small
problem. Am unable to create anything new in that drive. The paste option is
disabled fully. rw permission given in fstab. Any other permission left to
be given?

 
Answer #5    Answered On: Jan 04    


try what I suggested:

rw,auto,exec,user

 
Answer #6    Answered On: Jan 04    


/dev/sda1 /mnt/home2 ext3 rw,auto,exec,user 0 2 is the LIne I had added to
fstab. Still it isnt working

 
Answer #7    Answered On: Jan 04    


try this: (substitue user:group)
========
sudo chown -R user:group /mnt/home2

Then see if you can create files on the /mnt/home2

If so, reboot and see if it mounts with your user:group and you can still
read/write to /mnt/home2

check user:group using ls -l:
============================
ls -l /mnt/home2

If problems persists, I will check my machine at home as I did mounted an
ext3 partition for a similar purpose a week ago.

 
Didn't find what you were looking for? Find more on How do we add a new hard drive to ubuntu? Or get search suggestion and latest updates.




Tagged: