Red Hat Bugzilla – Bug 25038
Kickstart assigns LABEL= in fstab for vfat partition
Last modified: 2007-04-18 12:30:56 EDT
When kickstart was confronted with a kickstart file with these lines:
part /dos/c --size 2000 --type 6
part / --size 2000
it come up with the following fstab:
LABEL=/ / ext2 defaults 1 1
LABEL=/dos/c /dos/c vfat defaults 0 0
this is not very good after the /dos/c is properly formatted, because then
the ext2 LABEL seems to disappear, and subsequent mounts will fail...
A workable fix seems to be (i.e. only ext2 partitions can be mounted by
--- O.fstab.py Fri Jan 26 16:29:03 2001
+++ fstab.py Fri Jan 26 16:33:36 2001
@@ -734,7 +734,7 @@
dev = "loop1"
fs = "ext2"
- if labels.has_key(dev):
+ if labels.has_key(dev) and fs == "ext2":
devName = "LABEL=" + labels[dev]
devName = '/dev/' + dev
Thank you for your report.
Assigning to a developer.
I've gone ahead and put your patch into anaconda, as it certainly won't hurt
I'd love to
Wow, that was a useful commentary.
Anyway, I'm trying to fix this the right way. It looks like we're mke2fs'ing
partitions we're creating as DOS partitions during kickstart, and that's just
I have no idea how you got here, but I'm going to commit this fix instead.
RCS file: /mnt/devel/CVS/anaconda/fstab.py,v
retrieving revision 1.126
diff -u -r1.126 fstab.py
--- fstab.py 2001/01/25 00:20:21 1.126
+++ fstab.py 2001/01/30 21:00:57
@@ -632,6 +632,11 @@
for i in range (len (table)):
(type, start, size) = table[i]
# right now we only support label's on ext2 partitions
if type != _balkan.EXT2: continue
dev = drive + str (i + 1)
Should do the same thing.
Seems like that fix has the same effect as mine, baut I can't test it at the
moment since the fstab.py seems to have been changed in between. But there is
still problems with LABEL= mounts; I had a disk that was partitioned like this:
partition#1: ext2 label="/"
this was changed to:
partition#1: FAT (now bogus)label="/"
partition#2: ext2 label="/"
This lead to an fstab containing:
LABEL=/ / ext2 ...
/dev/hda1 /dos/c vfat ...
But mount believed in the [bogus] label in the vfat partition, leading to /dev/
hda1 being mounted as "/". In my opinion:
a. mount needs to be fixed to check that labels are read from valid
b. it would be nice to have a "--nolabelmount" in kickstart, to be
able to avoid the LABEL= stuff altogether.
BTW. I've added a comment to bug #23602, that is related to the issues in this
verified fix in qa0217.1 ...
... anders' concern is observed behavior, but note this behavior does not occur
if the partition is zeroed or validly formatted by mkdosfs ...