Accessing info from Boot Sector of Diskette


 
Thread Tools Search this Thread
Top Forums Programming Accessing info from Boot Sector of Diskette
# 1  
Old 02-19-2005
Data Accessing info from Boot Sector of Diskette

I am writing a Floppy Disk Driver and need to find out what the "Sectors per track", "Tracks per cylinder", and the "number of cylinders" on a disk. I have a book that tells me that this info is held in the boot sector of the disk in locations such as:

0x18 0x19 Sectors per track

But doesn't even begin to explain how to access this data.

Can anyone tell me how to access this? Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Boot disk crash with metadb config info

Hello all; We have a SunFire V240 with three disks that were part of a metadb. One of those disks, the boot disk, experienced a horrible death Monday night and we're now trying to recover from that. I know very little about metadb stuff, so please be gentle with me... I'm assuming... (3 Replies)
Discussion started by: Handon
3 Replies

2. Filesystems, Disks and Memory

Cannot use USB diskette drive

I would be extremely grateful for any help on the following matter. Under AIX 5.1 and for years I have been using perfectly well a USB 3.5" disketted drive. But since yesterday, after a power failure disconnected my e-server, I have been unable to use the drive. Whatever <operation> I try to... (0 Replies)
Discussion started by: ahjchr
0 Replies

3. UNIX for Dummies Questions & Answers

boot / reboot log info

hi guys, i know some commands to check last boot information in solaris and redhat. #last -10 | grep boot #who -b #cat /var/adm/messages | grep signal but how do i check for boot info in hp-ux other than from the "shutdownlog" #last -10| reboot has rebooted my hp-ux server ! ... (2 Replies)
Discussion started by: cromohawk
2 Replies

4. AIX

Repair boot sector after stupidly importing disk into vg?

Hey guys, I've bought a second-hand RS/6000 hardware with freshly installed AIX 5.3 on disk2 and freshly installed AIX 6 on disk1. I'm in possession of the original 5.3 install cds but the AIX 6 installation is just on the disk, I've no install media. So first after getting the system, I... (3 Replies)
Discussion started by: selzeda
3 Replies

5. SCO

boot diskette no.2 error

please execuse my english ... i'm from czech republic ... I have a copy of UnixWare 7.0.1. There is images of boot diskettes on the CD. I used rawrite to create bootdiskettes 1 and 2. When I boot from disk1, installator will prompt me for language, I choose english, then it wants to insert... (5 Replies)
Discussion started by: bsorter
5 Replies

6. UNIX for Dummies Questions & Answers

Fedora Core 3 boot diskette

I want to upgrade from Red Hat Linux 8.0 to Fedora Core 3. I have already downloaded FC3 on CD's. My current config. on my PC is that I have Win XP on primary hard drive and Red Hat 8.0 on another hard drive. Because my Compaq Presario reserves the first cylinder of my primary hard drive, I... (1 Reply)
Discussion started by: Mark McWilliams
1 Replies

7. Filesystems, Disks and Memory

boot sector bad? or is is something else?

SuSE 8 Both LILO and GRUB are complaining about not being able to write to the boot sector. Is this definitely a problem with the drive or is there another possible problem? I've checked the BIOS and I don't think the problem is there....it's probably the drive. Just another Linux user (1 Reply)
Discussion started by: HumanBeanDip
1 Replies

8. UNIX for Dummies Questions & Answers

boot sector for Solaris 8

Hi all, I was wondering if anyone knows how to make a boot sector for Solaris 8. I'm trying to install solaris 8 via the network and I'm get error "files just loaded does not seem to be executable" at the ok propmt. Has anyone encouter this problem before? THANKS advance (1 Reply)
Discussion started by: larry
1 Replies

9. Filesystems, Disks and Memory

Boot Diskette Image

Where can I find the boot floppy disk image file(*.vfd)of SCO UNIX 5.0.5?:confused: (1 Reply)
Discussion started by: whiteknight
1 Replies

10. UNIX for Dummies Questions & Answers

boot diskette

I have a ICL DRS3000 Server which runs AT&T SVR4 version 6 unix. The first boot diskette got damaged. How can I replace this diskette? Can it be created from another machine running the same Operating system? (1 Reply)
Discussion started by: spice1770
1 Replies
Login or Register to Ask a Question
mformat(1)						      General Commands Manual							mformat(1)

NAME
mformat - mtools utility to add a DOS file system to a low-level formatted diskette SYNOPSIS
mformat [-t tracks] [-h heads] [-s vectors] [-l volumelabel] drive: OPTIONS
Specifies the number of tracks (not cylinders) on the diskette. Specifies the number of heads (sides) on the diskette. Specifies the num- ber of sectors per track. Specifies the volume label. This is an optional option. DESCRIPTION
Note You must specify the floppy disk storage device that is to be formatted. If you do not specify a device, or if a device is not found, the command may incorrectly format a SCSI device which could be a system or data disk. The mformat command adds a minimal DOS compatible file system (boot sector, FAT, and root directory) to a UNIX formatted diskette. If the diskette is unformatted, you must low-format the disk. You can do this with a PC system, or on Tru64 UNIX using either the scu utility or the fddisk utility, depending on your floppy drive. Tru64 UNIX supports both FDI and SCSI attached 3.5" floppy drives with DD, HD, or ED media. Not all floppy drives are compatible with ED media. The following track/head/sector values are supported: --------------------------------------------------------------- Media Capacity Tracks Heads Sectors type KB/MB Bytes Sectors -t -h -s --------------------------------------------------------------- DD 720KB 737280 1440 80 2 9 HD 1.44MB 1474560 2880 80 2 18 ED 2.88MB 2949120 5760 80 2 36 --------------------------------------------------------------- To format a diskette for other than the ED 2.88MB default capacity, you must specify the number of sectors per track with the -s option. No error is returned if you use mformat to put an ED file system onto an HD floppy, but you will get errors from other utilities if you try to write beyond the physical end of the media. RESTRICTIONS
The following restrictions apply: The mformat command requires a low-level format utility from UNIX. The mformat command does not detect (or record) bad block information. EXIT STATUS
The following exit values are returned: Success. Failure. EXAMPLES
In the following example, a SCSI floppy diskette is formatted at the ED 2.88MB capacity, then a DOS file system is initialized with mfor- mat: $ /sbin/scu -f /dev/rdisk/dsk/6a format density ED $ mformat a: In the following example, an FDI floppy diskette is formatted at the HD 1.44MB capacity, then a DOS file system is initialized with mformat, a file is copied to the diskette, and the mdir command is used to check the contents of the diskette. The mlabel command is used to add a label and mdir is used to again check the diskette contents. Finally, a DD file system is placed on the diskette, mcopy is used to place a file on it, and mdir is used to verify the diskette contents: $ fddisk -fmt /dev/rfd0a NOTE: Setting interleave factor to ``-i2:4''. Use ``-i<nnn>[:<ccc>]'' option to override. Disk type: 3.50 inch, HD (1.44MB) Number of sectors per track: 18 Number of surfaces: 2 Number of cylinders: 80 Sector size: 512 interleave factor: 2:4 Formatting disk... Percentage complete: Format complete, checking... Quick check of disk passes OK. $ mformat -s 18 a: $ mcopy README a: Copying README $ mdir a: Volume in drive A has no label Directory for A:/ README 769 6-04-97 8:59a 1 File(s) 1456640 bytes free $ mlabel a: Volume in drive A is unlabeled Enter the new volume label (11 characters): hddisk $ mdir a:Volume in drive A is hddisk Directory for A:/ README 769 6-04-97 8:59a 1 File(s) 1456640 bytes free $ mformat -s 9 -l dddisk a: $ mcopy README a:README.1 $ mdir a: Volume in drive A is dddisk Directory for A:/ README 1 769 6-04-97 9:16a 1 File(s) 729088 bytes free In the following example, an unformatted 2.8Mb floppy diskette is formatted using the scu command, followed by the mformat command. Once it is formatted by both the scu and mformat commands, it is ready for use: $ /sbin/scu -f /dev/disk/floppy format density ED $ mformat -t 80 -h 2 -s 36 a: FILES
Executable file SEE ALSO
Commands: mlabel(1), mtools(1) Utilities: fddisk(8), scu(8) Floppy disk interface: fd(7) mformat(1)