Skip to content

Commit

Permalink
do_mounts: add device info to mount message
Browse files Browse the repository at this point in the history
In the past, I used the root=...  command line parameter to specify the
root filesystem to the kernel.  Now it seems that specifying it is not
necessary.  The kernel detects the root filesystem even if the kernel
command line is empty.  My root fs is on a raid1 device by the way, and I
am not using initrd for the boot process.

If the kernel detects the root filesystem somehow, I think it should print
out the result of this detection, otherwise I will not know which device
has the root filesystem.  Or is there an easy way to get this information
on a running system?  I had a quick look at the /proc and /sys
filesystems, but haven't found anything useful there.

Signed-off-by: Marton Balint <cus@fazekas.hu>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Marton Balint authored and torvalds committed Jan 6, 2009
1 parent b61312d commit bca1033
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)

sys_chdir("/root");
ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
printk("VFS: Mounted root (%s filesystem)%s.\n",
printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
current->fs->pwd.mnt->mnt_sb->s_type->name,
current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ?
" readonly" : "");
" readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
return 0;
}

Expand Down

0 comments on commit bca1033

Please sign in to comment.