summaryrefslogtreecommitdiff
path: root/sbin/mbrlabel
AgeCommit message (Collapse)Author
2018-03-30Handle sector sizes != 512, check partition overlaps, improve guessingmlelstv
of filesystem parameters.
2013-02-27Remove trailing whitespace.wiz
2013-02-27Fix terminology issue brought up by Bug Hunting in PR 47314.is
The boot records in extended partitions are called "Extended Boot Record" (EBR); use that in the documentation where appropriate.
2012-07-14From Bug Hunting:wiz
Sync usage with man page.
2012-07-14From Bug Hunting:wiz
- use more common option list header line; - remove superfluous `.Pp' macro (fixes mandoc(1) warning); - bump date.
2011-08-27Be more static.joerg
2010-04-05Sort option descriptions, per PR 43119 by Bug Hunting.wiz
Refer to -r from -w. Bump date.
2006-01-12Grammar fix.wiz
2005-12-28fix compilation on LP64 machines.christos
2005-12-27Add an option (-s) to specify which sector to read to parse the partitionjmmv
table. Useful if the disk has remapping drivers installed into it (such as Ontrack Disk Manager). Added as an option instead of automatic behavior to let the user scan any of the two partition tables at will.
2004-01-05Homogenize usage messages: make the 'usage' word all lowercase, as this seemsjmmv
to be the most common practice in our tree.
2003-10-08Overhaul MBR handling (part 1):lukem
<sys/bootblock.h>: * Added definitions for the Master Boot Record (MBR) used by a variety of systems (primarily i386), including the format of the BIOS Parameter Block (BPB). This information was cribbed from a variety of sources including <sys/disklabel_mbr.h> which this is a superset of. As part of this, some data structure elements and #defines were renamed to be more "namespace friendly" and consistent with other bootblocks and MBR documentation. Update all uses of the old names to the new names. <sys/disklabel_mbr.h>: * Deprecated in favor of <sys/bootblock.h> (the latter is more "host tool" friendly). amd64 & i386: * Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to be consistent with the naming convention of the msdosfs tools. * Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1 and it's confusing to have two functionally equivalent bootblocks, especially given that "ufs" has multiple meanings (it could be a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems). * Rework pbr.S (the first sector of bootxx_*): + Ensure that BPB (bytes 11..89) and the partition table (bytes 446..509) do not contain code. + Add support for booting from FAT partitions if BOOT_FROM_FAT is defined. (Only set for bootxx_msdos). + Remove "dummy" partition 3; if people want to installboot(8) these to the start of the disk they can use fdisk(8) to create a real MBR partition table... + Compile with TERSE_ERROR so it fits because of the above. Whilst this is less user friendly, I feel it's important to have a valid partition table and BPB in the MBR/PBR. * Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent with other platforms. * Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that we can boot off FAT partitions. * Crank version of /usr/mdec/boot to 3.1, and fix some of the other entries in the version file. installboot(8) (i386): * Read the existing MBR of the filesystem and retain the BIOS Parameter Block (BPB) in bytes 11..89 and the MBR partition table in bytes 446..509. (Previously installboot(8) would trash those two sections of the MBR.) mbrlabel(8): * Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code to map the MBR partition type to the NetBSD disklabel type. Test built "make release" for i386, and new bootblocks verified to work (even off FAT!).
2003-07-13xref dkctl(8)lukem
2003-06-07Make writes to the in-core label persist after mbrlabel closes the disk.dsl
2002-09-28add MBR_PTYPE_APPLEUFS of 0xa8dbj
part of PR #17345
2002-08-19Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/pathlukem
2002-05-21open device as readonly unless -w is specified.yamt
2002-02-07minor LP64 nitsross
2002-01-24make the description of -w and -r more clear, per PR 13503.fair
2002-01-13Cross-link fdisk(8), mbr(8), and mbrlabel(8) in the SEE ALSO sections,fair
as suggested in PR 14288. Also add a little white space to mbr(8) to make it a little more readable.
2001-12-30fix a typomrg
2001-11-16Drop unnecessary .Pp.wiz
2001-08-20Use getrawpartition().ad
2001-07-26partiton -> partitionwiz
2001-05-01clarify that -w updates the in-core label if changed, and if -r islukem
given as well, the on-disk label will then be updated.
2001-02-20use getprogname()cgd
2001-02-18- remove unused arg to getparts()lukem
- clean up WARNS=2 problems - implement getshort() - use getshort() with MBR_MAGICOFF to test if the magic number is OK, rather than using hard-coded magic numbers
2001-02-04ifix nested extern.christos
2001-01-04change verbose probe message to display "size xxx (yyy MB), offset zzz".lukem
use %u instead of %d.
2000-12-27change behaviour of flags slightly:lukem
-w write in-core label if changed -r update on-disk as well as in-core label (with -w) -f force update (-w), even if there's been no change -r behaviour suggested by matt green. what used to be `-f' is now `-wrf'
2000-12-24more rewordinglukem
- mbrlabel updates the disklabel; it doesn't generate it - it doesn't just affect the incore label, so remove the `incore' qualifier
2000-12-24i got sick of the brain damage that mbrlabel used to do, and hadlukem
gotten bitten by mbrlabel trashing my incore disklabel to a point where the machine wasn't usable, so I reworked it: * only update the incore (and on-disk) label if `-f' is given. by default, the proposed disklabel will be printed but no changes will occur * add -q, to make the default operation a bit more quiet. * leave existing `used' in-core partition slots alone, and only add entries to the incore label if: - there's not an existing partition of the same size and offset (even of a different type) - there's a free partition slot (`unused', with size == 0) * use DIOCWDINFO instead of DIOCSDINFO, to update the incore as well as the on-disk label * use showpartitions() from ../disklabel/printlabel.c this should make mbrlabel a *lot* more useful.
2000-12-24Add NTFS recognition per patch supplied by Dave Huang in bin/11804.wiz
2000-12-24ANSIfy, de-__P()wiz
2000-11-14xref (disklabel.8, fdisk.8, mbrlabel.8) as appropriateabs
2000-07-03More include fixups and GCC 2.96 nonsensematt
2000-03-15Moved from mbrlabel.c,vfvdl
2000-03-15Moved from mbrlabel.8,vfvdl
2000-03-15Moved from Makefile,vfvdl