!oNSIfazDqEcwhcOjSL:matrix.org

disko

171 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko55 Servers

Load older messages


SenderMessageTime
28 Jun 2024
@lassulus:lassul.uslassulusyes, the reformatting works happens with the mounted fs, since we don't have a non destructive unmount script13:25:21
@magic_rb:matrix.redalder.orgmagic_rb
In reply to @annaaurora:artemislena.eu
you're running nixos on you ereader?
Yeah im trying
13:52:12
30 Jun 2024
@dustee:matrix.orgdustee joined the room.09:03:26
@dustee:matrix.orgdustee hi im having trouble creating diskoImages for aarch64-linux, the process always hangs at EFI stub: Exiting boot services... 09:04:19
@dustee:matrix.orgdusteei tried a bunch of different configurations and for aarch64 it always stops at that step09:05:41
@dustee:matrix.orgdusteebut for x86_64-linux, it goes through and creates the image successfully09:06:17
@dustee:matrix.orgdusteeRedacted or Malformed Event09:08:47
@dustee:matrix.orgdustee *

then since i couldnt create the diskoImage, i built and booted sd-image-aarch64-installer then tried nixos-anywhere to build the proper system but even that has problems and cant create the partitions

#......
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
+ sgdisk --align-end --new=1:0:+30M --change-name=1:disk-disk1-firmware --typecode=1:0700 /dev/mmcblk0
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
+ partprobe /dev/mmcblk0
Error: Partition(s) 2 on /dev/mmcblk0 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
# it repeats partprobe three times then stops at
mkfs.vfat: unable to open /dev/disk/by-partlabel/disk-disk1-boot: No such file or directory
09:10:15
@magic_rb:matrix.redalder.orgmagic_rb
In reply to @joerg:thalheim.io
I would say it's a bit about expectation management, we won't implement new features for these old stuff and we added the warning to get most people to migrate. But realistically there are enough systems with it still out there that we won't remove it any time soon.
Aah, okay that works for me. Realistically i could just partition it manually, ive partitioned it once and probably never will again :) i appreciate the clarification
09:17:13
@dustee:matrix.orgdustee *

then since i couldnt create the diskoImage, i built and booted sd-image-aarch64-installer then tried nixos-anywhere to build the proper system but even that has problems and cant create the partitions (im guessing i cant install to the same sdcard that im booting from, so i gotta make diskoImages work)

#......
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
+ sgdisk --align-end --new=1:0:+30M --change-name=1:disk-disk1-firmware --typecode=1:0700 /dev/mmcblk0
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
+ partprobe /dev/mmcblk0
Error: Partition(s) 2 on /dev/mmcblk0 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
# it repeats partprobe three times then stops at
mkfs.vfat: unable to open /dev/disk/by-partlabel/disk-disk1-boot: No such file or directory
09:51:42
@dustee:matrix.orgdustee *

hi im having trouble creating diskoImages for aarch64-linux. the configuration builds successfully then hangs when creating the diskoImage

EFI stub: Decompressing Linux Kernel...
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Generating empty DTB
EFI stub: Exiting boot services...
# ... was stuck here overnight
11:14:09
@dustee:matrix.orgdustee

ok so i:

  • enabled nix-serve binary cache on host1 (x86_64-linux) which has already built the large configuration but got stuck at Exiting boot services...
  • tried building on host2 (aarch64-linux) that pulled from cache of host1, and it got stuck at exactly the same step. The assumption was that i was getting stuck on the exiting boot services because i was not aarch64, but now i dont know
21:32:01
@dustee:matrix.orgdustee *

ok so i:

  • enabled nix-serve binary cache on host1 (x86_64-linux) which has already built the large configuration in qemu but got stuck at Exiting boot services...
  • tried building on host2 (aarch64-linux) that pulled from cache of host1, and it got stuck at exactly the same step. The assumption was that i was getting stuck on the exiting boot services because i was not aarch64, but now i dont know
21:32:31
1 Jul 2024
@joerg:thalheim.ioMic92I haven't tested this on arm64 so far, but I have the feeling this more of a general nixos problem, because all we do is nixos-install: https://github.com/nix-community/disko/blob/d185770ea261fb5cf81aa5ad1791b93a7834d12c/lib/make-disk-image.nix#L7805:53:52
@joerg:thalheim.ioMic92Ah wait. you actually cannot build the image itself.05:54:50
@joerg:thalheim.ioMic92 dustee: maybe we do something wrong with how we set up efi on arm64? https://github.com/nix-community/disko/blob/d185770ea261fb5cf81aa5ad1791b93a7834d12c/lib/make-disk-image.nix#L83 05:56:26
@joerg:thalheim.ioMic92also this looks very similar: https://github.com/NixOS/nixpkgs/blob/2b753fb3c635639dffd9915d10e2e32ba3525fc6/nixos/lib/make-disk-image.nix#L55005:57:22
2 Jul 2024
@colemickens:matrix.orgcolemickens
In reply to @lassulus:lassul.us

should be already possible, you are using flakes I guess? you could say something like:

system.build.diskoScript = lib.mkForce (pkgs.writeScriptBin "disko-without-wipe" ''
  ${config.system.build.formatScript}
  ${config.system.build.mountScript}
'');
I think I need something more sophisticated, since I do need the root to be destroyed before format on each reprovision.
06:41:42
@colemickens:matrix.orgcolemickensI'm wondering if it makes sense to introduce a "skipDestroy" option to the module06:41:58
@colemickens:matrix.orgcolemickens(per-disk or vol or something maybe)06:42:09
@lassulus:lassul.uslassulushmm, this works only in the case where you would have the current existing structure defined in nix which lives on your disk? 06:42:49
@lassulus:lassul.uslassulusnot a very common usecase I would say06:42:55
@lassulus:lassul.uslassulusor you think just for the disk?06:43:08
@colemickens:matrix.orgcolemickensI'm not sure I followed - to recap, for first provision, I want to destroy/format, and then presumably update my disk-config.nix to say "okay, no longer run destroy on disk2". Since disk2 is going to persist as it's a hetzner volume.06:44:14
@colemickens:matrix.orgcolemickensdisk1 is just the ephemeral vm disk, so I always need it destroyed06:44:30
@colemickens:matrix.orgcolemickensIt might not be super duper common, but I feel like it's an interesting use-case. maybe :).06:44:56
@colemickens:matrix.orgcolemickensI guess.. I mean, I could just write my own destroy command and prepend it to my overriden diskoScript..06:45:50
@colemickens:matrix.orgcolemickensnice, that worked. wipefs'd + dd'd off the first 512M. seems to have left my /home contents.06:53:26
@lassulus:lassul.uslassulusyou can run the disko internal destroy command and just run it on the disks you want06:53:36
@colemickens:matrix.orgcolemickensI saw jq and bailed :) but yeah, I probably should just have done that06:54:04

Show newer messages


Back to Room ListRoom Version: 10