| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement configure_fstab() as a replacement of ogConfigureFstab.
Create src/utils/fstab.py to implement the main fstab
configuration functions. Define two fstab helper classes,
FstabBuilder and FstabEntry.
FstabEntry
Represents each line in the fstab file.
Has the values: device, mountpoint, fstype, options, dump_code
and pass_code.
FstabBuilder
Contains a list of FstabEntry. Handles loading of a
preexisting fstab file and the serialization of multiple
FstabEntry into a file.
The fstab configuration has 3 main steps:
Root partition:
- Update the device field with the device where
the new system is installed.
Swap partition:
- Preserve all the swapfile entries in every case.
- If the filesystem has a swap partition: update the device field
in the first fstab swap entry and remove the rest swap entries
pointing to a swap partition. Only one swap partition is supported.
Create a new fstab entry if no preexisting swap entry exists.
- If the system has no swap partition remove every swap partition
entry.
EFI partition:
- Update the device field of the EFI fstab entry if it exists.
Create a new fstab entry if no preexisting EFI entry exists.
Add get_filesystem_id to disk.py to obtain the UUID.
Define every device field as a UUID. That method is more robust
than a plain device path as it works after disks being added or
removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of
Checking partition "Microsoft Basic Data"...
Checking partition "EFI System"...
show
Searching EFI partition...
EFI partition found at /dev/sda1
and refer to EFI partition consistently in logs.
|
|
|
|
|
|
|
|
| |
Add get_partition_id and get_disk_id to obtain the UUID of a disk
or partition as a string. These values are obtained invoking the
program blkid as a subprocess.
This commit is preparatory work for the new native postinstall code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Log an error message in known error cases and log a backtrace
otherwise.
Define a new error type OgError to be used in all the 'raise'
blocks to define the error message to log. The exception
propagates until it reaches send_internal_server_error() where
the exception type is checked. If the type is OgError we log
the exception message. Logs the backtrace for other types.
The initial error implementation printed a backtrace everytime
an error ocurred. The next iteration changed it to only print
a backtrace in a very particular case but ended up omiting too
much information such as syntax errors or unknown error context.
The actual implementation only logs the cases we already cover in
the codebase and logs a bracktrace in the others, enabling a
better debugging experience.
|
|
|
|
|
|
| |
Refine 97647c32aa2c utils: add enforce_gpt argument to get_efi_partition()
to provide more explicit error when trying to boot Windows UEFI from DOS
partition.
|
|
|
|
|
|
|
| |
The Windows bootloader only supports a UEFI boot from a GPT
partition. Set enforce_gpt to True in every codepath related to
Windows. When enforce_gpt is set to True get_efi_partition()
raises an exception when an MBR partition scheme is detected.
|
|
|
|
|
| |
Control the possibility of a bad disk index. Handle the checks in
a similar fashion to the get_efi_partition function.
|
|
|
|
|
| |
Log each partition that gets checked and make the exception messages
more informative.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add utility function inside disk.py to find, if any, the first ESP
partition of a given disk.
The disk is provided as an integer (starting at 1 following OpenGnsys
scripts usual values), meaning the (n-1)th disk from the disk array
returned from get_disks(). In the future a better mechanism should be
put in place to fetch probed disks from a running client.
This change is part of the upcoming drop of "IniciarSesion" script in
favor of a Python native approach. Specifically regarding UEFI systems.
|
|
|
|
|
|
|
|
|
| |
cover more error cases where exceptions need to be raised.
check return code in the invoked subprocess.
restoreImageCustom has been intentionally left behind, it
is unclear what this custom script returns on success and
error.
|
|
|
|
|
| |
Maps a disk and partition number to the corresponding device path
('/dev/sdXY', '/dev/nvmeXnYpZ', ...)
|
|
* disk.py
Disk discovery
* fs.py
Uses psutil to fetch fs usage information
* menu.py
ogBrowser menu generation
* net.py: gets nic status information
IP address, MAC address and ethernet speed.
* probe.py: probes mountpoints for operating systems
Uses hivexget command to try fetching Windows installation
information.
Looks for /etc/os-release for probing linux systems.
|