Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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've been searching around for a solution to this, but I haven't been able to find one. I have a 80GB hard drive that I am trying to install Mandriva 2006 on. When I went to partition the drive, it said that the size of the drive was 2GB. There is 40GB of unallocated space and a 40GB NTFS partition (which are displayed correctly), but when I try to make a partition past 2GB, it says that it goes past the end of the drive. Any help with this issue would be greatly appreciated.
The machine is 5 year-old Gateway machine. The primary hard drive is 20GB and has Windows XP installed on it and the slave drive is 80GB and has 40GB unallocated space where I plan to install Mandriva and 40GB NTFS partition for storing some extra things that don't fit on the 20GB drive. Windows XP sees the 80GB drive fine, but Linux and DOS utilities see it as 2GB. I would expect DOS FDISK to see the drive as 8GB as it usually does, but it tells me that it is 2GB. I have the newest BIOS available on the Gateway support site, but it is dated 12/5/01 and I'm not sure if there is anything newer.
Here is the output of fdisk -l:
Disk /dev/hda: 20.5 GB, 20576747520 bytes
255 heads, 63 sectors/track, 2501 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 2501 20089251 7 HPFS/NTFS
Disk /dev/hdb: 2111 MB, 2111864832 bytes
64 heads, 63 sectors/track, 1023 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 20319 38764 37187136 7 HPFS/NTFS
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(1023, 0, 1) logical=(20318, 0, 1)
Partition 1 has different physical/logical endings:
phys=(1023, 63, 63) logical=(38763, 63, 63)
Last edited by kitaru2004; 12-22-2005 at 02:34 PM.
The existing MBR might be messed up, or if it's set up as a dynamic disk, Linux fdisk might be confused. Try overwriting the MBR and the first few sectors of the partition by:
dd if=/dev/zero of=/dev/hdb bs=512 count=4
(warning: doing this will render the data inaccessible permanently. If you give a crap about the data on the drive, DON'T do this)
Then, reboot and then see if the drive is now enumerated properly.
I could be off base here, but the problem you're having looks a lot like problems I had when I added a 160G drive to my system.
Did you set the jumpers on the primary drive to Master? As the only disk on the system, the jumper was probably set to Master Single (or some such thing).
Did you set the jumper on the new drive to Slave?
Did you edit the BIOS entry for the new drive to enter the cylinders, sectors, and heads, and set the mode to LBA?
You can get the cylinders, sectors, heads info from the decal on the back of the drive.
I forgot to do that part and couldn't use more that 2G of 160G until I corrected my oversight.
Looking at the information in your post, the info on hdb is definitely not correct for the size of the disk (not enough heads and cylinders).
The jumper settings are correct, this drive used to work perfectly with Windows and Linux. I previously had Knoppix installed on it and it worked fine (though I ran into various eccentricities with the 1024 cylinder limit on booting and Windows 9X detecting partitions). I was having problems tweaking my partition scheme to accommodate the 1024 cylinder limit when attempting to install Mandriva, and one time I boot it and it no longer detects the drive correctly. I am currently backing up the contents of the drive so I can do whatever nasty things I need to (such as clearing the MBR), but I will check if there is anything not set correctly in the BIOS.
I checked the settings in the BIOS for the drive. My options were minimal, but LBA was enabled. I then went on to clear the MBR of the drive. I was hopeful after clearing the MBR as QTParted no longer crashed, but it was only because there was no longer a partition outside 2GB. It still is limited to 2GB. After a little research, I found that the correct number of cylinders for this drive model is 16383 (which is quite different from the reported 4096 cylinders in fdisk -l). The number of heads and sectors/track are, however, correct. How would I go about changing the number of cylinders on the drive? When I attempted to change the number of cylinders from fdisk, I get a warning that "re-reading the partition table failed with error 13: Permission denied." I am doing this from Knoppix, which gives limited permissions to hard drive access, so what do I have to use chmod on to fix this one?
Last edited by kitaru2004; 12-23-2005 at 04:56 PM.
It still is limited to 2GB. After a little research, I found that the correct number of cylinders for this drive model is 16833 (which is quite different from the reported 4096 cylinders in fdisk -l). The number of heads and sectors/track are, however, correct.
What kernel are you running? (uname -a to get that info)
Also: if you boot from a Knoppix or SuSE LiveCD, does it report the drive size properly?
If you remove the disk which has Windows installed on it and try again, does Linux now report the correct drive size?
Mandriva Installer, Knoppix, and DSL all report the drive size incorrectly. Knoppix and DSL detect the drive differently, though. While using fdisk in Knoppix detects the geometry as 4092/16/63, using fdisk in DSL gives the geometry 1024/64/64.
Disconnecting the drive with Windows installed on it doesn't change anything.
Is it possible that the BIOS update broke something? Things used to work before the update, but updates usually fix things rather than break them.
Last edited by kitaru2004; 12-23-2005 at 02:49 PM.
The first serious limit was the 4096 cylinder limit (that is, with 16 heads and 63 sectors/track, 2.11 GB). For example, a Fujitsu MPB3032ATU 3.24 GB disk has default geometry 6704/15/63, but can be jumpered to appear as 4092/16/63, and then reports LBAcapacity 4124736 sectors, so that the operating system cannot guess that it is larger in reality. In such a case (with a BIOS that crashes if it hears how big the disk is in reality, so that the jumper is required) one needs boot parameters to tell Linux about the size of the disk.
This seems like the closest match to my situation, as I am getting reports of 4092/16/63 as the disk geometry. If this is the case, what boot parameters do I need to change to inform Linux of the true hard disk size, and how will I set these parameters when I boot the Mandriva installer?
You enter them into your bootloader configuration (menu.lst, lilo.conf, etc.), adding them as kernel arguments. It's been so long since I've had a machine where I had to do that that I have forgotten the syntax. I do remember you pass on the device name and the CHS spec. I wish I could remember then give you a complete solution but I hope I gave you enough to help you find it.
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802
Rep:
You should try and create your partitions with a partitioning tool like Partition Commander (It will let you create ReiserFS and EXT3 partitions). It sounds like you have one primary partition and are trying to create a second in the un-allocated space of that partition... The secondary partition (the 40 GB partition) must be a LOGICAL partition instead... Most Linux partitioning tools aren't that helpful in understanding the difference...
Correct, you should be able to create 4 primary partitions on any modern drive. Back on track with the current problem, I can't seem to get any distribution that I currently have around to take the number of cylinders, sectors, and heads I am specifying. The supposed correct numbers for my drive (WD800JB) can be found here: http://wdc.custhelp.com/cgi-bin/wdc....i=&p_topview=1
I have tried passing the following to the kernel at boot:
hdb=16383,16,63
/dev/hdb=16383,16,63
/dev/hdb/=16383,16,63
I have also tried enclosing each of the above in quotes. Is there something I'm missing here? I am also pestering Gateway support via e-mail, so I'll tell of any important details that arise from that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.