Bug 20610

Summary: mkbootdisk does not work on default RH7 clean install.
Product: [Retired] Red Hat Linux Reporter: Christofer C. Bell <cbell>
Component: mkbootdiskAssignee: Matt Wilson <msw>
Status: CLOSED NOTABUG QA Contact: Dale Lovelace <dale>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: cbell
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://www.jayahwks.net/~cbell/
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-16 14:56:15 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 Christofer C. Bell 2000-11-10 02:23:41 UTC
When I run the following command:

# mkbootdisk --device /dev/fd0 `uname -r`

I get this error:

Cannot find root partition in /etc/fstab.

I believe this has to do with the RH7 installer assigning partition labels
by default and thus does not include an explicit pointer to the root
partition.  A reading of the man a page indicates that there is no command
line option to mkbootdisk to force it to use a particular partition as the
root partition. 

My /etc/fstab is as follows:

LABEL=/                 /                       ext2    defaults        1 1
LABEL=/boot             /boot                   ext2    defaults        1 2
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/hdb6               swap                    swap    defaults        0 0
/dev/hda1		/home/cbell/win98	vfat	uid=500,gid=500	0 0

Note that the / entry does not contain explict partition information.  This
is on a clean install of RH7 in GNOME Workstation mode. 

This bug prevents users from creating a boot disk after installation
(should one not have been created at install time or since lost) or after
updating the system kernel.  As this disk is required for system recovery,
I've marked the priority as "high".

Comment 1 Helge Deller 2001-02-05 16:54:58 UTC
Sorry, but I couldn't reproduce your problem:
(I used your fstab from above on a (nearly) fresh 7.0)

[root@istanbul hdeller]# cat /etc/fstab
LABEL=/                 /                       ext2    defaults        1 1
LABEL=/boot             /boot                   ext2    defaults        1 2
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/hdb6               swap                    swap    defaults        0 0
/dev/hda1               /home/cbell/win98       vfat    uid=500,gid=500 0 0
 
 
[root@istanbul hdeller]# rpm -qa | grep mkbootdisk
mkbootdisk-1.2.8-2

[root@istanbul hdeller]# cat /etc/redhat-release
Red Hat Linux release 7.0 (Guinness)

[root@istanbul hdeller]# mkbootdisk --device /dev/fd0 `uname -r`
Insert a disk in /dev/fd0. Any information on the disk will be lost.
Press <Enter> to continue or ^C to abort:

[root@istanbul mkbootdisk-1.2.8]# rpm -qa | grep perl
perl-5.6.0-9  

I will try again on a really fresh 7.0....


Comment 2 pdenis2 2001-04-19 00:14:05 UTC
I've just encountered the identical problem to cbell's with a new RH7.0 system. 
/etc/fstab similar to above (LABELS for several partitions including /).  Same
mkbootdisk rpm.  '/sbin/mkbootdisk --device /dev/fd0 2.2.16-22' gave  same err.
msg: Can't find root partition in fstab.
BUT, after about 1 hr of searching the net and ending up here at bugzilla I
tried it again AND IT WORKED OK -- no err. msg. , disk created OK.  Worked OK
both using ...`uname -r` syntax and explicitly specifying kernel.  Really
strange...

Comment 3 pdenis2 2001-05-12 17:49:45 UTC
Maybe this isn't a bug after all:  mkbootdisk now [kernel 2.2.19-7.0.1] works
fine for user=root.  Fails as described above for ordinary users.  I don't
remember whether I was switching between ordinary and root in my comments above
[2001-04-18].

Maybe should change execute permission on /sbin/mkbootdisk to root only to
prevent this confusion...

Comment 4 Erik Troan 2002-06-03 18:45:31 UTC
mkbootdisk needs to be run as root most of the time, but it is possible to
set up your system so that anyone can run it, so I don't want to just change
the permissions.