LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-11-2003, 11:33 AM   #1
jwchanman
LQ Newbie
 
Registered: Feb 2003
Location: San Diego
Distribution: RedHat
Posts: 6

Rep: Reputation: 0
Hard Drive Woes


I just bought a new Ultra DMA 100 Seagate 120 GB Hard Drive for my computer and tried to install it on my linux box. After I setup everything, the hard drive capacity is only 1/6 of the total (df -hs /share shows only 17GB). I don't know what I'm doing wrong.

Here is a little backgound on the issue: I have a asus psb-s motherboard with a scsci hard drive drive, cdrom and harddrive which are connected to my ide channels two and one respectively. My cdrom is setup as a slave and my new harddrive is setup as the master. When I got into the bios and tried to auto-detect the new harddrive, my bios stalls. If i continue with the boot-up (scsci drive is set up in bios to boot first) i get to linux. Within linux, it detects my new harddrive. After I setup the harddrive within linux using fdisk and mkfs (ext2) and mount the new hard drive to /share I use df -hs /share and find out that the detected capacity of my 120GB harddrive is only 17GB.

Does the ext2 file system have a maximum size for partitions that i'm not aware of? Did I setup my cdrom and harddrive wrong (slave vs master settings)?

Very Confused,
Jesse
 
Old 02-11-2003, 12:30 PM   #2
finidi
Member
 
Registered: Dec 2002
Location: World
Distribution: Fedora Core 4
Posts: 127

Rep: Reputation: 15
Could you see if the kernel is recognizing the IDE drive well at bootup ? look at the file /var/log/dmesg. There will be some lines regarding your new drive. Apparently it does, but look for the model / geometry / sizes stated there.
If the kernel sees it well, then you could issue from the root console an "fdisk /dev/hdx" command, where the last x must be substituted by the actual letter (a=first channel ide, master b=first channel ide, slave) and so on. Then you modify the partition table for the drive, define one or more partitions, its sizes, its types, ....
After creating a new partition layout then must create filesystems on every partition, mount partitions and get the free space with "df" ...
 
Old 02-11-2003, 01:08 PM   #3
jwchanman
LQ Newbie
 
Registered: Feb 2003
Location: San Diego
Distribution: RedHat
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you much for your reply. I did check dmesg and the kernel did correctly identifiy the make and model of my hard drive. I just wanted one partition on the new harddrive so through fdisk i used the following options

fdisk /dev/hda

n (new)
p (primary)
1 (one partition)
used defaults for start and end cylinder
(used the maximum fdisk detected) I would check all the settings for you and give output, but i'm currently at work.
w (write partition table)


after i set up the partitions i issued the
mkfs -t ext2 /dev/hda1

then

mkdir /share
mount /dev/hda1 /share

df -hs then reported the 17GB partition

did i do something wrong?

Thanks
 
Old 02-11-2003, 11:36 PM   #4
jwchanman
LQ Newbie
 
Registered: Feb 2003
Location: San Diego
Distribution: RedHat
Posts: 6

Original Poster
Rep: Reputation: 0
When i got home and checked dmesg again it gave me the following information about my hard drive:

hda: ST3120023A, ATA DISK drive
hdd: COMPAQ SC-140S, ATAPI CD/DVD-ROM drive
ide2: ports already in use, skipping probe
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=232581/16/63, UDMA(33)

Here is tells me that it is in fact 120 GB. When i ran fdisk on /dev/hda here is what it reports:

Disk /dev/hda: 16 heads, 63 sectors, 35973 cylinders
Units = cylinders of 1008 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 35973 18130360+ 83 Linux

When i went into fdisk again (fdisk /dev/hda) to change the number of cylinders, heads, and sectors it would let me set everything right but the cylinders. The maximum amount it would give me for cylinders was:

Expert command (m for help): c
Number of cylinders (1-131071, default 35973): 131071

After i set the cylinders and made the filesystem on the new partition and mounted it reported the size to be
62GB. How might I increase it to the 120 GB that my hard drive supports?

Thanks in advance,
Jesse
 
Old 02-12-2003, 12:41 AM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I can only find P2B motherboard models. There isn't any PSB models.

Did you look at
http://www.asus.com.tw/support/faq/q...Language=en-us

You may need to do a BIOS upgrade.

If possible set your drive to LBA.

Also have a look at
http://www.asus.com.tw/support/faq/faq.aspx
and type in p2b under "Search KB for"

You may want to download the new version of fdisk for DOS. I don't know if UNIX/LINUX has a new version of fdisk that supports very high capacity hard drives.
 
Old 02-12-2003, 03:43 AM   #6
finidi
Member
 
Registered: Dec 2002
Location: World
Distribution: Fedora Core 4
Posts: 127

Rep: Reputation: 15
One question, what's the size of your SCSI (boot) disk ??
 
Old 02-12-2003, 04:21 AM   #7
jwchanman
LQ Newbie
 
Registered: Feb 2003
Location: San Diego
Distribution: RedHat
Posts: 6

Original Poster
Rep: Reputation: 0
scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.4
<Adaptec aic7890/91 Ultra2 SCSI adapter>
aic7890/91: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs

Vendor: IBM Model: DDRS-39130D Rev: DC1B
Type: Direct-Access ANSI SCSI revision: 02
(scsi0:A:0): 80.000MB/s transfers (40.000MHz, offset 15, 16bit)
scsi0:A:0:0: Tagged Queuing enabled. Depth 253
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 17850000 512-byte hdwr sectors (9139 MB)
sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 >

It's 9 GB and set as the bootable hardrive.
 
Old 02-12-2003, 04:23 AM   #8
jwchanman
LQ Newbie
 
Registered: Feb 2003
Location: San Diego
Distribution: RedHat
Posts: 6

Original Poster
Rep: Reputation: 0
Here is the partition table for my scsi drive:
Disk /dev/sda: 255 heads, 63 sectors, 1111 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3 24066 83 Linux
/dev/sda2 4 1111 8900010 5 Extended
/dev/sda5 4 491 3919828+ 83 Linux
/dev/sda6 492 979 3919828+ 83 Linux
/dev/sda7 980 1012 265041 83 Linux
/dev/sda8 1013 1045 265041 83 Linux
/dev/sda9 1046 1078 265041 82 Linux swap
 
Old 02-12-2003, 06:30 AM   #9
finidi
Member
 
Registered: Dec 2002
Location: World
Distribution: Fedora Core 4
Posts: 127

Rep: Reputation: 15
1) The ide driver reports correctly the size, but giving a CHS with a number of cylinders too big (> 65535 !)
2) fdisk reports less number of cylinders. Fdisk accesses the partition table, structure shared with other systems (some of which uses BIOS to access the drive).

The solution seems to be your BIOS must recognize the thing, set LBA mode and the fake CHS parameters, in order to fdisk can do well its job.

I was curious on the SCSI for if the ide driver was catching its geometry, but seems not the case.

This is a preliminary response -- I'm not sitted in front of my penguin.

Last edited by finidi; 02-12-2003 at 06:31 AM.
 
Old 02-12-2003, 11:03 AM   #10
finidi
Member
 
Registered: Dec 2002
Location: World
Distribution: Fedora Core 4
Posts: 127

Rep: Reputation: 15
... Now I am

If you're running a modern distro with a recent kernel (2.4), no problem to address your 120 GB HD, but you MUST set LBA mode at the BIOS (this implies a BIOS upgrade), then fdisk will report the "fake" geometry and big partitions could be defined with linux's fdisk. The actual limit is 137 GB, except for the last 2.5.x kernels (development) which has ATA6 in.

Flashing the BIOS is a delicate operation, be careful.

When LBA mode is set, CHS at kernel bootup will show something like 7297/255/63 (my 60 Gb drive) --- ever heads and sectors at the maximum --> xxxx/255/63

HTH,
 
Old 02-12-2003, 11:17 AM   #11
jwchanman
LQ Newbie
 
Registered: Feb 2003
Location: San Diego
Distribution: RedHat
Posts: 6

Original Poster
Rep: Reputation: 0
I have redhat 6.2 with a 2.4.16 kernel. I'll look on asus's site for the bios upgrade you were talking about. Once I get this done, probably in a couple of days, i'll get back to you.

Thank you much for your recent help.

Cheers,
Jesse
 
Old 02-12-2003, 12:28 PM   #12
finidi
Member
 
Registered: Dec 2002
Location: World
Distribution: Fedora Core 4
Posts: 127

Rep: Reputation: 15
Right, I'll be here. Good luck at flashing the BIOS... I did it 3 times to my previous mobo (AOpen) without a problem.

Cheers,
George
 
  


Reply



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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
hard drive woes FliesLikeABrick Linux - Hardware 3 10-10-2005 02:12 AM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 02:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:43 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