summaryrefslogtreecommitdiff
path: root/usr.sbin/installboot
AgeCommit message (Collapse)Author
2004-01-05Homogenize usage messages: make the 'usage' word all lowercase, as this seemsjmmv
to be the most common practice in our tree.
2003-11-26Use Xr instead of Ic when suitable; NetBSD -> .Nx; add comma;wiz
use Dq for a string.
2003-11-26Provide an example for making a bootable FAT file system, and improvelukem
some of the other examples.
2003-11-14Disable hp300 support (again).lukem
This code is not to be reenabled again until it is fixed to my satisfaction (as a member of core and the person who ends up dealing with most of the host tool build bugs)
2003-11-13roundup() write of hp300 boot code to a multiplr of the disk sector size.dsl
and re-instate the hp300 code - seems to work.
2003-11-10Ensure we use the target disklabel.h, not the host one.dsl
Read the disklabel directly from sector 2 instead of using DIOCGDINFO. Expect the label to be big-endian. Support -o append for real files.
2003-11-10Comment out hp300 references.fvdl
2003-11-10Disable the hp300 for now.fvdl
2003-11-08Don't use PRId64 in a host tool. Not all systems have the PRI*uwe
macros (e.g. FreeBSD 4.x). Cast to long long int instead.
2003-11-08First cut of hp300 installboot, seems to DTRT on i386.dsl
Maybe this code ought to know how to add a file to the LIF filesystem.
2003-11-02Clean up the i386 examples somewhat, adding an example of upgradingperry
the boot blocks on the existing mounted root file system, and eliminating references to bootxx_ufs. I referenced the a partition even though most other ports seem to reference the c partition. I don't know if that's the most correct way to do it, but it seems to work for me and no one can tell me what the canonical method is. I'd let someone else fix the man page but no one seemed to want to and it really needed the example.
2003-10-28XXX: build mdsetimage.c / installboot/ffs.c with -O0 on sun2 as GCC3mrg
barfs on these for now.
2003-10-28Grammar fixes in previous; use Nx in one place;wiz
sort examples; replace < and > with \*[Lt] and \*[Gt] respectively. Bump date for previous.
2003-10-27minor consistency tweakslukem
2003-10-27fix typo in commentlukem
2003-10-27add next68k support to installbootcl
2003-10-27Overhaul how `build.sh tools' are used:lukem
* Rename "config.h" to "nbtool_config.h" and HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H. This makes in more obvious in the source when we're using tools/compat/config.h versus "standard autoconf" config.h * Consistently move the inclusion of nbtool_config.h to before <sys/cdefs.h> so that the former can provide __RCSID() (et al), and there's no need to protect those macros any more. These changes should make it easier to "tool-ify" a program by adding: #if HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" #endif to the top of the source files (for the general case).
2003-10-14Instead of requiring that the BPB is always the FAT32 one, check thelukem
first three bytes to determine how much of the BPB to preserve. Supported values: eb 3c 90 FAT16 BPB eb 58 90 FAT32 BPB (anything else) don't preserve any BPB This is because the BPB is generally only the FAT16 one except in the bootxx_msdos case, where it's the larger FAT32 one.
2003-10-10Fix compile error on powerpc. Noted by Juergen Hannken-Illjes in private mail.lukem
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-10-06Replace BP_* with I386_BP_FLAGS_*, for consistency with other stuff inlukem
<sys/bootblock.h> (CONSDEV_ should be converted as well, but that's more intrusive...)
2003-10-06spelo in commentlukem
2003-10-03Document the various bootxx_ variants seen on i386, since it's a FAQ.lukem
Document /usr/mdec/biosboot. (Arguably that should be renamed to "/usr/mdec/boot" or "/usr/mdec/boot.i386" for consistency with other platforms)
2003-08-30Add amd64 to list of supported machines (does the same as i386).fvdl
2003-08-16Add an example for creating a bootable i386 floppy.martin
2003-07-27Explicitly pull in <sys/endian.h> #if !defined(HAVE_CONFIG_H).lukem
(I prefer to be explicit about this, since installboot uses the endian macros a lot)
2003-07-27rcsidlukem
2003-07-04Add some htole32() for host endianness independancedsl
2003-05-30Another mistake in the ufs2 code - a missing else.dsl
2003-05-18Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),lukem
there's no need to special-case .include-ing it.
2003-05-08Format fixes.petrov
2003-04-29Change 'ulong' to 'unsigned long' so it compiles as a host tool on freebsd.dsl
2003-04-20Add explicit descriptions of the `filesystem', `primary', and `secondary'lukem
arguments, including a clarification that `secondary' is relative to the root of the filesystem, not a path name to that file if `filesystem' is mounted. Resolves PR 20977 from Jim Bernard.
2003-04-18Use <md5.h> rather than <sys/md5.h>. This is what the man page tells us tobjh21
do, and is required for cross-compiling since libnbcompat doesn't provide <sys/md5.h>.
2003-04-16Bump date for last; sort authors; add comma after e.g.wiz
2003-04-16Protect use of __RCSID() with a check to ensure that it's defined.briggs
Suggested by Ian Lance Taylor on tech-userlevel@ to help cross-compilation on Red Hat 7.3.
2003-04-15Use htole32 so host endianness independantdsl
2003-04-15Change the way -o options are parsed, now done in MI code with a check afterdsl
all the options have been processed that they are supported my the specific system. Add i386 MD options (console, password, speed and timeout) (Approved by christos and lukem)
2003-04-09Add support for i386 boot code - for new bootxx stuffdsl
2003-04-09Add support for 'new' format i386 bootxx codedsl
2003-04-05Fix two mistakes done in the UFS2 merge:he
o Correct the order of arguments to ffs_read_disk_block; the second one is blocknumber to read, not the size to be read. This would affect the UFS2 code, and is thus not much excercised at the moment. o The offsets in SBLOCKSEARCH are in bytes, but ffs_read_disk_block wants its location in terms of DEV_BSIZE blocks. Fix this bug in ffs_match(). The latter together with the recent magic number fix to <ufs/ffs/fs.h> fixes a cross build problem seen when doing a i386->sparc build.
2003-04-02Add cats for printf %llu arguments, for the benefit of LP64 platforms.he
2003-04-02With the new UFS2 code, alternative places are searched for a super-block.he
This includes block #0. Therefore, allow read of block #0 in ffs_read_disk_block(); change assert (blkno > 0) to (blkno >= 0).
2003-04-02Add support for UFS2. UFS2 is an enhanced FFS, adding support forfvdl
64 bit block pointers, extended attribute storage, and a few other things. This commit does not yet include the code to manipulate the extended storage (for e.g. ACLs), this will be done later. Originally written by Kirk McKusick and Network Associates Laboratories for FreeBSD.
2003-02-25.Nm does not need a dummy argument ("") before punctuation orwiz
for correct formatting of the SYNOPSIS any longer.
2003-01-24Bump daddr_t to 64 bits. Replace it with int32_t in all places wherefvdl
it was used on-disk, so that on-disk formats remain the same. Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-15Add support for amiga.mhitch
2002-10-03alpha also supports append & sunsumlukem
2002-10-03correct commentlukem
2002-07-20sweep of errx/warnx, remove unnecessary trailing \ngrant