Skip to content

Commit

Permalink
Set the vfat label using the correct flag (#141)
Browse files Browse the repository at this point in the history
-i expects a hexadecimal value
-n should be used for the filesystem label

https://man7.org/linux/man-pages/man8/mkfs.vfat.8.html

Needed as part of kairos-io/kairos#2281

so that this config:

```
      add_partitions:
        - fsLabel: COS_GRUB
          size: 64
          pLabel: efi
          filesystem: "fat"
```

won't result in this error:

```
Volume ID must be a hexadecimal number
```

Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily authored Apr 10, 2024
1 parent 353138e commit 4ebbc75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugins/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ func (mkfs MkfsCall) buildOptions() ([]string, error) {
opts = append(opts, mkfs.dev)
case fatFS:
if mkfs.part.FSLabel != "" {
opts = append(opts, "-i")
opts = append(opts, "-n")
opts = append(opts, mkfs.part.FSLabel)
}
if len(mkfs.customOpts) > 0 {
Expand Down

0 comments on commit 4ebbc75

Please sign in to comment.