Bug 127056

Summary: Allow mkdosfs to mirror bootcode from template
Product: [Fedora] Fedora Reporter: Sam Bingner <sam>
Component: dosfstoolsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: mark, mattdm
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-25 20:05:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Add option to save custom bootcode
none
Add option to allow creationg of bootable partitions based on template bootcode none

Description Sam Bingner 2004-07-01 05:26:31 UTC
Description of problem:
mkdosfs, and no other programs I was able to locate currently allow 
you to write boot code to a FAT partition.  This patch will add an 
option "-B" that points to a dump of the first sector of the 
partition for FAT16 or the first 13 sectors for FAT32 (some of the 
bootcode is farther in)

It also corrects the layout of the structure to match the whitepaper 
from M$

Version-Release number of selected component (if applicable):
2.9

Steps to Reproduce:
save bootcode from a bootable fat32 partition (NT, 2000, Win95 etc)
 - dd if=/dev/hda1 of=f32.bs bs=512 count=13

create a new bootable partition:
mkdosfs -F 32 -B f32.bs /dev/hda1

Note, this still requires somehow writing the MBR, which is easily 
done with dd like so:
save: dd if=/dev/hda of=DOSMBR bs=512 count=1
write: dd if=DOSMBR of=/dev/hda bs=446 count=1 ; dd if=DOSMBR 
of=/dev/hda bs=2 skip=255 seek=255

The second dd is needed to write the bootable drive flag to the MBR

Comment 1 Sam Bingner 2004-07-01 05:27:53 UTC
Created attachment 101554 [details]
Add option to save custom bootcode

Comment 2 Sam Bingner 2004-07-01 05:33:08 UTC
Comment on attachment 101554 [details]
Add option to save custom bootcode

Attached wrong file, sorry

Comment 3 Sam Bingner 2004-07-01 05:33:48 UTC
Created attachment 101555 [details]
Add option to allow creationg of bootable partitions based on template bootcode

Comment 4 Mark Heslep 2004-07-01 15:33:23 UTC
I 2nd Sam's RFE.  We really need bootable dos partitions here.

Comment 5 Matthew Miller 2005-04-26 16:23:14 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 6 John Thacker 2006-10-25 20:05:21 UTC
Closed per above message and lack of response.  Note that FC2 is not even
supported by Fedora Legacy currently.

Comment 7 Sam Bingner 2006-10-26 00:34:37 UTC
When I posted this FC2 was current.  There was no lack of feedback, since there 
was no request for data.  If you want to ignore it, I'll just keep patching my 
own code when necessary and maybe somebody will be able to find this when they 
need it.  Great system you have here.