Bug 63287

Summary: updfstab mishandles DiskOnKey devices
Product: [Retired] Red Hat Linux Reporter: Lee Wittenberg <leew>
Component: kudzuAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-13 20:54:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lee Wittenberg 2002-04-12 02:32:12 UTC
Description of Problem:
The DiskOnKey device has a very strange partition table that it doesn't
actuallyuse (and that seems to drive fdisk crazy).  If "sdx" is the device
chosen for the key, it's possible to mount either /dev/sda4 or just plain ol'
/dev/sda, butnot /dev/sda1, which is the partition updfstab chooses to add to
the table.  This means that only root can mount the device.

Version-Release number of selected component (if applicable):


How Reproducible:
Always

Steps to Reproduce:
1.  Plug the DiskOnKey into a USB port
2. 
3. 

Actual Results:
The line

    /dev/sda1               /mnt/diskonkey          auto    noauto,owner,kudzu 0
0

is added to /etc/fstab by updfstab.

Expected Results:
The line

    /dev/sda               /mnt/diskonkey          auto    noauto,owner,kudzu 0
0

should have been added to /etc/fstab by updfstab.  /dev/sda4 rather than
/dev/sda works with the default, bizarre, partition table, but will cause
problems if the partition table is modified.

Additional Information:
	
changing the

    { "diskonkey", CLASS_HD,    0,  1, "DiskOnKey"          },

line in updfstab.c to

    { "diskonkey", CLASS_HD,    0,  0, "DiskOnKey"          },

seems to fix the problem.

Comment 1 Markus Ledermann 2002-08-09 10:29:01 UTC
in my case the mount of /dev/sda4 does not work, only the mount of /dev/sda is 
successfull.

i've found a other solution changing the updfstab.c

changing the entry 

device diskonkey {
	partition 1
	match	hd diskOnKey
}

in /etc/updfstab.conf.default to

device diskonkey {
	partition 0
	match	hd diskOnKey
}

works for me, even if i make a 'real' partition.

Comment 2 Bill Nottingham 2003-02-13 20:54:53 UTC
Fixed in 0.99.96-1.