Commit Graph

95 Commits

Author SHA1 Message Date
msaitoh 37a23ecf39 Fix typo in comment. 2023-06-24 05:18:12 +00:00
reinoud bbe55e4f80 Update list with file systems who do have fsck adding udf since there is now a
fsck_udf.
2022-12-10 20:58:37 +00:00
martin dacc867e53 Always map FS_BSDFFS to one of "FFS", "FFSv2" or "FFSv2ea" - previously
the disklabel name "4.2BSD" could show up initially but we could never
go back to it via the menu used to change the file system type.
This was confusing.
2022-12-10 16:52:02 +00:00
martin cda02d64c0 Fix primary boot selection for FFSv2ea filesystems 2022-11-30 19:44:06 +00:00
martin c6fbd2016e Add support for FFSv2ea in the partition type menus (internally setting
fs version to 3 for this, where 2 is FFSv2 and 1 is FFSv1)
2022-11-30 15:53:35 +00:00
martin 3a0698b068 Simplify name trimming following a suggestion from rillig. 2022-08-30 15:27:37 +00:00
martin 692793ef41 Fix typo (pointed out by rillig) 2022-08-30 11:45:28 +00:00
martin 61e8f3dfee Invoke magic C promotion rules as originally intended - oops!
Pointed out by rillig@
2022-08-30 11:44:15 +00:00
martin 78432c804c Trim trailing whitespace from disk names we got via drvctl. 2022-08-29 17:35:15 +00:00
tsutsui 70b74d3017 Use proper ANSI function declarations. 2022-06-24 22:05:24 +00:00
martin 7e86db2e48 When the user aborts the target disk selection menu, return to the
main loop immediately.
2022-06-20 18:06:28 +00:00
martin 0998f09feb Centralize the "we can newfs this type of filesystem" predicate
and fix the list.
2022-06-19 12:08:31 +00:00
martin 74e9a67aa7 Slightly improved error handling when converion from one partition table
format to another is not lossless.
2022-06-11 18:30:02 +00:00
martin 9ba59248ef Add support for explicitly selecting "EFI system partition" as a partition
type.
2022-06-09 18:26:06 +00:00
martin 6ce5826744 If we get the disk description via device properties, the strings may
have arbitrary length - make sure the "available disks" menu fits
on the current screen.
2022-06-02 15:36:08 +00:00
martin 32928aa7bc Split the available disks (that may be partitioned) from the
preconfigured wedges (that can be install target, but can not be
partitioned). The latter are only usefull in special setups
and clobber the list of available disks for the usual setup cases.
2022-05-16 18:44:38 +00:00
jmcneill 5126c2f90e Use non-deprecated proplib interfaces.
prop_dictionary_set_cstring_nocopy -> prop_dictionary_set_string_nocopy
2022-05-15 18:27:35 +00:00
jmcneill 429eff3149 disks: Get disk identify data from drvctl
When /dev/drvctl exists, attempt to use the disk-info/type property as
a disk's description string. Fallback to ATA / SCSI probing when the
identify data is not available through this interface.

This has the side-effect of adding descriptions for things like NVMe and
SD/eMMC devices.
2022-05-15 14:48:37 +00:00
jmcneill 9005fea07f sysinst: Restore printing disk descriptions, lost in r1.35 2022-05-15 12:48:25 +00:00
andvar 8324be4c9b fix some more typos in comments/log messages, improve wording as well. 2021-08-21 11:55:24 +00:00
martin 38248942cf PR 56354: all actions to set up swap space are not guaranteed to gain
us enough virtual memory anyway, so drop return codes from set_swap*.
The state for cleanup (which swap dev to unuse) has been made global
some time ago anyway.

Previously use of the return values was inconsistent. Error reporting
will only confuse users and sometimes the situation is hard to fix or
even impossible (like in miniroots copide to swap space for booting).
2021-08-12 09:33:59 +00:00
andvar db383f4739 s/partion/partition/ s/arrray/array/ in comments. 2021-08-08 21:50:10 +00:00
martin 0c74f0eefd When converting partitions from one scheme to another, never fail
without providing (if requested) a proper error message.
2021-07-14 18:56:05 +00:00
rillig 6dccb7a0e9 sysinst: remove trailing whitespace from *.c *.h
In contrast to the messages files, this whitespace is not significant.
2021-01-31 22:45:46 +00:00
martin cb429b904f PR 55142: on popular demand bring back expert options to adjust the
number of free inodes, block size and fragment size for FFS and LFS.
2020-10-13 17:26:28 +00:00
martin f184b4ad4d Remove very strange code that special-cased MSDOS file systems and refused
to newfs the partition (despite explicit request to do so) if it was
mountable.
Accidently carried over from a dim and distant past, before we had
fsck_newfs.
2020-10-12 14:29:41 +00:00
martin 6b2c269297 PR 55379: avoid creating bogus /etc/fstab lines for /dev/cd* if no
cdrom is available.
2020-09-28 18:51:34 +00:00
martin d6ad885809 Typo in comment 2020-09-22 15:16:49 +00:00
martin 98c332e311 PR 55202: disable swapping if we started it due to low ram 2020-05-12 17:26:43 +00:00
martin f16eda658a Use strlcpy in a few places to guarnatee 0-terminated strings 2020-02-19 18:08:03 +00:00
martin 38baaacf51 PR bin/54944: make the "explicit single wedge" selection also work for
upgrades.
2020-02-06 19:08:38 +00:00
martin 7cc1a7bbc8 PR bin/54944: deal with escaped spaces in NAME= syntax in /etc/fstab. 2020-02-06 16:28:10 +00:00
martin 6588e96561 bootxx_name() - fix oversight in previous change (do not assume first
partition is the root partition)
2020-02-06 10:42:06 +00:00
martin 86906049de Fix support for non-512-byte/sector disks again after I broke it when
introducing the abstract partition backends.
2020-01-27 21:21:21 +00:00
martin 7fd225f6ad Factor out all RAM size thresholds as defines to avoid magic numbers.
To work around PR misc/54886 bump the threshold for a tmpfs /tmp mount
up to 256 MB.
2020-01-24 07:31:15 +00:00
martin 0e7fb040fb Fix /tmp tmpfs handling and on machines with enough RAM default to
creating a /tmp tmpfs with 25% of ram size limit. Suggested by ad@.
2020-01-16 16:47:19 +00:00
martin abce8cb394 Finish conversion of extended partitioning parts to new abstract
backend interface. XXX still could use a lot of polishing.
2020-01-09 13:22:30 +00:00
martin 675f7bf669 PR 54065: add optional "old compat" variant of ext2fs in file system
type selection and use that as default for the cobalt boot file system.
2019-12-11 19:23:37 +00:00
martin 7ca7eecae1 Make sure all menus have a translatable exit option (or none at all). 2019-11-16 20:26:59 +00:00
martin 485d530922 Make cloning support optional, so we can save some space on very small
install media.
2019-11-13 18:57:26 +00:00
martin f77b58b179 Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
2019-11-12 16:33:14 +00:00
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
martin e1c382678c Skip unwanted (zero sized) partitions. 2019-10-21 16:10:54 +00:00
martin df91044bef Remove a hardcoded assumption that for BIOS boot we always will have
the first partition as root - in mixed EFI/BIOS setups this might not
be true (and in general the user is free to define arbitrary orders).
Pointed out by Robert Nestor.
2019-10-21 14:07:42 +00:00
martin d7f55bad98 PR install/54480: when upgrading a system and re-mounting the target /
with proper options, and the installed system does not use NAME= syntax
in fstab(5), use the device name we used to get here, instead of the
name from fstab, it might be different to what the real system calls the
device (compact flash root showing up as wd0 native, but sd? on the
card reader used for updating it right now).

This is an abuse of the upgrade functionality and in general pretty dangerous
when multiple devices are used in the upgraded fstab (e.g. separate /usr),
and it used to work more by accident with the old code.

However, it is a quite usefull way to upgrade tiny systems with compact flash
root, and it used to work - so support it properly (as far as we can).
2019-08-20 06:38:17 +00:00
martin 0dfd6624ca Do not even consider to fsck partitions where we do not know the file
system type. Add v7fs support.
2019-08-08 13:45:19 +00:00
martin 62c0076db0 Do not try to fsck partitions we are never going to mount.
Found by Andreas Gustafsson's baremetal test bed.
2019-08-08 11:41:16 +00:00
martin b8a71b5965 When creating the /etc/fstab for new installs, the sense of the "noauto"
flag was inverted (editor mishap?)
2019-08-07 10:12:32 +00:00
martin a7267d5357 Support upgrade of systems using NAME= syntax in /etc/fstab.
Make supported file system types dynamic - instead of hardcoding the
available types at compile time, check for available newfs_* helper
binaries in the actual install environment at runtime.
2019-08-07 10:08:04 +00:00
martin a8e7688bfa Properly handle partitions that we were requested to mount but not newfs. 2019-08-03 12:09:22 +00:00