Tweaking boot partition offset and size...issues?


  1. Posts : 1,781
    Windows 7 Professional SP1 32-bit
       #1

    Tweaking boot partition offset and size...issues?


    I decided to play around with the partition layout on my HD - reason being that I anticipate getting my first-ever SSD this Christmas. (Don't worry, I have backups of everything.) :)

    At the moment it look like this:

    1. C: (15GB), offset 63 - size 31,455,207 sectors
    2. D: (2GB), offset 31,455,270 - size 4,192,971 sectors
    3. E: (281GB), offset 35,648,241 - size 589,492,159
    4. 2048 unused sectors at the end of the disk

    Question 1.) Is there any partition managing software similar to EASEUS Partition Master or the Partition Wizard CD that can do sector-exact partition moving/resizing?

    The apps I just mentioned won't allow for that kind of finetuning and actually seem to randomly leave tiny gaps between partitions. I'd like to shift the C: partition to an offset of 1024, but without using the Paragon alignment tool or similar products (call me crazy, but I like doing things manually).

    Question 2.) I got to thinking that since all my NTFS partitions are formatted with a 4KB cluster size, the sector size they use is ideally a multiple of 8. Obviously this isn't the case here, so for C: I determined that the last used sector relative to the offset is 31,455,200 and figured I could trim the last 7 sectors off.

    I did this by manually editing the partition info in the MBR (with a WinPE-based tool from Active) and promptly had a BSOD next time I restarted, saying INACCESSIBLE_BOOT_DEVICE. I reversed the change to the partition table and everything was fine again.

    I'm thinking that Windows 7 keeps records of the partition layout somewhere in its registry so it knows which partitions there should be and which drive letters to assign to them.

    Where is this information stored in the registry?


    Bonus Question 3.) What is the importance of the last 2048 sectors (1MB) being left unused?

    Windows will not extend a partition beyond that last little bit, and there must be some reason for that. Is it OK to grab it anyway and extend the last partition to the very end?



    Thanks in advance :)
      My Computer


  2. Posts : 1,781
    Windows 7 Professional SP1 32-bit
    Thread Starter
       #2

    I know my questions are technical and kinda unusual... ...but I'm very curious about things like this by nature. That's how I learn... :)

    (Also it seems I can ensure correct partition alignment on my future SSD by creating empty partitions on it first and then restoring a Macrium image backup into them. Right?)
      My Computer


  3. Posts : 1,781
    Windows 7 Professional SP1 32-bit
    Thread Starter
       #3

    I solved question 2 on my own, lol...turns out the ideal partition size is a multiple of 8 (sectors per cluster) plus 1 sector to hold a copy of the partition's boot sector (LBA 0). Interesting!

    But I'm still looking for a sector-precise partition editor. Went through EASEUS and the latest trial of Acronis Disk Director, and they all just can't do it. Either they force the classic CHS alignment or just randomly leave little gaps. This is kinda driving me crazy because I see no good reason why they should do that.

    Also still wondering about why 2048 sectors at the end of the disk go unused by default. They must be reserved for something, but what?
      My Computer


  4. Posts : 1
    XP
       #4

    Tweaking boot partition offset and size...issues?


    Hi, perhaps a bit late for you but here goes....
    Question 1 - I use Windows based programs, for example Partition magic so i can't help you there, it is worth noting though that old partitioning and backup software can't handle Windows 7 boot method, but you can stil use it to creat new partions or resize.
    Question 2 - Windows 7 does not use the MBR to locate it's o/s, but if you mess with the mbr it won't find that information and can't boot as Windows 7 uses a completely different non standard boot method. Windows 7 keeps it's partition information in the boot loader (boot configuration Data or BCD) you can edit it with BCDEDIT or
    EasyBCD and it is located at the 1024 offset, this is what the 1MB bit at the start of the drive is for.
    Question 3 - I think you'll find it's the first not the last as above.

    Incidentally you can bck up a Windows 7 partition with old software but when you restore it the start sector will be wrong, by default it is 63, it needs changing to 1024 or possibly 2048, not sure offhand which but it will boot once that's done
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:44.
Find Us