Clan x86

General Forums => General Discussion => Topic started by: Joe on September 21, 2005, 07:00:03 PM

Title: Partcopying a CD bootsector?
Post by: Joe on September 21, 2005, 07:00:03 PM
I can't find any good documentation on partcopy. Anyhow, I want to copy sector 0 (thats 1 for non-zero-based literate people =p) to a file, for.. educational purposes.

Can anyone help?
Title: Re: Partcopying a CD bootsector?
Post by: MyndFyre on September 21, 2005, 10:03:15 PM
You have dd?

Windows?  http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htm

Also, you might be interested in the El Torito Bootable CD-ROM Format Specification v1.0 (http://www.phoenix.com/NR/rdonlyres/98D3219C-9CC9-4DF5-B496-A286D893E36A/0/specscdrom.pdf).

Google is amazing....
Title: Re: Partcopying a CD bootsector?
Post by: Joe on September 21, 2005, 10:31:14 PM
Eh, I've always used partcopy for writing/reading single sectors. I'll check it out tomorrow after school. Thanks MyndFyre!
Title: Re: Partcopying a CD bootsector?
Post by: mfqr on September 21, 2005, 10:52:59 PM
excuse me for intruding, but since this is concerning a bootsector, shouldnt this be in the OS dev forums?
Title: Re: Partcopying a CD bootsector?
Post by: MyndFyre on September 22, 2005, 12:39:40 AM
Who said it's about OS Development?  He just wants to read a bootsector.

FYI Joe, the CD ROM bootsector will be identical to a floppy disk bootsector; the boot code to enable CD ROM booting is in the BIOS.

dd is good for reading/writing to any block device.  I basically dd'd with if=/dev/hda to copy my entire hard drive, MBR and everything.
Title: Re: Partcopying a CD bootsector?
Post by: mfqr on September 22, 2005, 07:37:57 AM
oh i thought he wanted to write his own boot sector to a floppy...
Title: Re: Partcopying a CD bootsector?
Post by: Joe on September 22, 2005, 07:38:33 AM
Well, this is OS Development, to a degree. I'm disassembling the Windows XP bootloader to see how it works. =)
Title: Re: Partcopying a CD bootsector?
Post by: MyndFyre on September 22, 2005, 02:20:20 PM
Why not just load up the ntldr file?