Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)?
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" ...
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
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?
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.