aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Lan2005-06-30 04:59:03 -0500
committerLinus Torvalds2005-06-30 10:45:12 -0500
commitf220ab2a5162c35cca6993ea473937cfc962fce4 (patch)
tree4d9d1a199625d8b657a69d9afeed17c0dbb02a10 /init/do_mounts_initrd.c
parent1c71e22e4e4b4e7261f147635518d5634136c226 (diff)
downloadkernel-f220ab2a5162c35cca6993ea473937cfc962fce4.tar.gz
kernel-f220ab2a5162c35cca6993ea473937cfc962fce4.tar.xz
kernel-f220ab2a5162c35cca6993ea473937cfc962fce4.zip
[PATCH] Improper initrd failure message at boot time
On system boot up, there was an failure reported to boot.msg: <5>Trying to move old root to /initrd ... failed According to initrd(4) man page, step #7 of BOOT-UP OPERATION is described as below: 7. If the normal root file has directory /initrd, device /dev/ram0 is moved from / to /initrd. Otherwise if directory /initrd does not exist device /dev/ram0 is unmounted. We got service calls from customers concerning about this failure message at boot time. Many systems do not have /initrd and thus the message can be changed in the case of non-existing /initrd so that it does not sound like a failure of the system. Signed-off-by: Jay Lan <jlan@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init/do_mounts_initrd.c')
-rw-r--r--init/do_mounts_initrd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index 4def882d0b31..a05cabd0fd10 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -86,7 +86,10 @@ static void __init handle_initrd(void)
86 printk("okay\n"); 86 printk("okay\n");
87 else { 87 else {
88 int fd = sys_open("/dev/root.old", O_RDWR, 0); 88 int fd = sys_open("/dev/root.old", O_RDWR, 0);
89 printk("failed\n"); 89 if (error == -ENOENT)
90 printk("/initrd does not exist. Ignored.\n");
91 else
92 printk("failed\n");
90 printk(KERN_NOTICE "Unmounting old root\n"); 93 printk(KERN_NOTICE "Unmounting old root\n");
91 sys_umount("/old", MNT_DETACH); 94 sys_umount("/old", MNT_DETACH);
92 printk(KERN_NOTICE "Trying to free ramdisk memory ... "); 95 printk(KERN_NOTICE "Trying to free ramdisk memory ... ");