mkntfs: set the physical drive and the extended boot signature to 0x80
in the Extended BPB which are needed to boot from diskedge.strict_endians
parent
7685cb47e5
commit
43f2ab6ec3
|
@ -5,6 +5,8 @@ xx/xx/2006 - 1.13.1-WIP
|
|||
- Fix build with --disable-gnome-vfs --enable-fuse-module. (Gentoo)
|
||||
- ntfscluster: identify files even if their clusters aren't set
|
||||
in $Bitmap (useful to find potentially corrupted files). (Szaka)
|
||||
- mkntfs: set the physical drive and the extended boot signature to
|
||||
0x80 in the Extended BPB which are needed to boot from disk. (Szaka)
|
||||
|
||||
27/02/2006 - 1.13.0 - Lots and lots and lots of fixes and enhancements.
|
||||
|
||||
|
|
|
@ -70,13 +70,10 @@ typedef struct {
|
|||
u8 jump[3]; /* Irrelevant (jump to boot up code).*/
|
||||
u64 oem_id; /* Magic "NTFS ". */
|
||||
/*0x0b*/BIOS_PARAMETER_BLOCK bpb; /* See BIOS_PARAMETER_BLOCK. */
|
||||
u8 unused[4]; /* zero, NTFS diskedit.exe states that
|
||||
this is actually:
|
||||
u8 physical_drive; // 0x80
|
||||
u8 current_head; // zero
|
||||
u8 extended_boot_signature; // 0x80
|
||||
u8 unused; // zero
|
||||
*/
|
||||
u8 physical_drive; /* 0x00 floppy, 0x80 hard disk */
|
||||
u8 current_head; /* zero */
|
||||
u8 extended_boot_signature; /* 0x80 */
|
||||
u8 reserved2; /* zero */
|
||||
/*0x28*/s64 number_of_sectors; /* Number of sectors in volume. Gives
|
||||
maximum volume size of 2^63 sectors.
|
||||
Assuming standard sector size of 512
|
||||
|
|
|
@ -4617,10 +4617,8 @@ static BOOL mkntfs_create_root_structures(void)
|
|||
bs->bpb.hidden_sectors = cpu_to_le32(opts.part_start_sect);
|
||||
ntfs_log_debug("hidden sectors = %llu (0x%llx)\n", opts.part_start_sect,
|
||||
opts.part_start_sect);
|
||||
/*
|
||||
* If there are problems go back to bs->unused[0-3] and set them. See
|
||||
* ../include/layout.h for details.
|
||||
*/
|
||||
bs->physical_drive = 0x80; /* boot from hard disk */
|
||||
bs->extended_boot_signature = 0x80; /* everybody sets this, so we do */
|
||||
bs->number_of_sectors = cpu_to_sle64(opts.num_sectors);
|
||||
bs->mft_lcn = cpu_to_sle64(g_mft_lcn);
|
||||
bs->mftmirr_lcn = cpu_to_sle64(g_mftmirr_lcn);
|
||||
|
|
Loading…
Reference in New Issue