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

Label disks? #29

Closed
yajo opened this issue Aug 26, 2022 · 6 comments
Closed

Label disks? #29

yajo opened this issue Aug 26, 2022 · 6 comments

Comments

@yajo
Copy link
Contributor

yajo commented Aug 26, 2022

In the installation instructions, it seems recommended to identify disks by label (/dev/disk/by-label/nixos and friends).

It would be very nice if disko could add labels to disks when creating the filesystems.

@Baitinq
Copy link
Contributor

Baitinq commented Aug 26, 2022

I'll implement this as soon as #27 is merged

@Mic92
Copy link
Member

Mic92 commented Aug 26, 2022

I think #27 also add create options for mkfs to make this feasible.

@Baitinq
Copy link
Contributor

Baitinq commented Aug 26, 2022

@Mic92 I dont think you can use mkfs to label a partition, but I might be wrong on that.

EDIT: From what ive seen you need to either do it when you create the partition or using other tools such as e2label.

@Mic92
Copy link
Member

Mic92 commented Aug 26, 2022

Yeah I also think it needs to be done per filesystem:

Fileystem package set label show label
ext2/ext3/ext4 e2fsprogs sudo e2label /dev/sda1 NEUES_LABEL sudo tune2fs -L NEUES_LABEL /dev/sda1 sudo e2label /dev/sda1 sudo tune2fs -l /dev/sda1
ReiserFS reiserfsprogs sudo reiserfstune -l NEUES_LABEL /dev/sda1 sudo debugreiserfs
JFS jfsutils sudo jfs_tune -L NEUES_LABEL /dev/sda1 sudo jfs_tune -l
XFS xfsprogs xfs_admin -L NEUES_LABEL /dev/sda1 xfs_admin -l
FAT dosfstools sudo fatlabel /dev/sdb1 NEUES_LABEL sudo fatlabel /dev/sdb1
FAT mtools sudo mlabel -i /dev/sdb1 ::NEUES_LABEL sudo mlabel -i /dev/sdb1 -s ::
NTFS ntfs-3g (ab Ubuntu 11.10) sudo ntfslabel /dev/sdb1 NEUES_LABEL sudo ntfslabel /dev/sdb1
Swap util-linux sudo swaplabel -L NEUES_LABEL /dev/sda1 sudo swaplabel /dev/sda1

@yajo
Copy link
Contributor Author

yajo commented Aug 29, 2022

According to #30 (comment), a workaround for disk labeling is to use a GPT table and set the label as part-type.

@Lassulus
Copy link
Collaborator

Lassulus commented Sep 6, 2022

This was done in #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants