MBR partition

Although MBR partition table usually does not support hard drives larger than 2TB, the structure of MBR partition table is more complex than GPT partition table which does not have this limitation. The complexity comes from several places:

1. The CHS(Cylinder,Head, Sector) of start sector/stop sector of a partition is ignored for modern hard drives. The Head field occupies 1 byte which can represent a max #255 header. The Cylinder field occupies 10 bits which can only represent #3ff(i.e.,#1023 in decimal) cylinder at maximum. The Sector field uses 6 bits and the maximum sector number it can represent is 63. Note that Cylinder number and Head number counts from 0, while Sector number counts from 1. The maximum sector number CHS can represent is #1023 cylinder, #255 head, #63 sector. Considering the fact that the sector size is 512 bytes in most cases, the maximum byte offset(counting from 0) of the last byte of the stop sector of a partition is 1024*256*63*512-1=8,455,716,863(~8GB). While modern hdds are far larger than 9GB, the start/stop CHS of a partition located beyond 9GB cannot be represented by CHS. But why the capacity limit of MBR hard drives is 2TB, not 8GB? That is because there are two additional fields: start LBA/sector number in the partition table entry. You can set the addressing mode of a hard drive to LBA(logical block addressing) in BIOS. Sectors of a HDD will be numbered from 0,1,…, to the last sector of the HDD. The start LBA is the sector number of the start sector of a partition; the sector number is its size. Considering both start LBA and sector number occupy 4 bytes, the maximum start LBA/size is 0xffffffff(‭4294967295‬) sectors,‭i.e.,2,199,023,255,040‬(2TB) in bytes. You may say the max stop byte offset of a partition can be (‭4294967295‬+‭4294967295‬)*512-1=4,398,046,510,079 so an MBR disk can be as large as 4TB. But in reality, the variables to store the address of a byte in an MBR partition are 4 bytes also so they can not address a byte beyond 2TB. This is the reason why MBR partition can not handle with HDDs larger than 2TB.

2. extended partition and logical drive. There are only 4 entries(slots) in the MBR partition tables which means you can create 4 primary partitions at most. If you want to create more than 4 partitions, you should create an extended primary partition, then create logical drives in the extended partition. An extended primary partition is nothing more than an ordinary primary partition in the MBR partition table, except its system type is set to 0xf. When you create logical drives in the extended primary partition, it will create Extra Boot Records(EBR) somewhere on the hard drive. Like MBR, EBR is also a sector of 512 bytes and contains its own partition table(4*16 bytes). However, there’re some differences between MBR and EBR. First, the first 446 bytes of EBR is set to zeros, in contrast to MBR which may contain bootstrap code. Second, only two entries are used in the partition table of EBR. One entry describes the actual logical drive you create, the other entry points to the next EBR and its system type is set to 0x5. The partition table entry of the extended primary partition points to the first EBR, so all the EBRS are chained together.

3. The start LBAs in the partition table entry with system type 0xf in MBR and the partition table entry with system type 0x5 in EBR have different meaning, which often causes confusion. Like other primary partitions, the start LBA of the extended primary partition is the sector number of the first EBR(or the starting sector of the primary partition). In other words, the start LBA of the primary extended partition is the sector offset to MBR(sector 0), and the first sector of the primary extended partition is used to store an EBR. But the start LBAs with system type 0x5 in EBRs are the sector offset of the next EBR to the start sector of the primary extended partition, neither the beginning sector of the whole HDD, nor the sector of current EBR. The is a broken to the normal start LBA definition,i.e., the offset to the boot record describing the partition,regardless of MBR or EBR. The start LBAs for the logical drives in EBRs, however, follow the normal definition, so if you want to calculate the absolute sector number of the start sector of a logical drive, you need to get its start LBA, then plus the absolute sector number of the EBR describing the logical drive, while the absolute sector number of an EBR is calculated by adding its start LBA (in the previous EBA) to the start sector of the primary extended partition.

4. The sector number field does not matter for the partition table entry with system type 0xf or 0x5 . Those partition table entries are just used to link the EBRs together using the start LBA field. The actual size of logical drives is represented in the corresponding entry in EBRs. Note that the logical drives are not necessarily adjacent to their EBRs. But in practice, they are usually aligned at the beginning sector of the next track to their EBRs or the beginning of next page(a page is 2048 sectors), i.e., the gap between the beginning of logical drives and their corresponding EBRs is typically 62 sectors or 2048 sectors. The piece of HDD space from the EBR to the end of the logical drive the EBR describe is called inner extended partition, and the size of this piece of HDD space(the size of logical drive plus the size of the gap) is put as the sector number field for the inner extended partition, although the value is not important. All the sizes of inner extended partitions are summed up and put as the sector number field of the partition table entry for the primary extended partition, which does not matter as well.

Reference:https://www.win.tue.nl/~aeb/partitions/partition_tables-2.html

how to partition a hard drive

Raw hard drives should be partitioned and formatted to use. When you use a hard disk partitioning software, you may be confused about some concepts such as primary partition, extended partition, logical disk. All partition managers assume you know well about these concepts before partitioning a hard drive. This is unfair to most users because all they want to do is partitioning the hard drive into several sub-parts(volumes) which have no difference among them except the size. Moreover, most partition tools follow the following steps to create partitions: select the “create new partition” option, specify the size, type(primary partition, extended partition, etc) of the partition (some partitioning software even ask you to specify the start/stop cylinder of the partition. Cylinder? Do you know what on earth it is?), then click “ok” to create a partition. Then follow the same step to create another partition. This is not what we do things usually. The most efficient way to do things conforms to a top-down strategy. As to hard disk partitioning, we would like to first have a big picture of what we gonna do, that is, specify how many sub-parts(volumes) you need for the hard disk. Then we may fine-tune each volume such as adjusting its capacity, type, etc. Bearing all the above considerations in mind, we developed PBD(Partition Bad Disk), an easy to use partition manager. Although the main object of this partitioning software is to isolate bad sectors from created partitions, it can be used as an ordinary but handy partition tool that has overcome the disadvantages mentioned before. In the following example, we use PBD to partition an external hard drive into four volumes.

First, right-click the diagram that represents the HDD, select “split to four parts” option,

Partition Bad Disk
The hard drive is then split to four parts.

partition tool
Right-click each part to assign it to a primary partition or a logical disk(do not pay much attention to their difference, PBD will take care of it. In this case we assign the first two blocks to primary partitions and the last two blocks to logical disks.)

partition software

partition hard drive

You can adjust the properties (such as size) of these HDD partitions in the partition list below.

create hdd partition

Ok, it is almost done! Just click “Next” button to save the results to the hard drive, and you will see the new volumes in Windows explorer immediately.

 

clipboard manager

There are quite a few Windows clipboard alternatives in the market. But most clipboard managers are hard to use. Typically, these clipboard software have a dazzling GUI with many buttons or menu items that confuse even a software engineer. Most of their functionalities are those you will never use, and the important functionalities you really need are missing. For example, many clipboard software can only deal with text. Another problem of these clipboard managers is they are not easy to use. I mean how many mouse clicks/keyboard strokes you need to copy/paste an item? I saw some clipboard managers use Ctrl-VVV… to paste previous copied items or use complex key combinations to copy/paste, which is a hard task for ordinary people except you have very flexible fingers. Quick Multi-Copy was developed from the beginning with the ease of use bearing in mind. No dazzling GUI, no complicated settings. You copy/paste as you did in the past. Quick Multi-Copy will automatically store you copied to its clipboard. If you need to paste an item that is not the latest one, just hit one key(F1-F10 for ten previously copied items respectively). This is the clipboard manager that uses the least number of operations to do its job. And the clipboard of Quick Multi-Copy can contain any type of content including text, images, files, etc. The content of the clipboard is shown in its GUI for you to view and manage conveniently.

Clipboard History

We still cannot check clipboard history in Windows XP, Windows 7, or Windows 8. In fact, Windows clipboard can only store one item. If you copy a new item, it will cover the old item in Windows clipboard and the old one is lost. In many situations, it would be more convenient to maintain multiple items in clipboard. We need a clipboard manager that can show clipboard history for us. Quick multi-copy is such a clipboard software. As a Windows clipboard alternative, you can use Quick Multi-copy to store multiple items in clipboard, view clipboard history, selectively paste an item with a key(F1-F10), or delete one item or clear whole clipboard history. Quick multi-copy is something like Word clipboard history but you can fill it with any type of content such as texts, files, images, etc, and use it for any application besides Word.

copy paste tool

Copy and Paste are two basic operations in Windows. How do you copy and paste? You can copy and paste with your mouse. Right-click the item (for example a file) and choose the Copy option on the context menu to copy to clipboard; go where you want to paste the item, right-click and choose Paste option to paste the item there. Then how to copy and paste with keyboard? The copy and paste shortcuts are Ctrl-C and Ctrl-V, respectively. But Windows clipboard can contain one item only. If you need to store multiple items in a clipboard, you may try Quick Multi-Copy. So how to copy and paste with Quick Multi-Copy? It is very easy. Run Quick Multi-Copy, copy as you usually do(via context menu or keyboard shortcuts). You will see this copy paste tool stores every item you copied into its clipboard. Then go where you want to paste, hit F1-F10 to paste the item. You can view Quick Multi-Copy clipboard to see which key is associated with which item. The best part of this copy paste tool is that its clipboard can store any type of content, regardless of whether it is text, image, or file, etc.