Jump to content











Photo
- - - - -

'Partition does not end on cylinder boundary'


  • Please log in to reply
13 replies to this topic

#1 Virii

Virii

    Member

  • Members
  • 56 posts
  •  
    United States

Posted 24 September 2010 - 11:28 PM

When I load up cfdisk in Linux, I receive this error for each of my partitions on hard-drive 1 of 2.

Partition X does not end on cylinder boundary

When I load up GParted, it shows my first HD as having one FAT32 partition taking up the entire drive.

The thing is I have 3 primary partitions on HD one, installed in this order.

1. The first is Windows 98 SE, using the Fat32 file system.
2. The second is Windows 2000, using the NTFS file system.
3. The third is Windows XP, using the NTFS file system.

On my second drive, I have a Linux distro installed to the only (current) logical partition, which is the first in an extended partition.

This is further compounded by the fact that my boot manager, Grub4Dos, says that the partition tables on HD one are invalid, when I attempt to map them around.

map (hd0,0) (hd0,1)

map (hd0,1) (hd0,0)

etc...

Is there a way to manually edit/fix these partition tables? How would I even know the correct values?

BTW - All of the Windows partitions were created with either the boot-disc's formatters, or the 'Disk Management' tools in the installed Windows.

Edited by Virii, 24 September 2010 - 11:31 PM.


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13751 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 25 September 2010 - 10:36 AM

When I load up cfdisk in Linux, I receive this error for each of my partitions on hard-drive 1 of 2.

Partition X does not end on cylinder boundary

Yes, it can happen.

When I load up GParted, it shows my first HD as having one FAT32 partition taking up the entire drive.

This is "queer". :ph34r:


Is there a way to manually edit/fix these partition tables? How would I even know the correct values?

Don't worry, we'll help you: :D

BTW - All of the Windows partitions were created with either the boot-disc's formatters, or the 'Disk Management' tools in the installed Windows.

This is very, very improbable :thumbup:
Both DOS/Win9x/Me and Windows NT/2K/XP use the "strict Cylinder boundary requirement, it's Vista ;) and later that doesn't respect it anymore.
Even, say, 85% or 80% of third party utilities do respect cylinder boundaries, there might be something else. :dubbio:

Anyway, get HDhacker:
http://dimio.altervista.org/eng/
and use it to back up the MBR (first sector of Physical drive) and each bootsector or PBR of the various partitions you have (first sector of Logical Drive).

Compress the above sectors in a .zip archive, upload them on some free hosting site and post a link to the archive.

I'll have a look at them.

If you want to play a bit with the values, you can get Tiny Hexer and my scripts for it:
http://www.boot-land...?showtopic=8734
(use it on the backup of the MBR and of the PBR's and NOT on the disk!)

And this Excel spreadsheet:
http://www.boot-land...?showtopic=2959

;)
Wonko

#3 Virii

Virii

    Member

  • Members
  • 56 posts
  •  
    United States

Posted 27 September 2010 - 01:16 AM

Compress the above sectors in a .zip archive, upload them on some free hosting site and post a link to the archive.

I'll have a look at them.

Done.

Link

If you want to play a bit with the values, you can get Tiny Hexer and my scripts for it:
http://www.boot-land...?showtopic=8734
(use it on the backup of the MBR and of the PBR's and NOT on the disk!)

Do I need the full version to use your plugins?

#4 COD11

COD11

    Member

  • Members
  • 63 posts
  •  
    Germany

Posted 27 September 2010 - 08:07 PM

Hello virii,
I had a (quick) look at your Boot records. This is what I found.

Three of your four (!) primary partitions are perfectly aligned to Cylinder boundaries with no gaps. The fourth however, a Linux swap partition (File ID 0x82) is NOT. There is a gap of 0x7A0 (= 1,952) sectors between the end of third primary partition and the swap partition, which corrupts alignment.
You probably know, which instance (Linux distro) created this swap area. I suggest, that you recreate fourth primary partition with the following values, if you want to get rid of the error message :

Start : 0D D1 C0 60 (= Sector 231,850,080)

Size  : 00 27 80 00 (= 2,588,672 Sectors )

AFAIK, there is NO negative influence on the other partitions, however, if you just ignore the swap partition.

Regards
COD11

#5 COD11

COD11

    Member

  • Members
  • 63 posts
  •  
    Germany

Posted 28 September 2010 - 12:27 PM

Hello virii,

a second look at your Boot records revealed a mismatch between CHS and LBA addressing. Any of the three Win filesystem partitions use CHS 0x3FF/0xEF/0x3F as upper value in partition table ( -> maximum addressable drive size: 1,023 x 240 x 63 x 512= 7,38 GiB). This means, they have a COMMON end sector. Second and third partition START and END at this common end sector. Unvisible fourth (swap) partition starts at the common end sector of the visible three Windows partitions. So all partitions have a common sector. Swap partition ends at the CHS adressable maximum (0x3FF/0xFE/0x3F), which per convention means "use LBA addressing instead of CHS addressing". CHS values are up to now used to calculate Cylinder size ( Heads x Sectors/track), and the program which you used for creating the partitions obeyed it with the (LBA) alignment to cylinder boundary. Modern filesystems don't use CHS addressing any more. So they might "live" with this mismatch situation. Boot managers like Grub(4dos) which rely on (BIOS) interrupt 0x13 obviously have problems, since BIOS has problems with this design.

How to solve this misery ?
1. Possibility : rebuild your first harddisk from scratch.
2. Possibility :
a) correct CHS values in MBR/PBRs (with a hexeditor to maximum values)

optionally (IMHO not mandatory):
b) resize filesystems to new cylinder borders ( complex and risky !)

Regards
COD11

Edited by COD11, 28 September 2010 - 12:29 PM.


#6 Virii

Virii

    Member

  • Members
  • 56 posts
  •  
    United States

Posted 28 September 2010 - 06:45 PM

Considering the drives were still working with Windows, I added the Linux swap after my initial post, but before I uploaded the boot records.

How to solve this misery ?
1. Possibility : rebuild your first harddisk from scratch.
2. Possibility :
a) correct CHS values in MBR/PBRs (with a hexeditor to maximum values)

optionally (IMHO not mandatory):
:dubbio: resize filesystems to new cylinder borders ( complex and risky !)

@1
: How would I avoid a repeat, seeing that it was a fresh partition/install to begin with?

@2a
: I don't want to limit partition sizes to 7.38GB

@2b
: How would I do this? Any recommended programs?

#7 COD11

COD11

    Member

  • Members
  • 63 posts
  •  
    Germany

Posted 28 September 2010 - 08:51 PM

@1 (Rebuild from scratch)
: How would I avoid a repeat, seeing that it was a fresh partition/install to begin with?

BACKUP ANYTHING YOU WANT TO KEEP BEFORE STARTING!

Overwrite the first 100 sectors with null bytes (0x00; dd for win or a HexEditor), use a Win XP installation CDROM and let fdisk create all partitions or use "GParted Live CDROM" (dd to erase first 100 sectors before new partitioning).

@2a (Correct CHS values in MBR/PBRs)
: I don't want to limit partition sizes to 7.38GB

You do NOT limit partition sizes. You just "tell" the system to use the existing LBA addressing by filling in the maximum values (0x3FF/0xFE/0x3F) at the appropriate locations in MBR ( combined as 0xFEFFFF ) and PBRs. I could do it for you with your ZIP file, so that you may test it (at your own risk !), provided that you didn't alter partitioning meanwhile. The corrected Boot records may easily be written to your harddisk with a Hex Editor.


@2b (Alignment to new cylinder boundaries)
: How would I do this? Any recommended programs?

Use latest stable "GParted Live CDROM" with my assistance. Note, that NTFS is somewhat stubborn.

Kind Regards
COD11

#8 Virii

Virii

    Member

  • Members
  • 56 posts
  •  
    United States

Posted 28 September 2010 - 11:17 PM

Okay. I think I'll wipe the HD, and then check back on using GParted.

Can't connect to the net from the actual PC being formatted, so I'll use my main desktop to get back to you if you're willing.

What I'd like to do, preferably, is have only one primary partition with Windows 98 on it. I'd like the rest to be in an extended, but...

I have several proggies that need the root drive to be "C:".

Is there any way to install Windows 2K/XP on extended partitions, and be recognized as the "C:" drive to themselves?

#9 COD11

COD11

    Member

  • Members
  • 63 posts
  •  
    Germany

Posted 29 September 2010 - 12:22 PM

Okay. I think I'll wipe the HD, and then check back on using GParted.

Can't connect to the net from the actual PC being formatted, so I'll use my main desktop to get back to you if you're willing.

Okay.

What I'd like to do, preferably, is have only one primary partition with Windows 98 on it. I'd like the rest to be in an extended, but...

I have several proggies that need the root drive to be "C:".

Is there any way to install Windows 2K/XP on extended partitions, and be recognized as the "C:" drive to themselves?

AFAIK, this is mutually exclusive concerning the operating systems. You definitely have ONE active partition on ONE primary partition ... and it gets Drive C: in all Windows versions. You could do it, when using three primary partitions and Grub4Dos as Boot Manager (keywords : makeactive, hide, unhide). With some tricks even when installing the operating systems. Each of the three partitions get C:, when the resident Windows system runs. You need three times (Grub4Dos) GRLDR to handle the Bootflag for each and to have random access.

Since programs usually do NOT have path C:\Windows hardcoded, but use variables WINDIR or SYSTEMROOT another design should be possible. Let first primary partition be active with (Grub4Dos) GRLDR as BootManager and install all programs, that need C: drive here. Put all operating systems in their respective logical volume on an extended partition. GRLDR chainloads io.sys and NTLDRs appropriately on logical volumes. The installation of the OSes is complex. Windows doesn't accept else but first primary partition. You have to copy all files at a certain point of the process and in a certain sequence to the destination partition and continue there. Note, that Registry normally holds a thousand times C:\Windows or C:\WinNT, which would be wrong here...

Kind Regards
COD 11

Edited by COD11, 29 September 2010 - 12:25 PM.


#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13751 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 September 2010 - 01:19 PM

Grub4dos also provides the facility of accessing a Logical Volume inside Extended as it was a Primary.
This needs an empty entry in the MBR, and it is a derivative of what you can do manually, see this for reference:
http://www.goodells.net/multiboot/
http://www.goodells....boot/ptedit.htm

Search for "partnew" in the forum.

:dubbio:
Wonko

#11 Virii

Virii

    Member

  • Members
  • 56 posts
  •  
    United States

Posted 29 September 2010 - 08:47 PM

You could do it, when using three primary partitions and Grub4Dos as Boot Manager (keywords : makeactive, hide, unhide). With some tricks even when installing the operating systems. Each of the three partitions get C:, when the resident Windows system runs. You need three times (Grub4Dos) GRLDR to handle the Bootflag for each and to have random access.

That's what I did for my initial install-> install, hide, install, hide, etc.

But.. they were all primary. Looking at what Wonko posted, it seems that I'll be sticking with primary drives.

Okay.

I deleted the MBR from the HD, partitioned the HD into all four drives, formatted them (fat32, ntfs, ntfs, linux-swap), and went to install Windows 98.

Windows install outputs some 'SU-XXX' error, complaining about disk compression. Thinking back, last time I had to delete all partitions, except for the one Win98 was being installed to.

Does creating the partitions one at a time create a CHS/LBA issue, or can I go ahead and do one OS at a time? Do I create the new partitions with the same tool (Gparted)?

#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13751 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 September 2010 - 08:49 AM

Looking at what Wonko posted, it seems that I'll be sticking with primary drives.

Just for the record, what Wonko posted is that it is perfectly possible to make a Logical Volume inside Extended work exactly if it were a primary.

So, the above should be intended probably as :thumbup::
"Since what Wonko posted is too difficult for me, instead of trying learning how to do that I'll stick to simple Primaries."

Just for the record, using a migrate.inf file during setup, you can have any partition get any letter in 2K/XP/2003, without needing to hide anything.

:thumbup:
Wonko

#13 Virii

Virii

    Member

  • Members
  • 56 posts
  •  
    United States

Posted 30 September 2010 - 12:36 PM

"Since what Wonko posted is too difficult for me, instead of trying learning how to do that I'll stick to simple Primaries."

Sorry. What I meant was... I do not have the 'hardware' available to 'ghost' the drives for rearrangement. I'm working with just the one HD (no HD space on the second), a cd-rom drive (no Dvd access), and no sparable cd-rws.

Any ideas how I should proceed, considering I'm already repeating what I did last time? Should I just create the first partition with GParted, install Win98, create the second partition with GParted, install Win2K, etc...?

#14 COD11

COD11

    Member

  • Members
  • 63 posts
  •  
    Germany

Posted 30 September 2010 - 09:04 PM

Any ideas how I should proceed, considering I'm already repeating what I did last time? Should I just create the first partition with GParted, install Win98, create the second partition with GParted, install Win2K, etc...?


Before proceeding you should (or let us ) check the already created partition table entries in MBR. Otherwise you might repeat the old CHS issue and waste a lot of time.

Provided that you use Grub4dos (G4D) as your final Boot manager for all four OSes (W98/W2K/XP/Linux) primarily (not launched via boot.ini), I would use an other installation sequence : XP-W98-W2K. Why ? You are sure, that you get correct Windows partitioning with XP setup routines (create only first primary partition in setup). After finishing XP setup, boot it and use drive managment to create all further partitions ( well, you can't create a valid Linux swap partition with Windows, but you can create an empty logical partition with appropriate size in an extended partition and add the file ID later with a HexEditor ). Do NOT format the new partitions. Then hide the XP partition by changing its file ID from 0x07 (NTFS) to 0x83(Linux) with HexEditor or ptedit32 AND wipe the bootflag (0x80 to 0x00). Install W98 the same way on 2nd primary partition, test and hide it (Bootflag!). Use the last installed working OS (W2K) to install grub.mbr of G4D, to unhide all other partitions and to copy GRLDR to root folder of XP partition. Create an appropriate menu.lst at the same location using "makeactive" command to select the booting OS. Since grub.mbr scans for GRLDR on all harddisks (and their partitions), regardless whether they are "active" (bootable) or not, first primary on first HDD (where it starts looking) is the best choice. Swap partition gets file ID 0x82. Win98 - of course - does NOT "see" NTFS partitions. Drive management of W2K/XP allows to change drive letters of the "inactive" OSes, if wanted. I would strongly suggest to use volume labels, so that you don't loose overview in drive management.

Regards
COD11




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users