Bug 78117

Summary: mkinitrd fails when installing errata kernel-2.4.18-18.7.x
Product: [Retired] Red Hat Linux Reporter: David Vu <david.vu>
Component: mkinitrdAssignee: Erik Troan <ewt>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 7.3CC: chris.ricker
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-14 21:22:04 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 David Vu 2002-11-19 07:28:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)

Description of problem:
When I install the new errata kernel-2.4.18-18.7.x.i686.rpm, I get the 
following:

ls: #LABEL=/
/dev/sda5: No such file or directory
/sbin/mkinitrd: [: : integer expression expected
/sbin/mkinitrd: /sbin/lvmdiskscan: No such file or directory
cp: cannot stat `/sbin/vgwrapper': No such file or directory
ln: accessing `/tmp/initrd.JRE1uQ/bin/vgwrapper': No such file or directory
ln: accessing `/tmp/initrd.JRE1uQ/bin/vgwrapper': No such file or directory.

The initrd is produced OK, but I tried to make a new initrd, using 
# /sbin/mkinitrd /boot/initrd-2.4.18-18.7.x.img 2.4.18-18.7.x
I get a similar response, although the initrd seems to be created successfully.

The new kernel fails to boot.



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


How reproducible:
Always

Steps to Reproduce:
1. rpm -ivh kernel-2.4.18-18.7.x.i686.rpm
   -or- 
   /sbin/mkinitrd /boot/initrd-2.4.18-18.7.x.img 2.4.18-18.7.x
	

Actual Results:  ls: #LABEL=/
/dev/sda5: No such file or directory
/sbin/mkinitrd: [: : integer expression expected
/sbin/mkinitrd: /sbin/lvmdiskscan: No such file or directory
cp: cannot stat `/sbin/vgwrapper': No such file or directory
ln: accessing `/tmp/initrd.JRE1uQ/bin/vgwrapper': No such file or directory
ln: accessing `/tmp/initrd.JRE1uQ/bin/vgwrapper': No such file or directory

Expected Results:  rpm -ivh  ... completes successfully -or- /sbin/mkinitrd ... 
completes successfully with no output

Additional info:

When booting with the new kernel, get: 

Mounting /proc filesystem
Scanning logical volumes
ERROR: failed in exec of vgscan
Activating logical volumes
ERROR: failed in exec of vgchange
Mounting root filesystem
mount: missing mount point
ERROR: failed in exec of /dev/sda5
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
ERROR: /dev/sda5 exited abnormally!
umount /proc failed: 22
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
ERROR: vgchange exited abnormally!
echo: cannot open /proc/sys/kernel/real-root-dev for write: 2
Mounting root filesystem
mount: missing mount point
ERROR: failed in exec of /dev/sda5
umount /proc failed: 22
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
ERROR: /dev/sda5 exited abnormally!
umount /proc failed: 22
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
ERROR: vgscan exited abnormally!
Activating logical volumes
ERROR: failed in exec of vgchange
echo: cannot open /proc/sys/kernel/real-root-dev for write: 2
Mounting root filesystem
mount: missing mount point
ERROR: failed in exec of /dev/sda5
umount /proc failed: 22
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
ERROR: /dev/sda5 exited abnormally!
umount /proc failed: 22
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
ERROR: vgchange exited abnormally!
echo: cannot open /proc/sys/kernel/real-root-dev for write: 2
Mounting root filesystem
mount: missing mount point
ERROR: failed in exec of /dev/sda5
umount /proc failed: 22
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
ERROR: /dev/sda5 exited abnormally!
umount /proc failed: 22
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
Freeing unused kernel memory: 160k freed
Kernel panic: No init found.  Try passing init= option to kernel.

Here is my /etc/fstab

#LABEL=/                 /                       ext2    defaults        1 1
/dev/sda5               /                       ext2    defaults        1 1
#LABEL=/boot             /boot                   ext2    defaults        1 2
/dev/sda1               /boot                   ext2    defaults        0 2
#LABEL=/data             /data                   ext2    defaults        1 2
/dev/sdb1               /data                   ext2    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
#/dev/sda2               swap                    swap    defaults        0 0
/dev/sda3               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,kudzu,ro 0 
0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0

Here is a portion of /boot/grub/grub.conf showing the new and old kernel:

title Red Hat Linux (2.4.18-18.7.x)
        root (hd0,0)
        kernel /vmlinuz-2.4.18-18.7.x ro root=/dev/sda5 console=tty0 
console=ttyS0,9600n81
        initrd /initrd-2.4.18-18.7.x.img
title Red Hat Linux (2.4.18-17.7.x)
        root (hd0,0)
        kernel /vmlinuz-2.4.18-17.7.x ro root=/dev/sda5 console=tty0 
console=ttyS0,9600n81
        initrd /initrd-2.4.18-17.7.x.img

Comment 1 David Vu 2002-11-19 07:46:12 UTC
The work around, is to insert a 'blank' after the leading '#', as in

# LABEL=/                 /                       ext2    defaults        1 1
/dev/sda5               /                       ext2    defaults        1 1
# LABEL=/boot             /boot                   ext2    defaults        1 2
/dev/sda1               /boot                   ext2    defaults        0 2
# LABEL=/data             /data                   ext2    defaults        1 2

After this, /sbin/mkinitrd works successfully and the new kernel can boot fine.


Comment 2 Erik Troan 2003-01-14 21:22:04 UTC
fstab comments were bad in that version of mkinitrd -- this has been fixed for 8.0