Bug 78117 - mkinitrd fails when installing errata kernel-2.4.18-18.7.x
mkinitrd fails when installing errata kernel-2.4.18-18.7.x
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd (Show other bugs)
7.3
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Erik Troan
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-19 02:28 EST by David Vu
Modified: 2007-04-18 12:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-14 16:22:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Vu 2002-11-19 02:28:45 EST
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 02:46:12 EST
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 16:22:04 EST
fstab comments were bad in that version of mkinitrd -- this has been fixed for 8.0

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