!oNSIfazDqEcwhcOjSL:matrix.org

disko

366 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko94 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
7 Mar 2024
@sysedwinistrator:matrix.orgsysedwinistrator joined the room.11:03:24
@marijan:matrix.orgmarijan joined the room.14:14:37
8 Mar 2024
@gsaurel:laas.frnim65s joined the room.16:50:45
9 Mar 2024
@void68:matrix.orgvoid
 partitions = {                                                                                                                                                                                                                       
          boot = {                                                                                                                                                                                                                           
            start = "0";                                                                                                                                                                                                                     
            end = "1M";                                                                                                                                                                                                                      
            type = "EF02";                                                                                                                                                                                                                   
            #bootable = true;                                                                                                                                                                                                                
            #flags = [ "bios_grub" ];                                                                                                                                                                                                        
          };                                                                                                                                                                                                                                 
          ESP = {                                                                                                                                                                                                                            
            start = "1M";                                                                                                                                                                                                                    
            end = "1024M";                                                                                                                                                                                                                   
            type = "EF00";                                                                                                                                                                                                                   
            content = {                                                                                                                                                                                                                      
              type = "filesystem";                                                                                                                                                                                                           
              format = "vfat";                                                                                                                                                                                                               
              mountpoint = "/boot";                                                                                                                                                                                                          
            };                                                                                                                                                                                                                               
          };                                               
10:08:44
@void68:matrix.orgvoid
+ sgdisk --align-end --new=1:1M:1024M --change-name=1:disk-main-ESP --typecode=1:EF00 /dev/disk/by-id/ata-LITEON_CV8-8E128-11_SATA_128GB_TW059X3VLOH0091E07L2                                                                                
Creating new GPT entries in memory.                                                                                                                                                                                                          
The operation has completed successfully.                                                                                                                                                                                                    
+ partprobe /dev/disk/by-id/ata-LITEON_CV8-8E128-11_SATA_128GB_TW059X3VLOH0091E07L2                                                                                                                                                          
+ udevadm trigger --subsystem-match=block                                                                                                                                                                                                    
+ udevadm settle                                                                                                                                                                                                                             
+ device=/dev/disk/by-partlabel/disk-main-ESP                                                                                                                                                                                                
+ extraArgs=()                                                                                                                                                                                                                               
+ declare -a extraArgs                                                                                                                                                                                                                       
+ format=vfat                                                                                                                                                                                                                                
+ mountOptions=('defaults')                                                                                                                                                                                                                  
+ declare -a mountOptions                                                                                                                                                                                                                    
+ mountpoint=/boot                                                                                                                                                                                                                           
+ type=filesystem                                                                                                                                                                                                                            
+ mkfs.vfat /dev/disk/by-partlabel/disk-main-ESP                                                                                                                                                                                             
mkfs.fat 4.2 (2021-01-31)                                                                                                                                                                                                                    
+ sgdisk --align-end --new=2:0:1M --change-name=2:disk-main-boot --typecode=2:EF02 /dev/disk/by-id/ata-LITEON_CV8-8E128-11_SATA_128GB_TW059X3VLOH0091E07L2                                                                                   
Could not create partition 2 from 2099200 to 2048                                                                                                                                                                                            
Unable to set partition 2's name to 'disk-main-boot'!                                                                                                                                                                                        
Could not change partition 2's type code to EF02!                               
10:09:01
@void68:matrix.orgvoidlol10:09:03
@void68:matrix.orgvoidwhy does it tries to create boot after ESP even though the start & end is given?10:09:31
@void68:matrix.orgvoidsomething must have happnd to start/end parameters I guess.10:10:28
@void68:matrix.orgvoidor the order is altered somehow. The partitions table was a list before now its an assoc so the order is gone obviously.10:11:45
@void68:matrix.orgvoidhm now I have to input priority=N; to all my partitions to get the correct order.10:33:34
@void68:matrix.orgvoidhow did disko handled start/end before? it seems I need to enter exact start/ends to get continuity.10:35:50
@void68:matrix.orgvoidfor instance, does end="16G-1" work with sgdisk?10:36:08
@void68:matrix.orgvoiddont want to find out what 2^4*2^20-1 is.10:36:44
@void68:matrix.orgvoidpreviously I can have my way by just end="16G" and it would work, hm.10:37:27
@palo:xaos.space@palo:xaos.spaceIs use priority and size now. works fine for me.10:38:26
@palo:xaos.space@palo:xaos.space I also liked the partition array better, but the partition labels havn't been uniq back than, now they are. But I don't know what the intention was. What I'm missing is a Options overview, like man configuration.nix. At the moment I look in the source code. 10:41:15
@void68:matrix.orgvoidyeah but the exact start/end values are always important for recovery in case something goes bad.10:45:29
@void68:matrix.orgvoidno disko dev recovers data from bad disks I guess these days.10:45:53
@void68:matrix.orgvoidI think this is sgdisk's --new param ambiguity including the end sector.11:02:31
@void68:matrix.orgvoidwhat a bummer.11:02:35
@void68:matrix.orgvoid
 --align-end
When possible, align the end points of partitions to one less than a multiple of the alignment value. When both start and end points are aligned, partitions should be multiples of the alignment value in size, which is necessary for some partition encryption tools to function correctly. This option applies to all partitions created after this option on the command line. Note that this alignment is not always possible; for instance, if the free space at the end of a disk is less than the alignment value, with the current final partition being aligned, and if sgdisk is asked to create a partition in that space, then it will not be end-aligned.
11:33:53
@void68:matrix.orgvoidok start & size is better I guess with --align-end.11:34:10
@void68:matrix.orgvoidnot sure how it worked before though.11:34:28
@lassulus:lassul.uslassulusyeah, generation an options manpage for disko is still a complicated topic, since everything is kinda recursive it's hard to use the old doc genrators for that. Also the old list based approach was kind of lacking in the referencing and updating part, like if you add a partition in between everything has to shift a bit. and yes, size is the new recommended way, start is usually 0, which means the next available space in sgdisk, which should be reproducible if you run the same script multiple times. so partitions usually only need size. you can use priority if you want certain partitions to be in front of others, but so far this didn;t made any difference in any bootloader. porting table partitions to gpt partitions is sadly not a straight forward thing, since the latter alwas have a label and before it was optional.11:39:35
@lassulus:lassul.uslassulus * yeah, generation of options manpages for disko is still a complicated topic, since everything is kinda recursive it's hard to use the old doc genrators for that. Also the old list based approach was kind of lacking in the referencing and updating part, like if you add a partition in between everything has to shift a bit. and yes, size is the new recommended way, start is usually 0, which means the next available space in sgdisk, which should be reproducible if you run the same script multiple times. so partitions usually only need size. you can use priority if you want certain partitions to be in front of others, but so far this didn;t made any difference in any bootloader. porting table partitions to gpt partitions is sadly not a straight forward thing, since the latter alwas have a label and before it was optional.11:39:54
@lassulus:lassul.uslassulusthis all ties in, into making the create part of every type idempotent, so running the createScript multiple times should just add stuff where it can and we should be able to run this on every nixos-rebuild switch 11:41:26
@lassulus:lassul.uslassulusopt-in in the beginning ofc11:41:49
@lassulus:lassul.uslassulusbut not every feature from the old table type got ported to the new gpt type, like msdos tables. but I have no usecase for them, if someone needs them (and is not happy with the weird gpt-hybrid thingie) please message me and we can implement a new type in tandem (meaning you do it and I tell you how :))11:49:57
@void68:matrix.orgvoidhow do I set bootable = true; now?11:52:47

Show newer messages


Back to Room ListRoom Version: 10