Skip to content

Commit

Permalink
[PATCH] Improper initrd failure message at boot time
Browse files Browse the repository at this point in the history
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 torvalds#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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jay Lan authored and Linus Torvalds committed Jun 30, 2005
1 parent 1c71e22 commit f220ab2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion init/do_mounts_initrd.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ static void __init handle_initrd(void)
printk("okay\n");
else {
int fd = sys_open("/dev/root.old", O_RDWR, 0);
printk("failed\n");
if (error == -ENOENT)
printk("/initrd does not exist. Ignored.\n");
else
printk("failed\n");
printk(KERN_NOTICE "Unmounting old root\n");
sys_umount("/old", MNT_DETACH);
printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
Expand Down

0 comments on commit f220ab2

Please sign in to comment.