Bug 76709

Summary: rh-linux allows to format mounted filesystems like /boot
Product: [Retired] Red Hat Linux Reporter: Hans-Peter Auer <earth.tirol>
Component: mountAssignee: Elliot Lee <sopwith>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-25 07:15:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Hans-Peter Auer 2002-10-25 07:14:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)

Description of problem:
When booting a pc with two harddrives (hda, hdc) with installed RedHat-Linux 
(>7.0) it is possible to format /boot without enny warnings.

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

How reproducible:

Steps to Reproduce:
1.install only one harddrive in the pc as hda, and install rh on it
with three partitions (hda1=/boot, hda2=/, hda3=swap)
2.process with the secound harddrive exactly at the same way like described at 
3.install both harddrives in the pc as hda and hdc
4.boot the system normaly
5.execute mount to show the mounted filesystem
6.makefs.ext3 /dev/hda1	

Actual Results:  5.mount sayes that "/boot" ist mounted from hdc1 and "/" from 
but in real the right mount devs are mounted (hda1 and hda2)
6./dev/hda1 will be formatet without ANY warning !!!

Expected Results:  5.mount must show the right mountpoints
6.makefs.ext3 must stop with the message that it could not format a mounted 

Additional info:

i think the problem is comming from the way rh-linux scanns for ext2-partiton-
labels and the way mount/kernle interprets the lable/device relation

Comment 1 Elliot Lee 2002-10-29 11:50:02 UTC
If mount says that /boot is coming from /dev/hdc1, I see no reason to disbelieve it.

If you want to specify a particular device to mount, edit fstab to reference that device 
instead of the label. Mount by label can't be expected to know which one you "mean" to be 
mounted :)