Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actions: image-partition: Should check label length in Verify stage #251

Open
obbardc opened this issue Mar 23, 2021 · 1 comment · May be fixed by #271
Open

actions: image-partition: Should check label length in Verify stage #251

obbardc opened this issue Mar 23, 2021 · 1 comment · May be fixed by #271

Comments

@obbardc
Copy link
Member

obbardc commented Mar 23, 2021

mkfs.vfat now fails if the partition label is >11 characters. Older versions of mkfs.vfat just silently accepted the label length. We should probably check the label for all partition types length in the action's Verify() function.

2021/03/23 10:54:41 ==== image-partition ====
2021/03/23 10:54:42 Formatting partition 1 | mkfs.vfat: Label can be no longer than 11 characters
2021/03/23 10:54:42 Formatting partition 1 | mkfs.fat 4.2 (2021-01-31)
2021/03/23 10:54:42 Action `image-partition` failed at stage Run, error: exit status 1
@obbardc
Copy link
Member Author

obbardc commented Mar 23, 2021

mkfs.fat -n truncates a name longer than 11 bytes, and
mkfs.ext[34] -L truncate a label to 16 bytes.

vigneshraman added a commit to vigneshraman/debos that referenced this issue Jul 27, 2021
Add optional argument filesystem label which defaults to partiton name
and is used in mkfs commands.

Fixes: go-debos#251

Suggested-by: Christopher Obbard <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
vigneshraman added a commit to vigneshraman/debos that referenced this issue Jul 27, 2021
The filesystem label can be up to 11 characters long for vfat, 16 characters
long for ext2/3/4, 255 characters long for btrfs, 512 characters long for
hfs/hfsplus and 12 characters long for xfs. Any longer labels will be
automatically truncated.

Fixes: go-debos#251

Suggested-by: Christopher Obbard <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
vigneshraman added a commit to vigneshraman/debos that referenced this issue Jul 27, 2021
Added optional fslabel property to partition to allow truncation of
filesystem label and allow user to modify filesystem label without
modifying the name. Filesystem label defaults to the name property
of the partition.

The filesystem label can be up to 11 characters long for vfat,
16 characters long for ext2/3/4, 255 characters long for btrfs,
512 characters long for hfs/hfsplus and 12 characters long for xfs.
Any longer labels will be automatically truncated.

Fixes: go-debos#251

Suggested-by: Christopher Obbard <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
vigneshraman added a commit to vigneshraman/debos that referenced this issue Jul 27, 2021
Added optional fslabel property to partition to allow truncation of
filesystem label and allow user to modify filesystem label without
modifying the name. Filesystem label defaults to the name property
of the partition.

The filesystem label can be up to 11 characters long for vfat,
16 characters long for ext2/3/4, 255 characters long for btrfs,
512 characters long for hfs/hfsplus and 12 characters long for xfs.
Any longer labels will be automatically truncated.

Fixes: go-debos#251

Suggested-by: Christopher Obbard <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
vigneshraman added a commit to vigneshraman/debos that referenced this issue Jul 27, 2021
…ed length

Added optional fslabel property to partition to allow truncation of filesystem
label and allow user to modify filesystem label without modifying the name.
Filesystem label defaults to the name property of the partition.

The filesystem label can be up to 11 characters long for vfat, 16 characters
long for ext2/3/4, 255 characters long for btrfs, 512 characters long for
hfs/hfsplus and 12 characters long for xfs. Any longer labels will be
automatically truncated.

Fixes: go-debos#251

Suggested-by: Christopher Obbard <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants