!oNSIfazDqEcwhcOjSL:matrix.org

disko

361 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko92 Servers

Load older messages


SenderMessageTime
11 Aug 2024
@matthewcroughan:defenestrate.itmatthewcroughan Something that should never change is the ${device}-part1 ${device-part2}, so maybe I can just use that, since the kernel is responsible for keeping that stable 16:10:44
@matthewcroughan:defenestrate.itmatthewcroughan * Something that should never change is the ${device}-part1 ${device-part2}, so maybe I can just use that, since the kernel is responsible for keeping that -part1 -part2 string stable 16:10:57
@lassulus:lassul.uslassulusNo example ready now. But just run env in a hook to see what's available16:28:18
@matthewcroughan:defenestrate.itmatthewcroughan

lassulus:

Device       Start      End  Sectors Type-UUID                            UUID                                 Name            Attrs
/dev/sda1     2048     8191     6144 0FC63DAF-8483-4772-8E79-3D69D8477DE4 AF2745B3-D3AB-4956-99D2-07CB46646F95 bl2 
17:36:50
@matthewcroughan:defenestrate.itmatthewcroughanit starts at 204817:37:00
@matthewcroughan:defenestrate.itmatthewcroughan fdisk -x says First usable LBA: 34 17:37:18
@matthewcroughan:defenestrate.itmatthewcroughan

So:

          content = {
            type = "gpt";
            partitions = {
              bl2 = {
                start = "34";
                end = "8191";

Didn't quite do what I was looking for

17:37:37
@matthewcroughan:defenestrate.itmatthewcroughanIs that supposed to have worked, or am I misunderstanding something?17:37:46
@lassulus:lassul.uslassulusNot sure what sgdisk is doing there17:38:38
@matthewcroughan:defenestrate.itmatthewcroughanhttps://termbin.com/qpjd17:39:01
@matthewcroughan:defenestrate.itmatthewcroughanhere's the diskoScript17:39:08
@matthewcroughan:defenestrate.itmatthewcroughan Maybe it is the --align-end flag? 17:40:35
@matthewcroughan:defenestrate.itmatthewcroughan Yeah I set alignment = 1 and it's good now lassulus 17:45:14
@matthewcroughan:defenestrate.itmatthewcroughan
+ mkfs.bcachefs --compression=lz4 /dev/disk/by-partlabel/disk-disk1-root
External UUID:                             adba6eba-ddc8-4ad9-8361-b63594f67995
Internal UUID:                             a45e4734-930e-45d4-b322-789ac806eb8b
Magic number:                              c68573f6-66ce-90a9-d96a-60cf803df7ef
Device index:                              0
Label:                                     (none)
Version:                                   1.9: disk_accounting_v2
Version upgrade complete:                  0.0: (unknown version)
Oldest version on disk:                    1.9: disk_accounting_v2
Created:                                   Sun Aug 11 18:53:44 2024
Sequence number:                           0
Time of last write:                        Thu Jan  1 01:00:00 1970
Superblock size:                           976 B/1.00 MiB
Clean:                                     0
Devices:                                   1
Sections:                                  members_v1,members_v2
Features:                                  new_siphash,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes
Compat features:                           

Options:
  block_size:                              512 B
  btree_node_size:                         256 KiB
  errors:                                  continue [fix_safe] panic ro 
  metadata_replicas:                       1
  data_replicas:                           1
  metadata_replicas_required:              1
  data_replicas_required:                  1
  encoded_extent_max:                      64.0 KiB
  metadata_checksum:                       none [crc32c] crc64 xxhash 
  data_checksum:                           none [crc32c] crc64 xxhash 
  compression:                             lz4
  background_compression:                  none
  str_hash:                                crc32c crc64 [siphash] 
  metadata_target:                         none
  foreground_target:                       none
  background_target:                       none
  promote_target:                          none
  erasure_code:                            0
  inodes_32bit:                            1
  shard_inode_numbers:                     1
  inodes_use_key_cache:                    1
  gc_reserve_percent:                      8
  gc_reserve_bytes:                        0 B
  root_reserve_percent:                    0
  wide_macs:                               0
  acl:                                     1
  usrquota:                                0
  grpquota:                                0
  prjquota:                                0
  journal_flush_delay:                     1000
  journal_flush_disabled:                  0
  journal_reclaim_delay:                   100
  journal_transaction_names:               1
  version_upgrade:                         [compatible] incompatible none 
  nocow:                                   0

members_v2 (size 160):
Device:                                    0
  Label:                                   (none)
  UUID:                                    0d6cfd81-9951-4a60-84a6-0550bcc32bf5
  Size:                                    28.7 GiB
  read errors:                             0
  write errors:                            0
  checksum errors:                         0
  seqread iops:                            0
  seqwrite iops:                           0
  randread iops:                           0
  randwrite iops:                          0
  Bucket size:                             256 KiB
  First bucket:                            0
  Buckets:                                 117625
  Last mount:                              (never)
  Last superblock write:                   0
  State:                                   rw
  Data allowed:                            journal,btree,user
  Has data:                                (none)
  Btree allocated bitmap blocksize:        1.00 B
  Btree allocated bitmap:                  0000000000000000000000000000000000000000000000000000000000000000
  Durability:                              1
  Discard:                                 0
  Freespace initialized:                   0
starting version 1.9: disk_accounting_v2 opts=compression=lz4
initializing new filesystem
going read-write
initializing freespace
IO error: Operation not permitted
17:54:16
@matthewcroughan:defenestrate.itmatthewcroughanAlthough mkfs.bcachefs crashes the diskoScript and prevents the postCreateHook from executing17:54:32
@matthewcroughan:defenestrate.itmatthewcroughan With IO error: Operation not permitted 17:54:38
@matthewcroughan:defenestrate.itmatthewcroughanrunning the mkfs.bcachefs command directly doesn't exhibit the permission error17:59:40
@matthewcroughan:defenestrate.itmatthewcroughanmaybe something isn't settling?18:00:34
@matthewcroughan:defenestrate.itmatthewcroughanchanging the FS to ext4 makes it work correctly, this is odd stuff18:02:05
@lassulus:lassul.uslassulusMaybe it has to do with the alignment changes you did?18:04:58
@matthewcroughan:defenestrate.itmatthewcroughan But if I run the mkfs.bcachefs cmd from the set -x debug manually by hand after it exists, I don't get the "Operation not permitted" error 18:06:04
@matthewcroughan:defenestrate.itmatthewcroughan * But if I run the mkfs.bcachefs cmd from the set -x debug manually by hand after it exits, I don't get the "Operation not permitted" error 18:06:24
@matthewcroughan:defenestrate.itmatthewcroughanAnd if I use ext4, everything is fine too.18:06:33
@matthewcroughan:defenestrate.itmatthewcroughanYeah, something about the assumptions of the diskoScript don't work on real hardware like this SD card18:21:12
@matthewcroughan:defenestrate.itmatthewcroughanI've tried two SD cards in two interfaces by now18:21:27
@matthewcroughan:defenestrate.itmatthewcroughantrying another medium18:22:46
@matthewcroughan:defenestrate.itmatthewcroughanfigured it out18:23:25
@matthewcroughan:defenestrate.itmatthewcroughan
              root = {
                name = "root";
                size = "100%";
                content = {
                  type = "filesystem";
                  extraArgs = [ "--compression=lz4" ];
                  format = "bcachefs";
                  mountpoint = "/";
                  postMountHook = toString (pkgs.writeScript "postMountHook.sh" ''
                    touch /mnt/disko-first-boot
                  '');
                };
              };

18:23:27
@matthewcroughan:defenestrate.itmatthewcroughan it's the touch /mnt/disko-first-boot 18:23:34
@matthewcroughan:defenestrate.itmatthewcroughanworks with ext4, doesn't work with bcachefs 18:23:47

Show newer messages


Back to Room ListRoom Version: 10