On Mon, 11 Aug 2003, Stephane Boireau wrote:
> Hi,
>
> I would like to know if there are limitations to fdisk (tested with
> tomsrtbt1.7.361 (fdisk v2.8) and tomsrtbt2.0.103 (fdisj v2.11qto)):
>
> It tells me that I can't create another partition:
> No free sectors available
>
> But there are 9Go left at the end of the disk (and from mdk9.1 with diskdrake
> I can create new partitions).
>
> The situation is (a 60Go disk: /dev/hda) with mdk9.1 and w95:
> Sectors:
> 1-255 /dev/hda1 win_c
> 256-6107 /dev/hda2 extended fat32 partition
>
> 256-510 /dev/hda5 win_d
> 511-512 /dev/hda3 /boot
> 513-523 /dev/hda6
> 524-573 /dev/hda4 SWAP
> 574-1196 /dev/hda9 /
> 1197-1812 /dev/hda10 /var
> 1813-2484 /dev/hda11 /usr
> 2485-3071 /dev/hda7 win_e
> 3072-3719 /dev/hda12 /home
> 3720-4205 /dev/hda8
> 4206-4571 /dev/hda13
> 4572-6107 /dev/hda14 /home/reserve
I think my reaction to this layout is approximatly summed up by:
"What the fuck have you done to that disk!"
> Partitions not commented contain knoppix installation.
>
> I did many tests with this disk.
> It explains why partitions are the way they are.
Err, riiight, but there are several thing that just don't make sense,
you see the primary partitions (1..4) shouldn't overlap each-other and
the rest (logical partitions) _should_ each be either at the top or
bottom of the available free space (unlike hda7 and hda8).
> What could explain the message I get?
Okay, I think the problem is that partition 2 doesn't cover the empty
space at the end of the disk and as you haven't got any more free
primary partitions either you can't get at that space.
I don't think you'll be able to convince the normal fdisk to repair this.
I think your best if you want to fix it would be would be to backup
everything, wipe the disk and start again.
However, I would like to see the output from:
sfdisk -dgx /dev/hda
and
sfdisk -Vlx /dev/hda
Also if you use:
sfdisk -d /dev/hda > hda.out
edit your partition 2 in the file to cover the whole disk then
sfdisk /dev/hda < hda.out
This _may_ fix your problem, it might also completely wipe your disk;
if you have to give the second cmd a "-f" then I would say 'probably will'
rather than 'might'.
BTW: The limitation is in the 'data structures' on the disk that describe
the layout of the partitions not fdisk. It looks like diskdrake is
breaking letter of the rules but the OS isn't looking so it isn't
normally a problem.
--
Rob. (Robert de Bath <robert$ @ debath.co.uk>)
<http://www.cix.co.uk/~mayday>
Google Homepage: http://www.google.com/search?btnI&q=Robert+de+Bath