Skip to content

Commit

Permalink
[PATCH] root mount failure: emit filesystems attempted
Browse files Browse the repository at this point in the history
When we fail to mount from a valid root device list out the filesystems we
have tried to mount it with.  This gives the user vital diagnostics as to
what is missing from their kernel.

For example in the fragment below the kernel does not have CRAMFS compiled
into the kernel and yet appears to recognise it at the RAMDISK detect
stage.  Later the mount fails as we don't have the filesystem.

  RAMDISK: cramfs filesystem found at block 0
  RAMDISK: Loading 1604KiB [1 disk] into ram disk... done.
  XFS: bad magic number
  XFS: SB validate failed
  No filesystem could mount root, tried: reiserfs ext3 ext2 msdos vfat
    iso9660 jfs xfs
  Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed May 15, 2006
1 parent 3835a9b commit be6e028
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ void __init mount_block_root(char *name, int flags)

panic("VFS: Unable to mount root fs on %s", b);
}

printk("No filesystem could mount root, tried: ");
for (p = fs_names; *p; p += strlen(p)+1)
printk(" %s", p);
printk("\n");
panic("VFS: Unable to mount root fs on %s", __bdevname(ROOT_DEV, b));
out:
putname(fs_names);
Expand Down

0 comments on commit be6e028

Please sign in to comment.