LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-28-2007, 12:51 PM   #1
millertime588
LQ Newbie
 
Registered: Dec 2006
Location: PA, United States
Distribution: Vista
Posts: 14

Rep: Reputation: 0
Trying to install second hard drive on Ubuntu 6.10.


I've looked around on the Internet trying to find directions that actually work but I have had no luck. I have Ubuntu installed on hda and my second hard drive (I assume this should be hdb) is apparently not installed because my free space is showing something like 64gb and the two hard drives are 80gb a piece. I wasn't really sure how to set up the installation for Ubuntu when I first installed because it was only showing the option to install on hda or hdb, but not both so I just chose hda. Hopefully this is fixable without installing Ubuntu all over again.
 
Old 02-28-2007, 01:03 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
first you need to verify that it is hdb. how is it connected? or is it just like your primary one, hda (IDE drive)?
check the file 'messages' either in /var/ or /var/log.. look for /dev/hd and see if it detects it.

if you know its hdb then use either a graphical format utility or a command line one (fdisk or cfdisk). the device file your looking for to work with is /dev/hdb.. when you create a partition on it, that partition would be named /dev/hdb1. then format that partition as you wish (choosing size, filesystem).

after you have your partition set up, create a folder where you will always want it mounted.. say /mnt/hdb1 (or anyname--but in /mnt/ would be standard). then look at 'man mount' or search here on how to mount it.. and once you have your options for it as you want, you can add a line in your /etc/fstab file so that it is automatically mounted to the folder you specify, with the options you specify, at boot time.

hope it helps.
 
Old 02-28-2007, 01:14 PM   #3
millertime588
LQ Newbie
 
Registered: Dec 2006
Location: PA, United States
Distribution: Vista
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nadroj
first you need to verify that it is hdb. how is it connected? or is it just like your primary one, hda (IDE drive)?
check the file 'messages' either in /var/ or /var/log.. look for /dev/hd and see if it detects it.

if you know its hdb then use either a graphical format utility or a command line one (fdisk or cfdisk). the device file your looking for to work with is /dev/hdb.. when you create a partition on it, that partition would be named /dev/hdb1. then format that partition as you wish (choosing size, filesystem).

after you have your partition set up, create a folder where you will always want it mounted.. say /mnt/hdb1 (or anyname--but in /mnt/ would be standard). then look at 'man mount' or search here on how to mount it.. and once you have your options for it as you want, you can add a line in your /etc/fstab file so that it is automatically mounted to the folder you specify, with the options you specify, at boot time.

hope it helps.
I'm gonna try to comprehend all this, but if you happen to read this message could you try to dumb it down a little because I've only been running Linux for two weeks. Thanks for the quick response though.
 
Old 02-28-2007, 01:56 PM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
1) determine the connection of the hard drive.
your hda (current) hard drive is an IDE device. the cable is thick and probably all gray or all black, with 40-pins on the end. the way linux names IDE devices is /dev/hdX, where X is a letter a-z. /dev/hda means 'primary master IDE device', /dev/hdb is 'primary slave IDE device', /dev/hdc is 'secondary master IDE device', etc.
'primary' vs 'secondary' means how is the device connected to your motherboard. this connection is probably labeled.
'master' or 'slave' is determined by which part of the cable the drive is attatched to. IDE cables have 3 connections: 1-motherboard, 2-master device, 3-slave device. check how the new drive is connected or how the jumpers are set on the back of the hard drive to determine what it is.

if the drive is actually 'new', it is probably USB or SATA. if this is the case, the device file will be something else, i dont know what because i dont have any USB or SATA devices. i imagine its /dev/sda, though.

check the startup log named 'messages' (which may be located in either /var/log/ or just /var/). your looking for '/dev/hd' or '/dev/sd'. there should be at least 2--your current drive (/dev/hda) and your new one, which you have to determine.

2. set up the partition
once you have your proper device file name for your new hard drive (ill assume /dev/hdb), you have to create a partition on it and format before you can use it.
open a command window and use 'su' [enter] (then supply root user password) to switch user to root. check this link here on using cfdisk clicky. if you just want it to be all one big partition, then just make it the max size possible. for the filesystem i would pick reiserfs or ext3. dont forget to apply changes.
after applying this your new partition is ready. to use it you have to mount it.

3. mount your device
while still in the terminal window as 'root' user, create a folder where to mount your device. the best place would be in /mnt/, and name it whatever you want to identify it, ex 'mkdir /mnt/media'. this will be the place where, once mounted, you can access the files on your partition. now open the /etc/fstab file to add an entry for this device so its automatically mounted when you boot.

use any editor you want (vi, vim, etc), example 'pico /etc/fstab'. once in the editor, use the arrows to go to the end of the file and add a line such as this:
Code:
/dev/hdb1	 /mnt/media	  reiserfs	   auto,rw,user		0		2
of course you need to substitute the first 3 fields with the ones you chose. after adding this entry, press CTRL + X to save the file and exit the editor. type 'exit' in the console to return to your 'normal user' account, and run 'mount -a', to have the system mount all devices in /etc/fstab that arent already mounted. it _should_ mount your new entry, to the location you specified. now explore to the folder where you mounted, and try to create a file/folder there.

if the mount didnt work or if it says you dont have permissions, give us the errors, your /etc/fstab file, and any relevant parts of the messages log file mentioned earlier.

Last edited by nadroj; 02-28-2007 at 02:07 PM.
 
Old 02-28-2007, 03:40 PM   #5
millertime588
LQ Newbie
 
Registered: Dec 2006
Location: PA, United States
Distribution: Vista
Posts: 14

Original Poster
Rep: Reputation: 0
progress

I think it should be working now, but here's what I have:

shawn@shawn-desktop:~$ mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.17-10-generic/volatile type tmpfs (rw)
/dev/hdb1 on /media/hdb1 type ext3 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

The second drive is hdb, so it looks like its being mounted.

This is what I have in fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/hda1
UUID=fd721d8b-e8e7-4c98-809d-92eb66b77a63 / ext3 defaults,errors=remount-ro 0 1
/dev/hdb1 /media/hdb1 ext3 defaults 0 2
# /dev/hda5
UUID=5ed2883e-a1d2-4412-930d-3970c548acc0 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 user,noauto


When I open up the filesystem, the status bar at the bottom still says Free Space: 65.1 GB so is the second hard drive actually mounted or not?
 
Old 02-28-2007, 05:17 PM   #6
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
what does 'df -h' say? also 'fdisk /dev/hdb'
can you create files on the drive?

Last edited by nadroj; 02-28-2007 at 05:18 PM.
 
Old 02-28-2007, 05:55 PM   #7
millertime588
LQ Newbie
 
Registered: Dec 2006
Location: PA, United States
Distribution: Vista
Posts: 14

Original Poster
Rep: Reputation: 0
shawn@shawn-desktop:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 71G 2.8G 65G 5% /
varrun 506M 80K 506M 1% /var/run
varlock 506M 0 506M 0% /var/lock
procbususb 10M 132K 9.9M 2% /proc/bus/usb
udev 10M 132K 9.9M 2% /dev
devshm 506M 0 506M 0% /dev/shm
lrm 506M 18M 489M 4% /lib/modules/2.6.17-11-generic/volatile
/dev/hdb1 74G 129M 70G 1% /media/hdb1

shawn@shawn-desktop:~$ fdisk /dev/hdb

Unable to open /dev/hdb
 
Old 02-28-2007, 06:03 PM   #8
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
its saying your first/primary/root hard drive is 71GB and your new hard drive is 74GB.
i imagine the capacity it physically states on your drives are 75GB and 80GB, respectively. so what you have seems to be correct.

my 160GB drive is actually only 149GB. the companies measure their capacities different from what you think they actually are, so you think you are getting a little more than you really are. i believe they measure 1MB = 1000KB, whereas actually 1MB = 1024KB.

Last edited by nadroj; 02-28-2007 at 06:04 PM.
 
  


Reply

Tags
harddrive


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
repartitioned xp 2nd hard drive while trying to install Ubuntu-now shows up as "Bad" pulper Linux - Hardware 2 08-23-2006 01:41 PM
ubuntu partitioning tool does not see external usb hard drive when installing ubuntu fakie_flip Linux - Software 2 07-30-2006 12:44 AM
Hard drive no longer detected after failed Ubuntu install Peepsalot Linux - Hardware 9 05-29-2006 10:52 PM
Ubuntu and Quantum hard drive pelgrimforever Ubuntu 0 04-07-2006 05:34 AM
USB Hard drive in Ubuntu NeoChaosX Linux - Hardware 1 06-26-2005 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration