Wednesday, May 20, 2015

windows 7 - Using 2 primary partitions on a hard drive?



I would like to install 2 Operating Systems (one Windows and one Kali Linux) on 1 hard drive. It's easy to install both on a primary partition but I would like to put them into 2 different primary partition. Currently my hard drive has only 1 primary partition (currently installed with Windows 7 Ultimate 64bit). So I have to create the other primary partition for Kali Linux. As far as I know there should be only 1 primary partition active at a time. So I wonder what exactly active means here? Does that mean once booted from this partition, I cannot access to the other partition (to read/open files, ...)? I hope it's just some kind of flag indicating that it's the partition from which the currently loaded OS was booted.




Thanks for your help!


Answer



"Active" simply means that that is the partition on which your BIOS (firmware) will look for the first OS boot file - for Windows 7 that is BootMgr.exe.



(
Actually it is a little more complicated. The BIOS always loads the master boot record from the drive that you've configured it to boot from in the "BIOS settings". The MBR is always sector 0 and is not part of any "file system". The MBR contains the table of primary partitions - maximum of four - and a tiny amount of code (440 bytes). One of the partitions is tagged as "active" in the partition table. The code from the MBR loads the first block of the active partition (also not part of any file system), which is called the "volume boot record". The code from the first block of the VBR reads the remainder of the VBR; it can be multiple blocks. This in turn has enough code to find and read an executable file from the root directory of the partition it's on, and transfer control to it. For a Windows Vista or later partition this is BootMgr.Exe, for earlier versions it was NTLDR.



Different OSs require different VBR contents. Different file systems do, too - the Windows VBR for a FAT32 partition is different from the one for an NTFS partition, because the code in the VBR has to understand enough of the file system structure to read that first OS boot file. That file in turn knows enough to read directories, etc.
)




In Windows, the Boot Configuration Database (BCD) is also on the active partition. The actual OS can be on another partition, and usually is.



If you use a multi-OS boot loader such as GRUB (as I expect you will) you want that on the active partition. It does not mean that that is the only partition accessible.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...