Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What partition is root mounted on?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5227
Location: France, Old Europe

PostPosted: Fri Aug 09, 2013 9:04 am    Post subject: What partition is root mounted on? Reply with quote

This is not new but it's just annoyed me enough to try to find an answer.

Why do mount and df no longer tell we what partition root fs is mounted on. Isn't that kindof important info? Since the point of mount command is to tell me what is mounted and where , why does it hide that information for the most important partition on the system.
Code:

#dfh
Filesystem     Type     Size  Used Avail Use% Mounted on
rootfs         rootfs    14G   13G 1008M  93% /
/dev/root      ext4      14G   13G 1008M  93% /

mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (rw,noatime,nodiratime,commit=0)


So all I get told now is some pseudo device /dev/root instead of where it really is, like physically.

If I'm going to pull out a disk I need to know where things REALLY are not pseudo device names.

What it is the idea behind this evasiveness and what commands still give me the vital information I need to administer the hardware?

TIA, Genree. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
Navar
Apprentice
Apprentice


Joined: 20 Aug 2012
Posts: 222

PostPosted: Fri Aug 09, 2013 11:07 am    Post subject: Reply with quote

I thought this was udev related, devtmpfs, or just plain kernel (VFS) changes. I forget and couldn't find some of the threads in the past regarding why mount was no longer indicating or resolving what was actual /.

So here's some quick possible alternatives (some may not work for fancier setups or other distros):

1. cat /proc/cmdline
2. ls -l /dev/root
3. dmesg | grep root=/

4. Or more low level,
Quote:

$ stat /
File: ‘/’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 808h/2056d Inode: 2 Links: 21
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-07-03 02:20:21.742151254 -0600
Modify: 2013-07-03 03:51:57.945000682 -0600
Change: 2013-07-03 03:51:57.945000682 -0600
Birth: -

Or just stat -c %D /

Corresponds with major, minor values in /dev/sda8:
brw-rw---- 1 root disk 8, 8 Aug 8 13:38 sda8

You might also try busybox's rdev command, though that didn't seem functional for me (maybe wasn't built in).

Or mount may show you anyway as mine currently seems to be, rootfs -> / followed by next line having /dev/sda8 -> /. Same with df with 2 lines for rootfs and /dev/xyz -> /. Maybe you're using an initrd/initramfs?
Back to top
View user's profile Send private message
Navar
Apprentice
Apprentice


Joined: 20 Aug 2012
Posts: 222

PostPosted: Fri Aug 09, 2013 11:20 am    Post subject: Reply with quote

This isn't the thread I remember which I believe gave full reasoning behind why mount/df weren't showing actual /, but it still has some useful information:

https://forums.gentoo.org/viewtopic-t-689017-start-0-postdays-0-postorder-asc-highlight-.html
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5227
Location: France, Old Europe

PostPosted: Fri Aug 09, 2013 11:44 am    Post subject: Reply with quote

Thanks. Very helpful.

so bottom line is : to find the real root fs device:

Code:
ls -ail /dev/root


8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.

AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum