From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Description of problem: When trying to create a new ramdisk, via mkinitrd manaully or when upgrading a kernel rpm, mkinitrd will fail if /dev/zero is not present. The failure message given is very generic, and simply states that mkinitrd fails, and provides a return code of 1. This would be nicer if the mkinitrd script verified the existance of /dev/zero and provided a useful error message if it was not there. Version-Release number of selected component (if applicable): mkinitrd-3.5.13.6-1 How reproducible: Always Steps to Reproduce: 1. Remove /dev/zero device 2. Try run mkinitrd (or install a new kernel) 3. Actual Results: # Manual mkinitrd [root@bunson root]# mkinitrd -f mytestimage.img 2.4.21-37.ELsmp [root@bunson root]# echo $? 1 [root@bunson root]# # Kernel installation [root@bunson root]# rpm -ivh kernel-2.4.21-37.EL.i686.rpm Preparing... ########################################### [100%] 1:kernel ########################################### [100%] mkinitrd failed [root@bunson root]# Expected Results: # Manual mkinitrd [root@bunson root]# mkinitrd -f mytestimage.img 2.4.21-37.ELsmp [root@bunson root]# echo $? 0 [root@bunson root]# # Kernel installation [root@bunson root]# rpm -ivh kernel-2.4.21-37.EL.i686.rpm Preparing... ########################################### [100%] 1:kernel ########################################### [100%] [root@bunson root]# echo $? [root@bunson root]# 0 Additional info: Here's a potential fix. 25a26 > # Michael Stahnke <mastahnke> 481c482,489 < dd if=/dev/zero of=$IMAGE bs=1k count=$IMAGESIZE 2> /dev/null || exit 1 --- > > if [ -c /dev/zero ]; then > dd if=/dev/zero of=$IMAGE bs=1k count=$IMAGESIZE 2> /dev/null || exit 1 > else > echo "Error /dev/zero device required for mkinitrd." >&2 > exit 1 > fi >
Under what circumstances is removing /dev/zero a reasonable thing to do?
I would say none. But sadly, it happens on boxes where less than experienced admins sometimes work. I have personally seen it three times. I am not saying it's common. I am saying that mkinitrd will fail without it, so maybe it should be checked for.
This bug is filed against RHEL 3, which is in maintenance phase. During the maintenance phase, only security errata and select mission critical bug fixes will be released for enterprise products. Since this bug does not meet that criteria, it is now being closed. For more information of the RHEL errata support policy, please visit: http://www.redhat.com/security/updates/errata/ If you feel this bug is indeed mission critical, please contact your support representative. You may be asked to provide detailed information on how this bug is affecting you.