!oNSIfazDqEcwhcOjSL:matrix.org

disko

354 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko89 Servers

Load older messages


SenderMessageTime
21 Sep 2024
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) *
                  postMountHook = toString (pkgs.writeScript "postMountHook.sh" ''
                    touch /mnt/disko-first-boot
                  '');
15:51:12
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Lassulus said something about how this shouldn't be a disko feature at all, because of what you're saying about the filesystem specific code15:51:35
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)but if we're gonna have to do it for auto calculating the imageSize, this might as well get dealt with at the same time15:52:02
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)I like that disko doesn't inject any extra stuff, unless the user specifies it via postVM though, having to DIY it feels bad though15:52:21
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) * I like that disko doesn't inject any extra stuff, unless the user specifies it via postVM though, having to DIY it feels bad too though15:52:27
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) * I like that disko doesn't inject any extra stuff, unless the user specifies it via postVM/postMount though, having to DIY it feels bad too though15:52:38
@joerg:thalheim.ioMic92doesn't systemd has some auto disk increase thingy?15:53:07
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Yeah but that only works well with systemd-reparted15:53:15
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)and reparted sucks because it cannot build images for embedded devices due to demanding everything implement GPT15:53:27
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) * and reparted sucks because it cannot build images for embedded devices due to demanding everything implement GPT properly15:53:32
@joerg:thalheim.ioMic92I think on-first-boot resizing is also different from disk images15:53:37
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)you can't make an image with arbitrary start sector for example, where you would put uboot15:53:49
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)I've played a lot with both disko and reparted, and reparted is only nice for x86 uefi, everything else is out of the window15:54:32
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)disko can do everything15:54:41
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)I also tried to coerce systemd into resizing the things that disko creates, but that can't be done, at least I couldn't figure it out15:55:14
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)afaik you can only coerce systemd into doing that for you if you have made everything with reparted15:55:35
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)
In reply to @joerg:thalheim.io
I think on-first-boot resizing is also different from disk images
it is, but you can't do it without impacting the disk image
16:02:11
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)You have to put some state on the disk image, so it knows that it's the first boot, there's no other strategy I know of that could indicate a disk image is being booted for the first time16:03:13
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)zfs autoResize is cool though, only zfs could do that however16:03:45
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)the strategy of touching a file in the disk image so the system knows when first-boot is happening, is filesystem agnostic16:04:20
@joerg:thalheim.ioMic92can you not the sentinil file the other way around?16:05:26
@joerg:thalheim.ioMic92And create the file after the resize?16:05:35
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)That would mean that on any boot, it attempts to resize, unless told not to?16:06:03
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)as opposed to attempting the resize only when told to16:06:49
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)feels risky to me, unless we trust the filesystem utils very much16:07:09
@joerg:thalheim.ioMic92Well it only tries it once16:07:54
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)systemd-reparted has solved all of this in their own way, not 100% sure how it's all implemented but it works well16:07:57
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)they mark disks as managed by repart somehow16:08:07
@joerg:thalheim.ioMic92systemd-reparted probably checks if there is any space left that can be used.16:08:18
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)and manage all this state16:08:19

Show newer messages


Back to Room ListRoom Version: 10