nixpkgs/nixos/modules
Adam Joseph f99e8bafe6 nixos/installer: add sd-image-powerpc64le.nix
This builds on top of nixpkgs mainline 00d8347180
with the following two PRs cherry-picked:

- https://github.com/NixOS/nixpkgs/pull/192670
- https://github.com/NixOS/nixpkgs/pull/192668

using the following command:

```
nix build -f nixos -L \
  -I nixos-config=nixos/modules/installer/sd-card/sd-image-powerpc64le.nix \
  config.system.build.sdImage
```

I was able to successfully boot the image, although it boots to a login prompt
rather than a shell, and won't accept the empty password for `root`.  I guess
I'll have to figure out why that is.

To boot the image: `zstd`-decompress the it, mount it, and use `kexec`:

```
cd boot/nixos
kexec -l \
  *-vmlinux \
  --initrd *-initrd \
  --dt-no-old-root \
  --command-line="$(grep APPEND ../extlinux/extlinux.conf | sed 's_^ *APPEND *__')"
```

The machine I used for testing has only one storage device which is completely
allocated to LVM.  It appears that the NixOS ISO loader doesn't look for
partition tables within LVM volumes.  To work aroundn this, I had to extract the
`ext4` image within the partition table within the `sd-card` image and put that
in its own LVM volume.  This likely won't be an obstacle for users who write the
image to a USB stick or similar.
2023-02-23 06:18:52 +02:00
..
config modules: add mkAliasOptionModuleMD 2023-01-05 02:33:13 +01:00
hardware opentabletdriver: remove hardcoded config path 2023-01-05 15:15:08 +00:00
i18n/input-method nixos/*: convert internal option descriptions to MD 2022-08-31 16:32:54 +02:00
installer nixos/installer: add sd-image-powerpc64le.nix 2023-02-23 06:18:52 +02:00
misc Merge pull request #209064 from Lassulus/os-release-extra 2023-01-05 14:14:09 +01:00
profiles nixos/misc: add VARIANT_ID in /etc/os-release for identifying nixos installer 2023-01-04 19:11:41 +01:00
programs nixos/iay: use mkPackageOptionMD 2023-01-05 20:01:57 +01:00
security nixos: fix typos 2022-12-17 19:31:14 -05:00
services nixos/dokuwiki: Overhaul for structured settings 2023-01-06 22:02:37 +01:00
system modules: add mkPackageOptionMD 2023-01-05 02:33:13 +01:00
tasks nixos/bcachefs: fix boot with systemd enabled initrd 2023-01-01 19:58:16 +01:00
testing Merge pull request #207801 from ElvishJerricco/systemd-stage-1-test-instrumentation 2022-12-28 01:43:03 +01:00
virtualisation nixos/podman, podman: switch to netavark network stack 2023-01-04 14:25:14 +10:00
module-list.nix Merge pull request #207797 from omasanori/iay-module 2023-01-05 08:22:16 -03:00
rename.nix modules: add mkAliasOptionModuleMD 2023-01-05 02:33:13 +01:00