Ubuntu 12.04 won't install due to odd partitioning
D. Hugh Redelmeier
hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Wed May 16 05:18:59 UTC 2012
I have a notebook on which I previously installed Ubuntu 8.04 and
10.04 and I want to install 12.04 (over 8.04). See a pattern? I want
the latest LTS and the one before.
When I try to install 12.04, and ask to configure the partitions, the
installer sees none. And gives no explanation!
I exited the installer (this is a live DVD of Ubuntu 12.04 for AMD64)
and run parted from the console, it prints a terse message to stderr:
======================
libparted : 2.3
======================
Can't have a partition outside the disk!
A hint. But not too explicit: it doesn't say what partition.
Here what fdisk says (decorated with labels from the partitions):
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x17a417a4
Device Boot Start End Blocks Id System
/dev/sda1 1 1020 8193116 27 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 1021 6368 42957804+ 7 HPFS/NTFS
/dev/sda3 6369 7388 8193148 83 Linux: Ubuntu8.04
/dev/sda4 7389 14594 57882195 f W95 Ext'd (LBA)
/dev/sda5 7389 8153 6144820 82 Linux swap / Solaris
/dev/sda6 8154 13573 43536116 83 Linux: /home
/dev/sda7 13574 14594 8195072 83 Linux: Ubuntu10.04
It all looks good: all the cylinder numbers make sense.
But it turns out that
(120034123776 bytes/disk) / (8225280 bytes/cylinder)
= 14593.31764705882352941176 cylinders/disk
NOT 14593 as fdisk reported.
So: the extended partition sda4 and the last partion within it, sda7
extend into this fractional final partition. Any block past
(8225280 bytes/cylinder) * (14593 cylinders/disk) / (512 bytes/block)
= 234436545 blocks
is in the fractional extra cylinder.
You can see this with "sfdisk -u S" output:
Disk /dev/sda: 14593 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/sda1 63 16386294 16386232 27 Hidden NTFS WinRE
/dev/sda2 * 16386300 102301908 85915609 7 HPFS/NTFS/exFAT
/dev/sda3 102301920 118688215 16386296 83 Linux
/dev/sda4 118688220 234452609 115764390 f W95 Ext'd (LBA)
/dev/sda5 118688283 130977922 12289640 82 Linux swap / Solaris
/dev/sda6 130978008 218050239 87072232 83 Linux
/dev/sda7 218050560 234440703 16390144 83 Linux
Warning: partition 4 extends past end of disk
Interestingly, there is a bit of unused space after sda7 still within
sda4. But I still would have expected a warning about sda7 going past
the end of the disk.
If I use "sfdisk" without flags, I get a lot of cylinder numbers
decorated with + and - suffixes that indicate rounding.
Disk /dev/sda: 14593 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 1019- 1020- 8193116 27 Hidden NTFS WinRE
/dev/sda2 * 1020 6367- 5348- 42957804+ 7 HPFS/NTFS/exFAT
/dev/sda3 6368 7387- 1020- 8193148 83 Linux
/dev/sda4 7388 14593 7206 57882195 f W95 Ext'd (LBA)
/dev/sda5 7388+ 8152- 765- 6144820 82 Linux swap / Solaris
/dev/sda6 8153+ 13572- 5420- 43536116 83 Linux
/dev/sda7 13573+ 14593- 1021- 8195072 83 Linux
Warning: partition 4 extends past end of disk
Cylinder numbers seem to be off quite often.
What can I do to fix this, at least to the point where gparted and
friends will look at it? I want to keep the contents of my current
partitions (other than sda3).
Can I somehow get the rather arbitrary geometry of the disk changed so
that the partitions don't look screwy?
BTW, I would guess that this partitioning was created by Ubuntu
something-or-other.
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list