49 Commits (009dfd7de58b0a857e4e1e5648bada2992616fcb)

Author SHA1 Message Date
Adriaan de Groot 520478847c Make logging more consistent.
- Across all the C++ modules, use Logger::SubEntry for sub/continues
   log lines, instead of somewhat-random indent strings.
8 years ago
Adriaan de Groot 63b317902d [libcalamares] [partition] Adjust to logging changes
- Use the un-paren'ed Continuation and SubEntry
8 years ago
Adriaan de Groot 4caa401a07 [partition] Use structured logging
- Structured logging
 - Reduce chattiness
 - Use helper functions
 - Some TODO were done a while ago
8 years ago
Adriaan de Groot 68f29ebf20 [partition] Handle partition flag FlagEsp post KPMCore 3.3.0 8 years ago
Adriaan de Groot 2a2795c54c [partition] Avoid KPMCore warnings
- Get ready for KPMCore post-3.3.0, which deprecates a bunch of
   Flag<foo> and State<foo> in preparation of enum classes.
8 years ago
Adriaan de Groot 5d6d2b8078 [partition] Make convenienceName() available for debugging
- Function for human-readable names is useful in more parts of
   the partition module.
8 years ago
Adriaan de Groot fdb4311a70 Merge branch 'issue-1098'
- Doesn't fix the issue, but adds useful things I want in master
   already, also for debugging other issues.
8 years ago
Arnaud Ferraris 982840bafd [partition] Allow a configurable EFI System Partition size
As requested, this commit adds a new configuration option to the
partition.conf file, name `efiSystemPartitionSize`.

When this option is absent, the default size of 300MiB will be used.

Fixes #1090

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
8 years ago
Arnaud Ferraris a5258f07a1 [partition] move bytesToSectors() and sizeToSectors() to PartUtils
In order to allow the use of these functions across the whole partition
module and keep all partition size-related functions in the same
namespace, this commit moves them to PartUtils.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
8 years ago
Arnaud Ferraris 90eb6afd52 [partition] move parseSizeString() function to PartUtils
In order to be able to parse partition size strings using the same
functions across the partition module, the parseSizeString() function is
exported to the PartUtils namespace.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
8 years ago
Adriaan de Groot 7cfaba2d53 [partition] In logging, name device nicely
- Provide a convenience method that names a Partition* with the
   best human-readable name we can find (worst-case, spit out a
   pointer representation which will at least help figure out
   the identity of the Partition*).
8 years ago
Arnaud Ferraris 74ead4c7ba [partition] improve filesystem search operation
Due to changes to the FileSsytem::typeForName() function, more
processing is needed to deal with locales and different cases.
This is done by refactoring the findFS() function, initially located in
the PartitionViewStep class, and making it available to the whole module.

Additionnally, more checks have been implemented regarding the use of
global storage in the PartitionLayout class, and the filesystem types
now use the correct FileSystem::Type, as requested.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
8 years ago
Adriaan de Groot 14c72824f0 [partition] Be chatty when deciding a partition isn't resizable 8 years ago
Adriaan de Groot b798c27bc4 [partition] Be more verbose while looking for fstab entries 8 years ago
Adriaan de Groot 38d58fb6ed [partition] Check for suitable FS before passing -o noload
- The noload option prevents journal re-play (so it's an extra-
   strong read-only) but is only applicable to ext3 and ext4.
   Check the FS type before mounting; other FS types don't
   accept -o noload and will fail to mount.
8 years ago
Adriaan de Groot e0ce500f36 [partition] Improve debug-output after os-prober 8 years ago
Adriaan de Groot c522004575 [partition] Mount fs read-only when searching for fstab
Submitted by aliveafter1000

FIXES: #1044
CLOSES: #1050
8 years ago
Adriaan de Groot 6de55e6951 [partition] Construct, then winnow, the fstab entries 8 years ago
Adriaan de Groot 516ae494bf [partition] Complain if unmount fails
- If unmount fails, then warn and don't autoremove
8 years ago
Adriaan de Groot bd1b482242 [partition] Don't autoremove the tempdir
- Dangerout since we're mounting things inside that tempdir,
   and then doing a "weak" unmount
8 years ago
Adriaan de Groot f1c1d07dca [partition] Add convenience methods to FstabEntry
- Add something like a constructor
 - Add validity checking
8 years ago
Adriaan de Groot cbd62fbeb1 Merge branch 'master' into secureboot 8 years ago
Adriaan de Groot 5bcd6eaef8 [partition] Reduce warnings by removing unused code 8 years ago
Adriaan de Groot 336b8c758a [partition] Consider the future flags when checking EFI bootability
- If we're changing the flags to enable EFI boot, then that's
   enough to satisfy the (future) EFI bootability check.
   This is for issue #622 as well. Fixes #884.
8 years ago
Adriaan de Groot 092529da45 [partition] WIP: EFI partition search
- Add some logging (not even sure it compiles) because
   my openSUSE Krypton Secureboot-enabled VM says
   "no EFI system partitions found".
9 years ago
Adriaan de Groot 3ae126f589 [modules] Use cError() as well
- Switch KPMHelpers to using Calamares logging instead of qDebug()
9 years ago
Adriaan de Groot 94b6c95c44 [partition] Introduce function for checking various flag-combinations for ESP boot. 9 years ago
Adriaan de Groot 762ad54344 Documentation: change http links to GitHub to https 9 years ago
Adriaan de Groot 3e5916157f A mounted partition cannot be resized or replaced
- add check for isMounted()
 - a device with a mounted partition cannot be (entirely) erased

FIXES #639
9 years ago
Adriaan de Groot 7e66499f36 Refactor check for EFI system.
The TODO stands, to delegate this to KPMCore.
9 years ago
Adriaan de Groot 102bed1805 Partitions: split device-listing (and winnowing) into separate source file.
The grab-list-of-writable-devices code is usable for the partition module, but
also useful for welcome module, so reduce its footprint.
9 years ago
Adriaan de Groot 5bf03cc515 Partitions: shuffle some device-detection code off to PartUtils.cpp 9 years ago
Rohan Garg bba2f65079
Add additional variables to help improve readability 10 years ago
Teo Mrnjavac 40eba50821 Improve debug output. 10 years ago
Teo Mrnjavac 244b4dff83 Improve debug output. 10 years ago
Andrius Štikonas 9f0ca042fe Port away from most cases of Q_FOREACH to C++11 ranged for loop.
In order to avoid deep copies, Qt containers over which we iterate must be const
The remaining unported cases require qAsConst (Qt 5.7) or std::as_const (C++17)
10 years ago
Teo Mrnjavac 811261258b Try to load filesystem UUIDs into the OsproberEntryList structure. 10 years ago
Teo Mrnjavac 18b6e56271 nullptr safety. 10 years ago
Teo Mrnjavac be3070ca48 Populate /home partition path, if any. 10 years ago
Teo Mrnjavac f2f5a18984 Reading a system's fstab lines into the osprober entries list. 10 years ago
Chantara Tith fd8c131b26 implement free-space partition replace install 11 years ago
Teo Mrnjavac a0055534a1 Disallow replace/resize on free space.
CAL-359 #close
11 years ago
Teo Mrnjavac 5372245aed Copyright statements. 11 years ago
Teo Mrnjavac a9c6b47e5e Check whether a new primary partition can be created in canBeResized. 11 years ago
Teo Mrnjavac 935c4816d3 New partition replace check. 11 years ago
Teo Mrnjavac 01eede3f6e Split out a canBeResized overload that takes a Partition*. 11 years ago
Teo Mrnjavac e277467ed4 Run osprober after we have a working DeviceModel. 11 years ago
Teo Mrnjavac fc54b9bf40 Debug spam. 11 years ago
Teo Mrnjavac 95e87391a4 Refactor Osprober and resizability logic out ot PartitionViewStep. 11 years ago