NetBSD/usr.sbin/sysinst
martin f96c1808ac On device where we do not want a MBR (raid, xbd) skip the MBR partitioning
scheme when trying to read partitions from disk. The generic reader will
fall back to disklabel then.
2019-10-25 12:49:58 +00:00
..
arch Split out /rescue to its own set and adapt installers/images to add it. 2019-10-02 11:15:59 +00:00
Makefile
Makefile.inc introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
README.md_defs Provide some documentation for macros / defines used in the machine 2019-08-14 12:49:37 +00:00
SPELLING.en
TODO
aout2elf.c Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
bsddisklabel.c Honor the "no_mbr" flag (used especially for raid and xbd devices) 2019-10-25 12:24:34 +00:00
checkrc.c Fix memory leak (found by MKSANITIZER=yes build). 2019-08-18 11:11:48 +00:00
configmenu.c For upgrade / re-install allow the currently running system as a target 2019-07-23 18:13:40 +00:00
defs.h Split out /rescue to its own set and adapt installers/images to add it. 2019-10-02 11:15:59 +00:00
defsizes.h Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
disklabel.c When translating (internal) indices to device names, properly deal with 2019-10-21 16:09:59 +00:00
disks.c On device where we do not want a MBR (raid, xbd) skip the MBR partitioning 2019-10-25 12:49:58 +00:00
disks_lfs.c
endian.h
factor.c
geom.c refactor disk ioctl stuff to make it smaller. 2019-06-21 21:54:39 +00:00
gpt.c Fix a bug when installing to pre-exising GPT partitions. 2019-08-26 12:14:06 +00:00
gpt_uuid.c Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
install.c Oops, avoid double free. 2019-08-17 18:08:06 +00:00
label.c Fix copy&pasto: when we find a FFSv1 filesystem, properly record it 2019-08-04 10:29:41 +00:00
main.c no need to initialize fields that are already 0. 2019-06-22 20:46:07 +00:00
mbr.c When requesting no special FS sub type, default to FAT32 with LBA. 2019-08-27 17:23:24 +00:00
mbr.h Deal with manualy set disk geometries more carefully to avoid a division 2019-06-19 17:32:31 +00:00
menus.mi Fix the "reinstall sets" action. 2019-07-23 16:02:32 +00:00
menus.pm Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.mbr.de Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.mbr.en Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.mbr.es Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.mbr.fr Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.mbr.pl Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.mi.de Split out /rescue to its own set and adapt installers/images to add it. 2019-10-02 11:15:59 +00:00
msg.mi.en Sentence begins with capital letter ("yes or no?"). Also add a few french 2019-10-17 08:54:50 +00:00
msg.mi.es Split out /rescue to its own set and adapt installers/images to add it. 2019-10-02 11:15:59 +00:00
msg.mi.fr Sentence begins with capital letter ("yes or no?"). Also add a few french 2019-10-17 08:54:50 +00:00
msg.mi.pl Fix polish translation for sysinst 2019-10-23 18:08:31 +00:00
msg.pm.de Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.pm.en Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.pm.es Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.pm.fr Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg.pm.pl Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
msg_cmp.sh Typo, also fix copy & pasted license 2019-06-11 15:31:19 +00:00
msg_xlat.sh
net.c Avoid a buffer overrun with too many interfaces. 2019-07-23 12:37:23 +00:00
part_edit.c Honor the "no_mbr" flag (used especially for raid and xbd devices) 2019-10-25 12:24:34 +00:00
partitions.c On device where we do not want a MBR (raid, xbd) skip the MBR partitioning 2019-10-25 12:49:58 +00:00
partitions.h On device where we do not want a MBR (raid, xbd) skip the MBR partitioning 2019-10-25 12:49:58 +00:00
partman.c avoid calling snprintf/strlcat with an input parameter the same 2019-10-06 00:05:10 +00:00
run.c no need to initialize fields that are already 0. 2019-06-22 20:46:07 +00:00
sizemultname.c Rework internal data structures and "interfaces to user interface" functions 2019-06-12 06:20:17 +00:00
target.c Support upgrade of systems using NAME= syntax in /etc/fstab. 2019-08-07 10:08:04 +00:00
txtwalk.c Support upgrade of systems using NAME= syntax in /etc/fstab. 2019-08-07 10:08:04 +00:00
txtwalk.h Support upgrade of systems using NAME= syntax in /etc/fstab. 2019-08-07 10:08:04 +00:00
unif.awk
upgrade.c Do not offer to upgared the "current system" if we are running off a CD 2019-08-27 14:11:00 +00:00
util.c add a size_t len to get_iso9660_volname() so it can properly do 2019-10-04 21:36:02 +00:00
wskbd.c no need to initialize fields that are already 0. 2019-06-22 20:46:07 +00:00

README.md_defs

/* $NetBSD: README.md_defs,v 1.1 2019/08/14 12:49:37 martin Exp $ */

The following is trying to document the most important machine dependent
defines used in the sysinst code.


If HAVE_GPT is true, the MD code may limit the space used for the
GPT at the beginning of the disk to allow e.g. a bootloader
being added after it (see evbarm on allwinner SoCs, u-boot is
copied at 8k into the image).

/* Size limit for the initial GPT part, in bytes */
#define	MD_GPT_INITIAL_SIZE		(8*1024)


The default installation description is created as a static array using
lots of conditionals. It may be overriden / replaced in the MD code
(see below), an example for that is arch/i386/md.c when we have been
booted from UEFI firmware.

Name		Value / example		Description
PART_BOOT	(8*MEG) (undefined)	if defined, a boot partition
					of this size (in bytes, rounded)
					will be part of the default partition
					suggestions. Must be compile time
					const! Use MD_PART_DEFAULTS if
					runtime adjustment is needed.
PART_BOOT_MOUNT	"/boot" (undefined)	Add boot partition to fstab for
					this mount point
PART_BOOT_TYPE	FS_BSDFS		Kind of filesystem used
PART_BOOT_SUBT	MBR_PTYPE_FAT12		File system specific sub type


The boot partition is always inserted at the front of the suggested default
partitions, to cope with firmwares that may not be able to load from the
whole disk.

If multiple boot partitions are required (see ofppc, where various schemes
are supported, depending on exact model), the variables above can all be
repeated with _BOOT1_ or _BOOT2_ name instead of _BOOT_.


ATTENTION:
	PART_BOOT	is in BYTE (not MB), while most other sizes
			(DEFROOTSIZE, DEFSWAP, ...) are in MB!


The following macros provide optional MD hooks:

MD_PART_DEFAULTS	may be undefined

used like:

	void MD_PART_DEFAULTS(struct pm_dev*, struct part_usage_info*,
	    size_t num_usage_infos),

Called before any of the partition usage defaults is ever used, can be used
to adjust e.g. partition sizes to actual system requirements (align boot
partition with cylindersize), or (since it is a macro and all params are
by references) to completely swap the defaults (e.g. EFI vs. biosboot).
If swapping, make sure allocation and num_usage_infos stays consistent,
old allocation is done by calloc(3), use free(3) to release.


MD_NEED_BOOTBLOCK	may be undefined

used like:

	bool MD_NEED_BOOTBLOCK(struct install_partition_desc *install)

returns true if this setup needs boot blocks. Used for example on x86
when UEFI installs do not need any bootblocks, but BIOS ones do.


HAVE_PLAIN_DISKLABEL_BOOT	may be undefined, only used on architectures
				that have MBR as primary with disklabel as
				secondary partitioning scheme (RAW_PART != 2)

used like:

	bool HAVE_PLAIN_DISKLABEL_BOOT(const char *disk)

returns true if the disk could be made bootable with only a disklabel
(and no MBR).