Disk Partitioning 1MB offset on raw disk
Hi Guys
I know how to do 1MB offset on whole disk where only one partition is being held. Fdisk /dev/sdb, "u" change to sectors, create new partition "n", primary "p" , select partition number "1" and first sector as 2048 and last sector default. But if i like ot have multiple partition then how should i create 1MB offset for all partitions i am being dumb here please guide me. Its 100g disk and if i want 4 partitions of 4gb size lets say how can i do it ? Fdisk /dev/sdb, change to sectors "u", create new partition "n", primary "p", select partition number "1" and first sector as 2048 and last sector size : +4G (4194304) and create another partition 2 but here what will be the first sector : ??? is it next value of previous sector? i.e 4194305? Code:
Device Boot Start End Blocks Id System |
First of call you can directly use: fdisk -cu /dev/sda or /dev/sdb whatever.
You said that you want 1 MB offset for all 4 partitions. Then your first partition with 1 MB offset starts with: 1st Partition -- Starting sector 2048 to Ending sector = 8388608+2048 = 8390656 (1 MiB = 2048 sectors, 1024 MiB (1 GiB ) = 2097152 sectors, which multiplied by 4 comes to 8388608, add another 2048 to 8388608 as you are starting the sectors from 2048 not 0) 2nd Parition -- Starting 8390656+2048 = 8392704 to ending sector = 8392704 + 8390656 = 16783360 This will go on... |
Thanks T3RM1NVT0R. I had few doubts but your reply made it clear thanks.
|
You're welcome. Please mark the thread as solved!
|
All times are GMT -5. The time now is 06:26 PM. |