PDA

View Full Version : [SOLVED] 12.04 installer partitions ~ 1/8th what Gparted set & sees? 4096 sector vs 512?



NTL2009
June 5th, 2012, 10:34 PM
I bought a new disk drive (320GB 2.5" SATA) and want to install Xubuntu 12,04 on it. I've got it connected with one of those USB/SATA adapters. I've formatted it (GPT) with Gparted with some ext4 partitions. All looked good.

When I went to run the installer (a live USB I've used successfully before), it is reporting partition (and disk) sizes ~ 1/8th what they should be, and does not recognize them as ext4

I've installed with this USB to a different USB drive, GPT partitioned, so I don't know what's going on. I've seen some references to this bug, but no workarounds or fixes.

My computers are BIOS.

here's a link: https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/968595


I went back in Gparted again performed Create Partition Table as msdos. Same thing on the installer, partitions report far smaller than they do in Gparted.

I even tried just one big partition as a quick check, and the installer sees it as a 40GB drive instead of 320GB (it also reports 40GB in the boot installer pull down). When I try to install to a reasonable size partition ( 12GB /) it won't allow it - too small. I ran boot-repair to restore the MBR. No change.

This is a new drive, so I can wipe everything, but it seems I have already. I'm lost. Again, everything seems fine in Gparted and Disk Utility.

EDIT-UPDATE: Got the boot-repair report after the restore MBR, I see some references to " Invalid MBR signature found ", and " NOTE: Sector size is 4096 not (512) " - OK, that would relate to the size differences if the installer doesn't detect that. and also " Warning: extended partition does not start at a cylinder boundary " - I see that Gparted now defaults to Mib boundaries, so not sure this is an issue. paste.ubuntu.com/1025816/

-NTL2009

oldfred
June 6th, 2012, 07:53 PM
What mode is BIOS set in for drive? It may need AHCI or at least LBA or large, but not IDE.

Some general info:
Since drives became over 8GB CHS cylinders, heads, sectors has been obsolete and LBA is how drive is configured. For more compatibility with newer drives, 4k drives, SSDs and better configuration, partitions now start at sector 2048 rather than rounding to cylinders. With 512 bytes per sector that is 1MB at the beginning of the drive.
http://en.wikipedia.org/wiki/Cylinder-head-sector

First, understand that most partitioning tools have moved to a policy of aligning partitions on 1 MiB (2048-sector) boundaries as a way of improving performance with some types of arrays and some types of new hard disks (those with 4096-byte physical sectors). See article by srs5694:
http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/
Post on 8-sector boundaries alignment by srs5694
http://ubuntuforums.org/showthread.php?t=1685666
it's 8-sector (4096-byte) alignment
http://ubuntuforums.org/showthread.php?t=1768635
Alignment issues on 4K drives
http://ubuntuforums.org/showthread.php?t=1635018

If using gpt, you will need to create a 1MB unformated bios_grub partition, so grub2 can install to the MBR correctly.

Did you use Disk Utility at all? It did not handle 4K drives correctly before, not sure about now.

NTL2009
June 6th, 2012, 08:01 PM
[EDIT- I cross posted with oldfred - I will check those things] I had been gpt went back to msdos, I'll look at BIOS settings, it just seems the ubiquity installer is maybe not as up-to-date as Gparted?

UPDATE: I tried on another machine, same thing.

Gparted works fine to partition this drive (Western Digital 320GB with "Advanced Format" 4096 byte sectors), but my 12.04 Xubuntu installer, sees all the partitions as 1/8th the size they should be. Everything is aligned on /8 sectors.


How can I install Xubuntu on this drive if it can't see these partitions as their correct size?

2nd UPDATE: BIOS is set to ACHI, I have looked at the drive with Disk Utility, but I only used gparted to format/partition it.

-NTL2009

oldfred
June 6th, 2012, 09:42 PM
What do these show?

sudo hdparm -i /dev/sda

sudo parted /dev/sda unit s print

cat /proc/scsi/scsi

I have seen the same issue before. I found one of the old threads and it was a SSD, and the final post was send it back to the vendor.
Does vendor have any software that sets it to emulate 512 or not?

Do you have different SATA ports on motherboard. Some behave differently.

NTL2009
June 6th, 2012, 10:32 PM
kenc@NBPC901:~$ sudo hdparm -i /dev/sdc

/dev/sdc:
HDIO_GET_IDENTITY failed: Invalid argument
kenc@NBPC901:~$ sudo parted /dev/sdc unit s print
Warning: Device /dev/sdc has a logical sector size of 4096. Not all parts of
GNU Parted support this at the moment, and the working code is HIGHLY
EXPERIMENTAL.

Model: WDC WD32 00BPVT-00HXZT3 (scsi)
Disk /dev/sdc: 78142806s
Sector size (logical/physical): 4096B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 256s 3072255s 3072000s primary
2 3072256s 10752255s 7680000s primary
3 10752256s 12032255s 1280000s primary
4 12032256s 78142719s 66110464s extended
5 12032512s 15104511s 3072000s logical
6 15104768s 22784767s 7680000s logical
7 22785024s 24833023s 2048000s logical
8 24833280s 78142719s 53309440s logical

kenc@NBPC901:~$ cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ASUS-PHISON SSD Rev: TST2
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: ATA Model: ASUS-PHISON SSD Rev: TST2
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: WDC WD32 Model: 00BPVT-00HXZT3 Rev:
Type: Direct-Access ANSI SCSI revision: 02
kenc@NBPC901:~$

This was on my ASUS PC901 with sda and sdb the SSDs (/ and /home). The Western Digital 320GB was connected with a USB>SATA adapter cable. Since you mentioned mobo ports, I'll try later on the target (eMachines EM725), and try it connected directly internal also. That might be later tonight or tomorrow.

WD does have some SW for this thing, it is Win only and I don't have a convenient Win machine, and I don't trust WINE for that.

Thanks! - NTL2009

NTL2009
June 7th, 2012, 05:03 AM
....

Do you have different SATA ports on motherboard. Some behave differently.

SOLVED!

This was the key oldfred. You mentioned different SATA ports, and I had this hooked up with one of those USB>>SATA adapters. That was the problem.

When I connected the drive internally to the laptop, and then re-ran my partition scheme on it from Gparted from a LIVE USB, all was good. At that point, the terminal commands you provided made sense. It reported 512B logical, 4096B physical sectors. Installation and re-boot went fine. The installer saw the proper partition/disk sizes.

I guess that is why my googling failed to turn up solutions, these are popular disks, I figured others must be seeing this, but my external hook up was the issue, and probably not common. I just wanted to test it before opening my laptop. It just seemed strange to me that Gparted would see it OK, but not the installer.

So thanks again for the pointer in the right direction.

-NTL2009

oldfred
June 7th, 2012, 02:14 PM
You mostly figured it out, but I added to my notes not to use USB port with 4K drive.