summaryrefslogtreecommitdiff
path: root/gnu/installer/parted.scm
Commit message (Collapse)AuthorAge
* installer: Add comments and vertical space to the generated config.Ludovic Courtès2022-08-08
| | | | | | | | | | | | * gnu/installer/parted.scm (user-partitions->configuration): Introduce vertical space and a comment. * gnu/installer/services.scm (G_): New macro. (%system-services): Add comment for OpenSSH. (system-services->configuration): Add vertical space and comments. * gnu/installer/user.scm (users->configuration): Add comment. * gnu/installer/steps.scm (format-configuration): Add comment. (configuration->file): Expound leading comment. Pass #:format-comment to 'pretty-print-with-comments/splice'.
* installer: parted: Call set-system before set-flags.Mathieu Othacehe2022-08-05
| | | | | | | | | | | | | | | | | Parted 3.5 introduces the following regression: - partition-set-flag sets the BIOS_GRUB flag. The partition type is set to PARTITION_BIOS_GRUB_GUID. - partition-set-system resets the partition type to PARTITION_LINUX_DATA_GUID undoing what's done by partition-set-flag. To prevent it, reverse the call order. Fixes: <https://issues.guix.gnu.org/55549>. * gnu/installer/parted.scm (mkpart): Call partition-set-system before partition-set-flag.
* installer: parted: Log partition flags.Mathieu Othacehe2022-08-05
| | | | * gnu/installer/parted.scm (mkpart): Log them.
* initrd: Use non-hyphenated kernel command-line parameter names.Maxim Cournoyer2022-03-01
| | | | | | | | | | | | | | | | | | | | | | This is to make it less surprising, given the common convention sets forth by the kernel Linux command-line parameters. * gnu/build/linux-boot.scm (boot-system): Rename '--load', '--repl', '--root' and '--system' to 'gnu.load', 'gnu.repl', 'root' and 'gnu.system', respectively. Adjust doc. (find-long-option): Adjust doc. * gnu/installer/parted.scm (installer-root-partition-path): Adjust accordingly. * gnu/system.scm (bootable-kernel-arguments): Add a VERSION argument and update doc. Use VERSION to conditionally return old style vs new style initrd arguments. (%boot-parameters-version): Increment to 1. (operating-system-boot-parameters): Adjust doc. (operating-system-boot-parameters-file): Likewise. * gnu/system/linux-initrd.scm (raw-initrd, base-initrd): Likewise. * doc/guix.texi: Adjust doc. * gnu/build/activation.scm (boot-time-system): Adjust accordingly. * gnu/build/hurd-boot.scm (boot-hurd-system): Likewise. * gnu/packages/commencement.scm (%final-inputs-riscv64): Adjust comment.
* installer: Raise condition when mklabel fails.Josselin Poiret2022-02-02
| | | | | | * gnu/installer/parted.scm (mklabel): Do it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* installer: Use run-command-in-installer in (gnu installer parted).Josselin Poiret2022-02-02
| | | | | | | | | | | | * gnu/installer/parted.scm (remove-logical-devices, create-btrfs-file-system, create-ext4-file-system, create-fat16-file-system, create-fat32-file-system, create-jfs-file-system, create-ntfs-file-system, create-xfs-file-system, create-swap-partition, luks-format-and-open, luks-close): Use run-command-in-installer. (with-null-output-ports): Remove. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* installer: Use new installer-log-line everywhere.Josselin Poiret2022-02-02
| | | | | | | | | | | | | | | | * gnu/installer.scm (installer-program) * gnu/installer/final.scm (install-locale) * gnu/installer/newt.scm (init) * gnu/installer/newt/final.scm (run-final-page) * gnu/installer/newt/page.scm (run-form-with-clients) * gnu/installer/newt/partition.scm (run-partitioning-page) * gnu/installer/parted.scm (eligible-devices, mkpart, luks-format-and-open, luks-close, mount-user-partitions, umount-user-partitions, free-parted): * gnu/installer/steps.scm (run-installer-steps): * gnu/installer/utils.scm (run-command, send-to-clients): Use it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* installer: Ignore small devices.Mathieu Othacehe2022-01-14
| | | | | | | | | | Filter the devices that are smaller than 2GiB in the device selection list. * gnu/installer/parted.scm (%min-device-size): New variable. (non-install-devices): Rename it ... (eligible-devices): ... this way. Filter the install device as well as the small devices. * gnu/installer/newt/partition.scm (run-partitioning-page): Adapt it.
* Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe2021-12-10
|\
| * Revert "installer: Make LUKS2 the default format for encrypted devices"Tobias Geerinckx-Rice2021-12-08
| | | | | | | | | | | | | | | | This reverts commit a82e9f45fd9f7c67123b7064c60065281035c744 at the author's request. We are not quite ready to boot all resulting systems. See <https://logs.guix.gnu.org/guix/2021-12-08.log#231815>.
* | Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus2021-12-05
|\|
| * installer: Make LUKS2 the default format for encrypted devicesJosselin Poiret2021-12-01
| | | | | | | | | | | | * gnu/installer/parted.scm (luks-format-and-open): Change it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * installer: Rework installation device detection.Josselin Poiret2021-11-26
| | | | | | | | | | | | | | | | | | * gnu/installer/parted.scm (installation-device): Remove it. * gnu/installer/parted.scm (installer-root-partition-path): Add it. * gnu/installer/parted.scm (non-install-devices): Add installation-device? predicate. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* | installer: parted: Use the swap-space record.Mathieu Othacehe2021-12-01
|/ | | | | * gnu/installer/parted.scm (user-partitions->configuration): Use the swap-space record.
* installer: Fix typo in docstrings.Tobias Geerinckx-Rice2021-10-01
| | | | | | * gnu/packages/gnu/installer/parted.scm (force-user-partitions-formatting, format-user-partitions): Fix ‘formating’ docstring typo.
* installer: Support XFS.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | * gnu/installer/newt/partition.scm (run-fs-type-page): Add ‘xfs’ to the list box. * gnu/installer/parted.scm (user-fs-type-name, user-fs-type->mount-type) (partition-filesystem-user-type): Add ‘xfs’ mapping. (create-xfs-file-system): New procedure. (format-user-partitions): Use it. * gnu/installer.scm (set-installer-path): Add xfsprogs.
* Migrate to the new 'targets' field of bootloader-configuration.Maxim Cournoyer2021-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old 'target' field is deprecated; adjust the sources to use the new 'targets' one instead. * doc/guix-cookbook.texi<target>: Replace by 'targets'. * gnu/bootloader/grub.scm: Likewise. * gnu/installer/parted.scm: Likewise. * gnu/machine/digital-ocean.scm: Likewise. * gnu/system/examples/asus-c201.tmpl: Likewise * gnu/system/examples/bare-bones.tmpl: Likewise * gnu/system/examples/bare-hurd.tmpl: Likewise * gnu/system/examples/beaglebone-black.tmpl: Likewise * gnu/system/examples/desktop.tmpl: Likewise * gnu/system/examples/docker-image.tmpl: Likewise * gnu/system/examples/lightweight-desktop.tmpl: Likewise * gnu/system/examples/vm-image.tmpl: Likewise * gnu/system/examples/yggdrasil.tmpl: Likewise * gnu/system/hurd.scm: Likewise * gnu/system/images/hurd.scm: Likewise * gnu/system/images/novena.scm: Likewise * gnu/system/images/pine64.scm: Likewise * gnu/system/images/pinebook-pro.scm: Likewise * gnu/system/images/rock64.scm: Likewise * gnu/system/install.scm: Likewise * gnu/system/vm.scm: Likewise * gnu/tests.scm: Likewise * gnu/tests/ganeti.scm: Likewise * gnu/tests/install.scm: Likewise * gnu/tests/nfs.scm: Likewise * gnu/tests/telephony.scm: Likewise * tests/boot-parameters.scm: Likewise * tests/system.scm: Likewise
* installer: Improve the installation device detection method.Mathieu Othacehe2021-06-17
| | | | | | | | | Fixes: <https://issues.guix.gnu.org/47780>. * gnu/installer/parted.scm (installation-device): New method. (non-install-devices): Remove devices which are reported as read-only by parted or which path is identical to the installation device path returned by the above method.
* installer: Fix FAT16 partition mounting.Mathieu Othacehe2021-06-13
| | | | | | | | | | The "fat" file-system mount type doesn't exist in Linux. Trying to mount a FAT16 partition with "fat" file-system type returns -ENODEV. Fixes: <https://issues.guix.gnu.org/48419>. * gnu/installer/parted.scm (user-fs-type->mount-type): Use the "vfat" file-system for FAT16 partitions.
* installer: Improve install device detection.Mathieu Othacehe2021-06-12
| | | | | * gnu/installer/parted.scm (non-install-devices): Improve the detection by assuming that any device with the ISO9660 label is the installation device.
* installer: Check partitions UUIDs.Mathieu Othacehe2021-06-12
| | | | | | | | | * gnu/installer/parted.scm (&cannot-read-uuid): New condition. (cannot-read-uuid?, cannot-read-uuid-partition): New procedures. (check-user-partitions): Check that all user-partitions have a valid UUID, raide the above condition otherwise. * gnu/installer/newt/partition.scm (run-disk-page): Run an error page if the &cannot-read-uuid condition is raised.
* installer: Add MSDOS disk label support on UEFI systems.Mathieu Othacehe2021-04-28
| | | | | | | | | Fixes: <https://issues.guix.gnu.org/47889>. * gnu/installer/parted.scm (esp-partition?): Remove the MSDOS check. (auto-partition!): On MSDOS disks, check if an ESP partition is present. If that's the case, do not remove it. Otherwise, if UEFI is supported, create one.
* installer: Fix device synchronization.Mathieu Othacehe2020-11-17
| | | | | | | | | | | | | Reported by Florian Pelz: https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00326.html. * gnu/installer/utils.scm (call-with-time): New procedure, (let/time): new macro. * gnu/installer/parted.scm (with-delay-device-in-use?): Increase the retry count to 16. (non-install-devices): Remove the call to with-delay-device-in-use? as it doesn't return the expected result, and would block much longer now. (free-parted): Log the time required to sync each device.
* installer: parted: Add debug output.Mathieu Othacehe2020-11-08
| | | | * gnu/installer/parted.scm (mkpart): Log partition creation.
* installer: parted: Internationalize the partition handling code.Ludovic Courtès2020-11-01
| | | | | * gnu/installer/parted.scm (user-partition-description): Use 'format' and 'G_' for i18n.
* installer: Use UUIDs in the 'swap-devices' field.Ludovic Courtès2020-10-30
| | | | | | | | | | | | | | | | | | | Note: This change requires an updated 'guix' package that contains Linux-swap support in (gnu build file-systems). * gnu/installer/parted.scm (user-partitions->configuration): Use UUIDs in the 'swap-devices' field. * gnu/installer/newt/final.scm (run-final-page)[wait-for-clients]: New procedure. Use it. * gnu/installer/tests.scm (choose-partitioning): Wait for 'starting-final-step' message and move configuration file dialog handling to... (conclude-installation): ... here. Send over PORT the reply corresponding to 'starting-final-step'. * gnu/tests/install.scm (gui-test-program): When ENCRYPTED? is false, invoke 'swaplabel' in the marionette. (installation-target-os-for-gui-tests): When ENCRYPTED? is false, except a fixed UUID.
* installer: Create bios_grub partition when it is needed.Miguel Ángel Arruga Vivas2020-10-19
| | | | | * gnu/installer/parted.scm (auto-partition!): Only check for ESP on EFI installations.
* installer: Fix docstring typoes.Tobias Geerinckx-Rice2020-09-21
| | | | | | * gnu/installer/connman.scm (connman-state, run-locale-page) (start-swapping, stop-swapping, run-installer-steps): Fix typo in docstring.
* installer: Remove logical devices.Mathieu Othacehe2020-08-06
| | | | | | | | | | | | | | If a device contains an active logical volume, BLKRRPART will report that the device is busy. This will cause this device to be filtered by "non-install-devices" procedure, which is not desired. Make sure to deactivate all logical volumes before device probing. Fixes <https://issues.guix.gnu.org/42683>. * gnu/installer.scm (installer-program): Add lvm2-static to the inputs. * gnu/installer/parted.scm (remove-logical-devices): New procedure, (init-parted): call it.
* installer: Add NTFS support.Mathieu Othacehe2020-07-26
| | | | | | | | | | | | This adds support for creating and editing NTFS partitions. It is however not possible yet to create root NTFS partitions, as overlaying on top of a fuse partition does not seem supported. * gnu/installer.scm (installer-program): Add "ntfs-3g" to the inputs. * gnu/installer/parted.scm (user-fs-type-name, user-fs-type->mount-type, partition-filesystem-user-type, create-ntfs-file-system, format-user-partitions): Add NTFS support. * gnu/installer/newt/partition.scm (run-fs-type-page): Add NTFS support.
* installer: Log important bits to syslog.Ludovic Courtès2020-02-22
| | | | | | | | | * gnu/installer.scm (installer-program): Log crashes with 'syslog'. * gnu/installer/parted.scm (luks-format-and-open, luks-close) (mount-user-partitions, umount-user-partitions): Add 'syslog' calls. * gnu/installer/steps.scm (run-installer-steps): Log the running step with 'syslog'. * gnu/installer/utils.scm (run-shell-command): Add calls to 'syslog'.
* installer: Add JFS support.Tobias Geerinckx-Rice2020-01-05
| | | | | | | | | | * gnu/installer/newt/partition.scm (run-fs-type-page): Add ‘jfs’ to the list box. * gnu/installer/parted.scm (user-fs-type-name, user-fs-type->mount-type) (partition-filesystem-user-type): Add ‘jfs’ mapping (create-jfs-file-system): New procedure. (format-user-partitions): Use it. * gnu/installer.scm (set-installer-path): Add jfsutils.
* installer: Fix typo.Tobias Geerinckx-Rice2020-01-05
| | | | * gnu/installer/parted.scm (create-btrfs-file-system): Fix typo in docstring.
* installer: Update to Guile-Parted 0.0.2 release.Mathieu Othacehe2019-09-25
| | | | | | | | | * gnu/installer/parted.scm (data-partition?, metadata-partition?, freespace-partition?, normal-partition?, extended-partition?, logical-partition?): Remove, as now provided by Guile-Parted. * gnu/installer/newt/partition.scm (run-disk-page): Remove disk-destroy calls, replace disk-delete-all by disk-remove-all-partitions and disk-delete-partition by disk-remove-partition*.
* installer: Always add '%base-initrd-modules' to 'initrd-modules'.Ludovic Courtès2019-06-05
| | | | | | | | Fixes <https://bugs.gnu.org/36099>. Reported by Jonathan Brielmaier <jonathan.brielmaier@web.de>. * gnu/installer/parted.scm (initrd-configuration): Add %BASE-INITRD-MODULES to the 'initrd-modules' field.
* installer: Fix Guile-Parted crash on i686.v1.0.1Ludovic Courtès2019-05-19
| | | | | | | | | | | | | Fixes <https://bugs.gnu.org/35783>. This is a followup to 7d567af46b4e10ffafb1d0f76b524f5781460598. * gnu/installer/parted.scm (auto-partition!): Append ESP-PARTITION, when it is true, to the result of 'create-adjacent-partitions!'. * gnu/installer/newt/partition.scm (run-partioning-page): Remove 'initial-partitions' variable, and remove call to 'create-special-user-partitions'. Co-authored-by: Mathieu Othacehe <m.othacehe@gmail.com>
* installer: Rename 'auto-partition' to 'auto-partition!'.Ludovic Courtès2019-05-15
| | | | | | | | | | | This is a followup to 7d567af46b4e10ffafb1d0f76b524f5781460598. * gnu/installer/parted.scm (create-adjacent-partitions): Rename to... (create-adjacent-partitions!): ... this. Make private. (auto-partition): Rename to... (auto-partition!): ... this. * gnu/installer/newt/partition.scm (run-partioning-page): Adjust accordingly.
* installer: Fix docstring.Danny Milosavljevic2019-05-14
| | | | * gnu/installer/parted.scm (create-fat32-file-system): Fix docstring.
* installer: Add fat16.Danny Milosavljevic2019-05-14
| | | | | | | * gnu/installer/parted.scm (user-fs-type-name): Add fat16. (user-fs-type->mount-type): Add fat16. (create-fat16-file-system): New procedure. (format-user-partitions): Use it.
* installer: Create btrfs file system.Danny Milosavljevic2019-05-14
| | | | | | | Fixes <https://bugs.gnu.org/35655>. * gnu/installer/parted.scm (create-btrfs-file-system): New procedure. (format-user-partitions): Use it.
* installer: Produce an 'initrd-modules' field if needed.Ludovic Courtès2019-03-27
| | | | | | | | | | | * gnu/installer/parted.scm (root-user-partition?): New procedure. (bootloader-configuration): Use it. (user-partition-missing-modules, initrd-configuration): New procedures. (user-partitions->configuration): Call 'initrd-configuration'.o * gnu/installer.scm (not-config?): Rename to... (module-to-import?): ... this. Add cases to exclude non-installer and non-build (gnu …) modules. (installer-program)[installer-builder]: Add GUIX to the extension list.
* installer: Emit 'bootloader' field before 'swap-devices'.Ludovic Courtès2019-03-27
| | | | | * gnu/installer/parted.scm (user-partitions->configuration): Move 'bootloader' section above 'swap-devices'.
* installer: Set the system's 'keyboard-layout' field.Ludovic Courtès2019-03-25
| | | | | | | | | | * gnu/installer/newt/keymap.scm (keyboard-layout->configuration): New procedure. * gnu/installer.scm (compute-keymap-step): Return RESULT. (installer-steps) <'keymap>: Add 'configuration-formatter' field. (installer-program): Use (gnu installer newt keymap). * gnu/installer/parted.scm (bootloader-configuration): Set 'keyboard-layout'.
* gnu: Fix some typos in the installer.Tobias Geerinckx-Rice2019-02-18
| | | | | | | | | | | | | | * gnu/installer/connman.scm (connman-connect-with-auth): Fix typo in documentation. * gnu/installer/newt/keymap.scm (sort-variants): Likewise. * gnu/installer/newt/page.scm (run-listbox-selection-page): Likewise. * gnu/installer/parted.scm (mkpart): Likewise. * gnu/installer/newt/utils.scm (destroy-form-and-pop): Likewise. * gnu/installer/newt/wifi.scm (run-unknown-error-page): Fix typo. (wifi-listbox-heigth): Rename to… (wifi-listbox-height): …this, and adjust caller. * gnu/installer/timezone.scm (locate-childrens): Rename to… (locate-children): …this. Adjust all callers.
* installer: "formating" → "formatting".Ludovic Courtès2019-01-17
| | | | | * gnu/installer/newt/partition.scm, gnu/installer/parted.scm: Replace "formating" with "formatting".
* installer: parted: Do not call BLKRRPART on loop devices.Mathieu Othacehe2019-01-17
| | | | | * gnu/installer/parted.scm (with-delay-device-in-use?): Return immediately if the file-name passed as argument designates a loop device.
* installer: Various renamins follow-up.Mathieu Othacehe2019-01-17
| | | | | | | s/path/file and s/crypt/encrypt. * gnu/installer/newt/partition.scm: Apply renamings. * gnu/installer/parted.scm: Ditto.
* installer: Various renamings.Mathieu Othacehe2019-01-17
| | | | | | | | | | | | 1. s/partitionment/partitioning/ 2. s/crypted/encrypted/ * gnu/installer.scm (installer-steps): Apply renamings. * gnu/installer/newt/partition.scm (run-disk-page): ditto, * gnu/installer/parted.scm (auto-partition): ditto, (luks-format-and-open): ditto, (luks-close): ditto, (user-partitions->configuration): ditto.
* installer: parted: Use read-luks-partition-uuid instead ofMathieu Othacehe2019-01-17
| | | | | | | | | find-partition-by-luks-uuid. * gnu/installer/parted.scm (user-partition->mapped-device): Replace read-luks-partition-uuid by find-partition-by-luks-uuid, (user-partition->file-system): only compute uuid if the partition is not encrypted.
* installer: partionment: Add encryption support.Mathieu Othacehe2019-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/installer.scm (set-installer-path): Add cryptsetup. * gnu/installer/newt/partition.scm (prompt-luks-passwords): New procedure, (run-partioning-page): Add the possibility to set encryption to "On" on a partition and choose a label, add a new partition scheme: "Guided - using the entire disk with encryption", prompt for encryption passwords before proceeding to formating. * gnu/installer/parted.scm (<user-partition>)[crypt-label], [crypt-password]: New fields, (partition-description): add the encryption label, (user-partition-description): add an encryption field, (auto-partition): add two partitioning schemes: entire-crypted-root and entire-crypted-root-home, (call-with-luks-key-file): new procedure, (user-partition-upper-path): new procedure, (luks-format-and-open): new procedure, (luks-close): new procedure, (format-user-partitions): format and open luks partitions before creating file-system. (mount-user-partitions): use the path returned by user-partition-upper-path, (umount-user-partitions): close the luks partitions, (user-partition->file-system): set device field to label for luks partitions and to uuid for the rest, (user-partition->mapped-device): new procedure, (user-partitions->configuration): add mapped-devices field.