partition table
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
partition table
(i have one problem in the code )
_____________________________________________________________
PT1_Status db 0x80 ;Drive number/Bootable flag
PT1_First_Head db 0x01 ;First Head
PT1_First_Sector db 0x01 ;Bits 0-5:First Sector|Bits 6-7 High bits of First Cylinder
PT1_First_Cylinder db 0x00 ;Bits 0-7 Low bits of First Cylinder
PT1_Part_Type db 0x0C ;Partition Type
PT1_Last_Head db 0xFF ;Last Head
PT1_Last_Sector db 0xFF ;Bits 0-5:Last Sector|Bits 6-7 High bits of Last Cylinder
PT1_Last_Cylinder db 0xCD ;Bits 0-7 Low bits of Last Cylinder
PT1_First_LBA dd 0x0000003F ;Starting LBA of Partition
PT1_Total_Sectors dd 0x00EE8000 ;Total Sectors in Partition
____________________________________________________________________
i am used fdisk in linux give me that
247 heads,62 sectors/track , 1020 cylinders, total 15630336 sectors
____________________________________________________________________
and used testdisk in windows give me that
CHS 973 255 63 total 15630336 sectors
____________________________________________________________________
i am used flash 8 GB
note :used fat32
i am fill code above but here error any people can help me
_____________________________________________________________
PT1_Status db 0x80 ;Drive number/Bootable flag
PT1_First_Head db 0x01 ;First Head
PT1_First_Sector db 0x01 ;Bits 0-5:First Sector|Bits 6-7 High bits of First Cylinder
PT1_First_Cylinder db 0x00 ;Bits 0-7 Low bits of First Cylinder
PT1_Part_Type db 0x0C ;Partition Type
PT1_Last_Head db 0xFF ;Last Head
PT1_Last_Sector db 0xFF ;Bits 0-5:Last Sector|Bits 6-7 High bits of Last Cylinder
PT1_Last_Cylinder db 0xCD ;Bits 0-7 Low bits of Last Cylinder
PT1_First_LBA dd 0x0000003F ;Starting LBA of Partition
PT1_Total_Sectors dd 0x00EE8000 ;Total Sectors in Partition
____________________________________________________________________
i am used fdisk in linux give me that
247 heads,62 sectors/track , 1020 cylinders, total 15630336 sectors
____________________________________________________________________
and used testdisk in windows give me that
CHS 973 255 63 total 15630336 sectors
____________________________________________________________________
i am used flash 8 GB
note :used fat32
i am fill code above but here error any people can help me
-
- Member
- Posts: 5588
- Joined: Mon Mar 25, 2013 7:01 pm
Re: partition table
In CHS addressing, the cylinder and head are 0-indexed. Any value indicating the first or last cylinder (or head) must be less than the total number of cylinders (or heads).
The total sectors in the partition must be less than the total sectors on the disk.
If you are trying to make the disk bootable, you will get the best results by obeying the following limitations:
The total sectors in the partition must be less than the total sectors on the disk.
If you are trying to make the disk bootable, you will get the best results by obeying the following limitations:
- There must be 63 sectors per track.
- There must be 255 (not 256!) heads.
- CHS addresses must be rounded down to the last whole cylinder.
- Except for the previous point, LBA and CHS addresses must match.
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
Re: partition table
thanks Octocontrabass for reply
i am very happy for help me
but i have difficulty for fill in that code in above
are you can help me for that
i am very happy for help me
but i have difficulty for fill in that code in above
are you can help me for that
-
- Member
- Posts: 5588
- Joined: Mon Mar 25, 2013 7:01 pm
Re: partition table
First, you need to answer these three questions:
- What is the LBA of the first sector in your partition?
- What is the LBA of the last sector in your partition?
- How many sectors are in your partition?
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
Re: partition table
ok how give you information about that
are you know any commands for that
note:i am using flash memory 8GB emulation HDD
name「SanDisk」,ind format by fat32
are you know any commands for that
note:i am using flash memory 8GB emulation HDD
name「SanDisk」,ind format by fat32
-
- Member
- Posts: 5588
- Joined: Mon Mar 25, 2013 7:01 pm
Re: partition table
You choose where the partition will go. Where do you want it to start and end? How big do you want it to be?
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
Re: partition table
no problem i need start and end anything now
i need that for put my bootloader in sector 63
what the LBA of the first sector in your partition?( 63) for put bootloader
what the LBA of the last sector in your partition ? any thing
How many sectors are in your partition? total 15630336 sectors or here any thing from total no problem
now i need any thing working with my flash memory
i need that for put my bootloader in sector 63
what the LBA of the first sector in your partition?( 63) for put bootloader
what the LBA of the last sector in your partition ? any thing
How many sectors are in your partition? total 15630336 sectors or here any thing from total no problem
now i need any thing working with my flash memory
-
- Member
- Posts: 5588
- Joined: Mon Mar 25, 2013 7:01 pm
Re: partition table
Okay. Convert LBA 63 to CHS. Use 255 heads and 63 sectors per track.swadallail wrote:what the LBA of the first sector in your partition?( 63) for put bootloader
Okay, let's use LBA 15630335 (the last sector of the disk). Convert LBA 15630335 to CHS. Use 255 heads and 63 sectors per track.swadallail wrote:what the LBA of the last sector in your partition ? any thing
The first sector of the partition is LBA 63. The last sector of the partition is LBA 15630335. How many sectors is that?swadallail wrote:How many sectors are in your partition? total 15630336 sectors or here any thing from total no problem
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
Re: partition table
thanks
one question, am i can use fdisk without code mbr
one question, am i can use fdisk without code mbr