Commit graph

887 commits

Author SHA1 Message Date
Jörg Thalheim
0d11aa8d64 disko-install: add extra-files option 2024-03-05 09:52:34 +00:00
Jörg Thalheim
337abec03f make disko-install captialize 2024-03-05 09:45:10 +00:00
Jörg Thalheim
3704ee3926 add efi var install option 2024-03-05 09:45:10 +00:00
Jörg Thalheim
f61c7d28d5 add documentation for disko-install 2024-03-05 09:45:10 +00:00
lassulus
05f0e3fd56 lib/tests: use startCommand for create_machine 2024-03-05 08:56:58 +01:00
Jörg Thalheim
0c9b003a48 bcachefs: drop zfs hack 2024-03-05 08:56:58 +01:00
lassulus
c54e7e2b2b
Merge pull request #553 from nix-community/long_device_names
types gpt: hash long device names
2024-03-05 07:46:52 +07:00
lassulus
6a423861cd
Merge pull request #555 from nix-community/dependabot/github_actions/DeterminateSystems/update-flake-lock-21
build(deps): bump DeterminateSystems/update-flake-lock from 20 to 21
2024-03-05 07:45:55 +07:00
dependabot[bot]
5c57c06779
build(deps): bump DeterminateSystems/update-flake-lock from 20 to 21
Bumps [DeterminateSystems/update-flake-lock](https://github.com/determinatesystems/update-flake-lock) from 20 to 21.
- [Release notes](https://github.com/determinatesystems/update-flake-lock/releases)
- [Commits](https://github.com/determinatesystems/update-flake-lock/compare/v20...v21)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 19:50:30 +00:00
lassulus
561579a631 add long-device-name test & example 2024-03-04 14:55:56 +01:00
lassulus
56f6d3d4af types gpt: hash label if it's > 36 characters 2024-03-04 14:55:56 +01:00
lassulus
3cb3775f9b lib/tests: use startCommand for create_machine 2024-03-04 01:51:42 +01:00
lassulus
1f76b318aa
Merge pull request #552 from ivan770/lv-priority
lvm_vg: add priority option
2024-03-03 11:16:38 +07:00
ivan770
2ca4b06bdf lvm_vg: add priority option 2024-03-02 13:08:52 -05:00
Jörg Thalheim
bde7dd352c add disko-install command
disko-install combines disko and nixos-install into a single command.

Example usage:

  sudo ./disko-install --flake /someflake#eva --disk sda /dev/zvol/zroot/test
2024-03-01 09:48:08 +00:00
github-actions[bot]
a13f36255c flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b50a77c03d640716296021ad58950b1bb0345799' (2024-02-21)
  → 'github:NixOS/nixpkgs/9a9dae8f6319600fa9aebde37f340975cab4b8c0' (2024-02-24)
2024-02-26 01:19:10 +00:00
github-actions[bot]
23d308f005 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/045b51a3ae66f673ed44b5bbd1f4a341d96703bf' (2024-02-18)
  → 'github:NixOS/nixpkgs/b50a77c03d640716296021ad58950b1bb0345799' (2024-02-21)
2024-02-22 01:15:20 +00:00
Jörg Thalheim
590245271a add assertion if mirroredBoots is used in vm test 2024-02-22 00:01:18 +00:00
github-actions[bot]
1ae1f57dad flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/89653a03e0915e4a872788d10680e7eec92f8600' (2024-02-14)
  → 'github:NixOS/nixpkgs/045b51a3ae66f673ed44b5bbd1f4a341d96703bf' (2024-02-18)
2024-02-19 01:18:37 +00:00
lassulus
d8a4377cd8
Merge pull request #538 from nix-community/legacy_tables_warning
types table: add deprecation warning
2024-02-18 09:02:10 +07:00
lassulus
0661bb800c types table: add deprecation warning 2024-02-17 05:31:02 +01:00
github-actions[bot]
4d81082b2c flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f8e2ebd66d097614d51a56a755450d4ae1632df1' (2024-02-07)
  → 'github:NixOS/nixpkgs/89653a03e0915e4a872788d10680e7eec92f8600' (2024-02-14)
2024-02-17 04:23:55 +00:00
lassulus
c13d481b78 hybrid-mbr: cleanup test, wait for udev after paritioning 2024-02-17 04:06:51 +00:00
Jason Yundt
810eccbad2 Allow Disko to be run in a systemd service
Before this change, if you created a systemd service that ran
“disko --mode disko <path-to-config>”, then you would (probably) get
this error:

    disk-deactivate: line 6: /dev/stderr: No such device or address

Since disk-deactivate uses “set -e”, that error would prevent
disk-deactivate from actually deactivating any disks. The problem is
that disk-deactivate tries to print text to stderr by doing this:

    echo "Text" >/dev/stderr

systemd.exec(5) explains why that doesn’t work and goes on to say [1]:

> This means when executing shell scripts the construct
> **echo "hello" > /dev/stderr** for writing text to stderr will not
> work. To mitigate this use the construct **echo "hello" >&2** instead,
> which is mostly equivalent and avoids this pitfall.

[1]: <https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#StandardOutput=>

---

You can test this commit by doing the following:

1. Download a copy of this gist:
   <https://gist.github.com/Jayman2000/60b483659e89283716582ac38856dca6>

2.  Build a custom NixOS installation ISO that contains a systemd service
    that runs disko:

        nix-build --arg diskoDir <path-to-disko-repo> <path-to-gist>

    Once that command finishes, the ISO will be in ./result/iso/.

3. Create a VM. Make sure that it has a VirtIO disk that’s more than
   500M large. Also make sure that it has an optical disc drive.

4. Put the ISO file from step 2 into the VM’s optical disc drive.

5. Turn on the VM and boot into the installation ISO.

6. Start the systemd service:

    sudo systemctl start disko-test

7. Check journalctl to see if there are any errors related to
   disk-deactivate.
2024-02-15 20:31:41 +00:00
Jason Yundt
2cb47338ec List all copyright years 2024-02-15 20:31:41 +00:00
Lassulus
d07de570ba
Merge pull request #532 from gehaxelt/gehaxelt-update-readme
Update README.md
2024-02-10 07:13:44 +07:00
Sebastian Neef
54274cc65f
Update README.md
Rename `/dev/nvme0n1` to `/dev/sda` to match the provided configuration.
2024-02-09 17:38:29 +01:00
NAHO
15b52c3c8a example: fix typo 2024-02-08 10:44:38 +01:00
github-actions[bot]
c49bb95ac8 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/79a13f1437e149dc7be2d1290c74d378dad60814' (2024-02-03)
  → 'github:NixOS/nixpkgs/f8e2ebd66d097614d51a56a755450d4ae1632df1' (2024-02-07)
2024-02-08 01:15:35 +00:00
github-actions[bot]
2e9b88f02e flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/160b762eda6d139ac10ae081f8f78d640dd523eb' (2024-01-27)
  → 'github:NixOS/nixpkgs/79a13f1437e149dc7be2d1290c74d378dad60814' (2024-02-03)
2024-02-05 01:19:32 +00:00
github-actions[bot]
f67ba65528 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4fddc9be4eaf195d631333908f2a454b03628ee5' (2024-01-25)
  → 'github:NixOS/nixpkgs/160b762eda6d139ac10ae081f8f78d640dd523eb' (2024-01-27)
2024-01-29 01:18:04 +00:00
danjujan
f7424625dc
Rework Hybrid MBR https://github.com/nix-community/disko/pull/168 (#508)
Add hybrid MBR functionality to the gpt type
2024-01-26 21:59:23 +01:00
Jörg Thalheim
c12719812d bcachefs: stick to nixos's default bcachefs kernel 2024-01-26 09:38:59 +00:00
github-actions[bot]
5a2dc95464 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/e5d1c87f5813afde2dda384ac807c57a105721cc' (2024-01-19)
  → 'github:NixOS/nixpkgs/b43bb235efeab5324c5e486882ef46749188eee2' (2024-01-23)
2024-01-25 01:24:19 +00:00
github-actions[bot]
9fcdf3375e flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/757637581797f148c50977b6127147c5d298f9e9' (2024-01-17)
  → 'github:NixOS/nixpkgs/e5d1c87f5813afde2dda384ac807c57a105721cc' (2024-01-19)
2024-01-22 02:26:05 +00:00
github-actions[bot]
0033adc6e3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ea780f3de2d169f982564128804841500e85e373' (2024-01-14)
  → 'github:NixOS/nixpkgs/757637581797f148c50977b6127147c5d298f9e9' (2024-01-17)
2024-01-18 01:22:53 +00:00
dependabot[bot]
d0b4408eaf build(deps): bump cachix/install-nix-action from 24 to 25
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 24 to 25.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v24...v25)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 20:50:29 +01:00
Jörg Thalheim
38af7137e0 tests/bcachefs: switch to linux_latest 2024-01-15 14:29:04 +00:00
github-actions[bot]
2a561be6b5 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/eabe8d3eface69f5bb16c18f8662a702f50c20d5' (2024-01-09)
  → 'github:NixOS/nixpkgs/ea780f3de2d169f982564128804841500e85e373' (2024-01-14)
2024-01-15 01:25:59 +00:00
Ivan Shapovalov
036d480ae8 lib/types/gpt: do not hard-code alignment to 2048 sectors
On 4Kn disks, 2048-sector alignment is equivalent to 8 MiB which is
excessive. Moreover, there is no point in specifying _any_ alignment
at all because sgdisk defaults to 1 MiB already.

Fixes #497.
2024-01-14 11:28:10 +00:00
Wim de With
f78b6498f6 make-disk-image: optionally include ZFS module in kernel 2024-01-12 15:58:58 +00:00
Wim de With
b4afc8bab8 make-disk-image: set image format explicitly
QEMU warns if format=raw is implied, and protects block 0 from getting
overwritten.
2024-01-12 15:54:48 +00:00
Wim de With
c38f369ee4 make-disk-image: umount filesystems after install
The vmTools in nixpkgs shuts the VM down with poweroff -f, which does
not cleanly umount the filesystems. This may lead to filesystem
corruption on the newly created image.
2024-01-12 15:54:48 +00:00
misumisumi
fa5db12d76 zfs: Tolerate no mountable dataset 2024-01-11 23:54:13 +00:00
phaer
be305848c6 umount md device before stopping the raid 2024-01-11 10:37:12 +00:00
Paul Haerle
12d0c39ed3 Don't print an error if there's no raid
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-01-11 10:37:12 +00:00
phaer
acd2cbdb31 deactivate: stop raid if disk is a member of it
this is useful in cases where the target machine has
a pre-configured RAID setup, as otherwise disko would
wipe the partition tables and create new ones but would
not be able to inform the kernel about it, as the old
raid was still in use.
2024-01-11 10:37:12 +00:00
github-actions[bot]
11f4ed1041 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/63143ac2c9186be6d9da6035fa22620018c85932' (2024-01-02)
  → 'github:NixOS/nixpkgs/eabe8d3eface69f5bb16c18f8662a702f50c20d5' (2024-01-09)
2024-01-11 01:22:26 +00:00
Raphael Robatsch
f0a3425a7b docs: mention EF00 partition type in README.md
Otherwise systemd-boot will refuse to install the bootloader.
2024-01-08 19:13:21 +00:00
github-actions[bot]
8a9e89d466 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7' (2023-12-31)
  → 'github:NixOS/nixpkgs/63143ac2c9186be6d9da6035fa22620018c85932' (2024-01-02)
2024-01-08 01:23:02 +00:00