On Thu, 5 Aug 2004, Alexander Dalloz wrote:
Am Do, den 05.08.2004 schrieb Robert P. J. Day um 20:23:
The Linux kernel requires BSD disk label support compiled in (CONFIG_BSD_DISKLABEL=y) to use the labels with fstab and how it is used as kernel command line in the grub.conf on Fedora (Redhat) systems.
really? i've used e2label many times for labelling filesystems, and i've never built a kernel with BSD labelling. are you sure about this? (time to go RTFS, i guess.)
rday
Hm, I am becoming a bit uncertain when you say that the labels in fstab work for you on a custom kernel without BSD disklabel support and because I can't find the source of my "knowledge". If it would be not a big deal and not last that long, I would compile a kernel without support for BSD disklabels and try it out.
i don't have the resources to do that at this second, but i just took a look at the Kconfig file in fs/partitions, and here's the entry for that feature:
config BSD_DISKLABEL bool "BSD disklabel (FreeBSD partition tables) support" depends on PARTITION_ADVANCED && MSDOS_PARTITION help FreeBSD uses its own hard disk partition scheme on your PC. It requires only one entry in the primary partition table of your disk and manages it similarly to DOS extended partitions, putting in its first sector a new partition table in BSD disklabel format. Saying Y here allows you to read these disklabels and further mount FreeBSD partitions from within Linux if you have also said Y to "UFS file system support", above. If you don't know what all this is about, say N.
and i know i've built lots of kernels without this feature, and done lots of e2labels, and never had a problem. so if i've missed getting burned by this all this time, i've been indescribably lucky.
rday
p.s. just making this as difficult as possible, rather than actually test it, i took a look at the include file include/linux/ext2_fs.h in the kernel source tree, where we find:
struct ext2_super_block { __u32 s_inodes_count; /* Inodes count */ __u32 s_blocks_count; /* Blocks count */ ... char s_volume_name[16]; /* volume name */ <--- hmmm ...
and the man page for e2label:
... Ext2 filesystem labels can be at most 16 characters long; if new-label is longer than 16 characters, e2label will truncate it and print a warning message....
16 character limits in both places. coincidence? (yes, i'm clearly bored today.)