Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I've been using Ubuntu exclusively for the past month and love it. Recently my old 80gb hard drive died so I went out and bought a new 250gb (IDE) yesterday. Installed Ubuntu (jaunty) no problem except that the drive is only recognized as 137gb. I realize this is the bios 48lba issue. My laptop is Sony Vaio pcg-v505dx --> the bios is upto the latest one (2004). When I go into the bios --> it recognizes it as 137gb and there is no option to turn on LBA or turn on/off autodetect.
I've read on the forum here that partitioning is the answer. I tried partitioning the drive so that there is a /boot, /swap, and / but to no avail. When I try boot straight from the LiveCD to check with partition editor, it too recognizes the drive as 137gb. Fdisk output also says 137gb. Isn't Ubuntu supposed to ignore what the bios says?
It's very frustrating when I see everybody else posting about how GPartEd can see their full drive capacity, when I cannot. I'd appreciate any help on how to get Ubuntu to recognize the full 250 of the drive. Thanks!
I thought the OP made that clear. But I also am never comfortable with what the OP says about that until the OP does a copy/paste into the post of the output from some partition listing program such as:
(parted) print all
Then copy and post the results
Upgrade the BIOS.
I thought he said no newer BIOS available.
Make sure each partition has 137GiB or less, if you want to use that workaround.
Can you explain that one.
I think most of us understand why the /boot partition or the whole partition containing the /boot directory should be within the initial portion of the disk that the BIOS can see. But after that, why does it matter?
I wouldn't guess the answer there was the correct answer.
I didn't think Linux cared about what fraction of the disk the BIOS can see (beyond needing the BIOS to see enough to allow grub to load the kernel). Once you are in a Linux partitioning program, the BIOS limits should be gone.
Thank you very much for the replies guys. I checked the disk size recognized GPartEd in while in LiveCD mode and also in the terminal with fdisk (both regular boot and LiveCD)
Here is the fdisk output
Disk /dev/sda: 137.4 GB, 137438953472 bytes
255 heads, 63 sectors/track, 16709 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ea827
Device Boot Start End Blocks Id System
/dev/sda1 * 1 30 240943+ 83 Linux
/dev/sda2 31 212 1461915 82 Linux swap / Solaris
/dev/sda3 213 15409 122069902+ 83 Linux
/dev/sda4 15410 16709 10442250 83 Linux
I've tried partitioning it with only 3 parts (/boot, swap and /) and with 4 parts (/boot, swap, /home and /) --> both yield the same results
The bios is upto date with then newest one possible (from 2004)
The hard drive is a Western Digital Scorpio Blue 2.5" 250gb IDE drive --> when I look at the drive, I didn't see any jumpers but I will check again.
I think I found something interesting ... with the link that Johnsfine gave me regarding HPA and it's role in limiting hard drive size --> I noticed that Phoenix was mentioned AND that Phoenix bios is responsible for my Sony. Typing in hdparm, I find that HPA is enabled:
sudo hdparm -N /dev/sda
max sectors = 268435456/488397168, HPA is enabled
Do you guys think this HPA may be responsible and if so, how to get around it.
I'll ask around to see if any of my friends can lend me their computers to check the disk size and to partition it from there. Thanks again
Just how big did you make those partitions? The point of partitioning is that none of your partitions is greater than 137GB. I have a hard time believing you assigned 100GB or more to boot and swap so the third one would be less than 137.
There used to be a boot option ("stroke") that would format all of a hard drive regardless of the size reported by BIOS. I don't know whether it is alive anymore, though.
While some people report that sticking to 137GiB for all partitions works for them - it shouldn't matter on standard hardware. The usual approach for ubuntu would be to make a 10-30GiB partition for root (sda1), and use the rest for swap (sda2) and home (sda3).
What isn't clear is if the installer reports more that 137GiB on the drive. Please verify.
If it does not, you cannot, directly, use the repartition method to work around the limit, and the trouble comes from inside the drive itself.
You have stated that you have partitioned the drive, but fdisk seems to be reporting all your partitions inside the 137GiB range. Whats curious is that no empty space is reported.
max sectors = 268435456/488397168, HPA is enabled
Do you guys think this HPA may be responsible
Obviously! If it weren't responsible those two numbers 268435456/488397168 would be much closer together.
and if so, how to get around it.
I'm not sure and mistakes certainly run the risk of trashing the contents of the hard drive.
I don't know how you disable HPA or whether your should. My own drive has HPA enabled:
max sectors = 976771055/976773168, HPA is enabled
The instructions for hdparm make it seem like the correct thing to do is
sudo hdparm -Nsize /dev/sda
where you replace size with some number nearly as big as the max value of 488397168.
I've never tried anything like that. I don't know if it is important to make the value you choose divisible by something such as the cylinder size 16065 you quoted. The current value 268435456 isn't divisible by 16065, so probably not. I don't know whether you should go all the way up to 488397168 or just try for a little less than that. Clearly more would be wrong.
If you fix it that way, I expect once is enough. But maybe something in your BIOS or hidden boot code is setting it back and you would need your Linux startup script to re fix it on every boot (before accessing any partition outside the first 137GB).
I'll ask around to see if any of my friends can lend me their computers to check the disk size and to partition it from there.
That was a valid idea before seeing the results of hdparm. Now you're past having any value to the results of testing in a different computer.
If it were my situation, I'd back up anything important, then try the hdparm command to set it to nearly 488397168, then do the other hdparm command to see if the change initially stuck. Then reboot both to see if the change sticks past a reboot (use the hdparm command to list it yet again after reboot) and if all that is good the reboot should also let the partitioning tool finally see the larger size.
But again, it isn't my situation, I've never tried anything like that, and if the above advice is bad, I won't back it up with anything more than a heartfelt "oops".
Hi again, thanks for the speedy replies. To answer some of your questions:
@jay73 - I made the /boot 250mb, swap 1.5gb, /home 125gb and / for the remainder (~10gb)
@simon bridge - I put the boot partition at the very beginning of the drive. You are correct in that there is no empty space reported after. When I used the Ubuntu installer to check, it sees the drive as only 137gb with no extra space. When I used GPartEd to check when booting through LiveCD, it also shows a total of 137gb without any space available afterwards. It's as though I really did buy a 137gb drive (which I didn't .. ha ha). What do you mean that the trouble comes from the drive itself .. as in defective? Or as in stubborn hardware clash?
@johnsfine - thanks for the thoughts. I don't have any qualms about reformatting this drive over and over and over. I'll give the hdparm a whirl. Heh heh ... I like your disclaimer at the end
This feels familiar... I keep thinking you need to edit the bios entry for your drive to show the correct drive geometry, and the rational part says nonsense, there are no grub errors and the system boots. I suspect that I've encountered this problem way back when I saw the grub ones. Curiously, one of the guys in the above link had a similar idea.
I am seeing a bunch of unresolved problems like this one - each one has an old dive die, to be replaced by a new, large one. Something common to the whole is that the subsequent drive also dies or that the ide controller or the socket or the mobo also has damage.
Perhaps we should rule this out:
Have you tested the old drive in another machine?
Have you tested the new drive in another machine?
setting max visible sectors to 488397168 (temporary)
SET_MAX_ADDRESS failed: Input/output error
It's a bit of a long shot, but did you try a smaller value?
If I computed it right, partitioning rules won't let you use more than 488392128 out of 488397168 anyway, so trying slightly smaller won't loose any usable space. Maybe there is some very small but non zero minimum on the size of the HPA (the difference between the two numbers).