Tweaking boot partition offset and size...issues?

Corazon

Small-time geek :)
Guru
Local time
8:50 PM
Messages
1,707
Location
Fantasyland
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
I know my questions are technical and kinda unusual... :o ...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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
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

OS
XP
CPU
i7
Graphics Card(s)
Nvidia 8400GS
Back
Top