Bug 25038 - Kickstart assigns LABEL= in fstab for vfat partition
Summary: Kickstart assigns LABEL= in fstab for vfat partition
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact: Brock Organ
Whiteboard: Florence RC-1
Depends On:
TreeView+ depends on / blocked
Reported: 2001-01-26 17:29 UTC by Anders Blomdell
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-31 11:46:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Anders Blomdell 2001-01-26 17:29:28 UTC
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

Comment 1 Michael Fulbright 2001-01-26 17:41:10 UTC
Thank you for your report.

Assigning to a developer.

Comment 2 Erik Troan 2001-01-30 21:30:20 UTC
I've gone ahead and put your patch into anaconda, as it certainly won't hurt

I'd love to

Comment 3 Erik Troan 2001-01-30 21:36:51 UTC
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
not right.

Comment 4 Erik Troan 2001-01-30 22:06:25 UTC
I have no idea how you got here, but I'm going to commit this fix instead.

Index: fstab.py
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.

Comment 5 Anders Blomdell 2001-01-31 11:46:35 UTC
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="/"

  Partition#2: FAT

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 

bug report.

Comment 6 Brock Organ 2001-02-19 17:50:04 UTC
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 ...

Note You need to log in before you can comment on or make changes to this bug.