Bug 90775 - mkbootdisk fails with LABEL based fstab
Summary: mkbootdisk fails with LABEL based fstab
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: mkbootdisk
Version: 2.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-05-13 17:02 UTC by Sean P. Kane
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-27 11:09:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sean P. Kane 2003-05-13 17:02:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 
1.0.3705; .NET CLR 1.1.4322)

Description of problem:
mkbootdisk does not work with the fstab as installed by Red Hat Advaced Server 
2.1. I had to backup my fstab and then edit /etc/fstab to have standard old 
fashion enteries using device name to get it to work. Complained that it 
couldn't find the root partition in /etc/fstab otherwise.


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

How reproducible:
Always

Steps to Reproduce:
1. run mkbootdisk
2.
3.
    

Actual Results:  It complains that it can't find the root partition

Expected Results:  It should have created a bookdisk.

Additional info:

I fixed it by changing all my fstab enteries from LABEL=* to /dev/sda*

Comment 1 Matt Wilson 2003-10-09 22:47:35 UTC
please provide output of "sh -x mkbootdisk ..."


Comment 2 Sean P. Kane 2003-11-03 16:35:53 UTC
[oracle@simpheny oracle]$ sh -x mkbootdisk --device /dev/fd0 2.4.9-
e.27enterprise
+ pause=yes
+ unset kernel
+ device=/dev/fd0
+ unset verbose
+ unset witheth
+ unset mkinitrdargs
+ unset compact
+ MOUNTDIR=/tmp/mkbootdisk
+ 
PATH=/sbin:/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysima
ge/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin:/usr/X11R6/bin:/b
in:/usr/java/j2sdk1.4.1_02/bin:/opt/oracle/product/9.2/bin:/root/bin:/
opt/oracle/product/9.2/bin:/usr/java/j2sdk1.4.1_02/bin:/opt/oracle/pro
duct/9.2/bin
+ export PATH
+ VERSION=1.4.2
+ '[' 3 -gt 0 ']'
+ shift
+ device=/dev/fd0
+ shift
+ '[' 1 -gt 0 ']'
+ '[' -z '' ']'
+ kernel=2.4.9-e.27enterprise
+ shift
+ '[' 0 -gt 0 ']'
+ '[' -z 2.4.9-e.27enterprise ']'
+ '[' -d /lib/modules/2.4.9-e.27enterprise ']'
+ '[' -f /boot/vmlinuz-2.4.9-e.27enterprise ']'
+ '[' -f /etc/modules.conf -a -f /lib/modules/2.4.9-
e.27enterprise/modules.dep ']'
++ sort -u /etc/modules.conf
++ awk '/^alias eth0/ { print $3 }'
+ ethmodule=e1000
+ '[' -n e1000 ']'
+ echo e1000
+ grep '\.o$'
++ grep /net/e1000.o /lib/modules/2.4.9-e.27enterprise/modules.dep
++ head -1
+ deps=
++ echo
++ cut -d: -f2
+ deps=
+ witheth= --with e1000
+ '[' -f /lib/modules/2.4.9-e.27enterprise/fs/isofs.o ']'
+ '[' -f /lib/modules/2.4.9-e.27enterprise/fs/nfs.o ']'
+ '[' -f /lib/modules/2.4.9-e.27enterprise/fs/fat.o ']'
+ '[' -f /lib/modules/2.4.9-e.27enterprise/fs/msdos.o ']'
++ awk '$1 ~ /^[^#]/ && $2 ~ /^\/$/ { print $1 ; exit }' /etc/fstab
+ rootdev=LABEL=/
++ echo LABEL=/
++ cut -c1-6
+ '[' LABEL= = LABEL= ']'
++ echo LABEL=/
++ cut -c7-
+ rootlabel=/
++ tail +3 /proc/partitions
++ awk '{ print $4 }'
++ grep '^md'
+ list=
++ tail +3 /proc/partitions
++ awk '{ print $4 }'
++ grep -v '^md'
+ list= sda
sda1
sda2
sda3
sda4
sda5
sda6
sda7
sda8
sda9
sdb
sdb1
+ rootdev=
+ tune2fs -l /dev/sda
+ tune2fs -l /dev/sda1
+ tune2fs -l /dev/sda2
+ tune2fs -l /dev/sda3
+ tune2fs -l /dev/sda4
+ tune2fs -l /dev/sda5
+ tune2fs -l /dev/sda6
+ tune2fs -l /dev/sda7
+ tune2fs -l /dev/sda8
+ tune2fs -l /dev/sda9
+ tune2fs -l /dev/sdb
+ tune2fs -l /dev/sdb1
+ '[' -z ']'
+ echo 'Cannot find root partition in /etc/fstab.'
Cannot find root partition in /etc/fstab.
+ exit 1
[oracle@simpheny oracle]$


The fstab looks like this:


LABEL=/ /       ext3    defaults        1       1
LABEL=/boot     /boot   ext3    defaults        1       2
none    /dev/pts        devpts  gid=5,mode=620  0       0
LABEL=/home     /home   ext3    defaults        1       2
LABEL=/opt      /opt    ext3    defaults        1       2
LABEL=/opt/oracle/orad  /opt/oracle/oradata     ext3  defaults  1 2
none    /proc   proc    defaults        0       0
none    /dev/shm        tmpfs   defaults        0       0
LABEL=/tmp      /tmp    ext3    defaults        1       2
LABEL=/usr      /usr    ext3    defaults        1       2
LABEL=/var      /var    ext3    defaults        1       2
/dev/sda2       swap    swap    defaults        0       0
/dev/hda        /mnt/cdrom      auto    noauto,ro       0       0
/dev/fd0        /mnt/floppy     auto    noauto  0    0              


Comment 3 Matt Wilson 2003-11-03 16:38:21 UTC
are you running mkbootdisk as root or as oracle?


Comment 4 Sean P. Kane 2003-11-03 16:57:30 UTC
I was running as a regular user (oracle). When I run as root it seems 
to work. Someone should probably update the error message this 
produces to state that root must be used to execute this command. I 
thought I had done this as root in the past, but it has been over 5 
months since I posted this bug, so who knows now. Note that, I 
believe changing the fstab works around this so that a normal user 
can also create a resuce disk, since it is probably the tune2fs 
command that is actually "not working" when logged into a regular 
user. In any case, if this isn't a "bug" the error output should at 
least be made to reflect more potential causes of the problem then it 
does now.




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