Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
df: cannot read table of mounted filesystems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pavelara
n00b
n00b


Joined: 31 Jan 2010
Posts: 3
Location: Russian Federation

PostPosted: Sun Jan 31, 2010 3:00 pm    Post subject: df: cannot read table of mounted filesystems Reply with quote

I'm installing gentoo following the instructions in the handbook. After chrooting the output of the df command is

Code:
df: cannot read table of mounted filesystems: No such file or directory


This doesn't cause any troubles when I compile the kernel and so on, but at the end of the installation grub fails to install and displays the same output:

Code:
df: cannot read table of mounted filesystems: No such file or directory


As consequence, I can't boot my gentoo system. This happens on my desktop PC. The same on vmware. It's necessary to add that I successfully installed Gentoo several times. The fact is that I don't remember what version of stage 3 tarball I used then. Now I'm using the installation CD ant the stage 3 tarball of 20100126.

Any ideas? thx
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Sun Jan 31, 2010 3:36 pm    Post subject: Reply with quote

Maybe you forgot to mount /proc before chrooting ?
Code:
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # mount -o bind /dev /mnt/gentoo/dev
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # env-update && source /etc/profile


It is possible that the installCD you are using is defective.
The SystemRescueCd will also work.
Back to top
View user's profile Send private message
pavelara
n00b
n00b


Joined: 31 Jan 2010
Posts: 3
Location: Russian Federation

PostPosted: Sun Jan 31, 2010 4:01 pm    Post subject: Reply with quote

Mike Hunt wrote:
Maybe you forgot to mount /proc before chrooting ?
Code:
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # mount -o bind /dev /mnt/gentoo/dev
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # env-update && source /etc/profile

I did exactly like you described.

Quote:
It is possible that the installCD you are using is defective.
The SystemRescueCd will also work.

I doubt it, I'm using an ISO image mounted at vmware. md5 checksum is correct. But I'll try the CD that you advised.
_________________
Chance favours the prepared mind
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54508
Location: 56N 3W

PostPosted: Sun Jan 31, 2010 4:05 pm    Post subject: Reply with quote

pavelara,

Welcome to Gentoo.

Code:
df: cannot read table of mounted filesystems: No such file or directory
Is correct inside the chroot.
The command tries to read /etc/mtab, which is updated by mount as filesystems are mounted and unmounted, but its outside the chroot.

/proc/mounts contains the same information, so you can copy /proc/mounts to /etc/mtab then df works

If you install grub manually - not using grub install, then /etc/mtab is not consulted.
The manual install is documented in the handbook
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pavelara
n00b
n00b


Joined: 31 Jan 2010
Posts: 3
Location: Russian Federation

PostPosted: Sun Jan 31, 2010 5:57 pm    Post subject: Reply with quote

NeddySeagoon, thank you very much, it helped:
Code:
# grep -v rootfs /proc/mounts > /etc/mtab

Then I installed grub without any problems.
And excuse me, I could have read the handbook with more attention. :)
_________________
Chance favours the prepared mind
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Sun Jan 31, 2010 6:42 pm    Post subject: Reply with quote

That's a good one to remember. :)
Back to top
View user's profile Send private message
Maffblaster
Developer
Developer


Joined: 01 May 2007
Posts: 70
Location: Spokane, Washington, USA

PostPosted: Thu Mar 03, 2016 1:19 am    Post subject: Reply with quote

Quote:
/proc/mounts contains the same information, so you can copy /proc/mounts to /etc/mtab then df works


I'll scan the handbook to see is this is still mentioned, but very help and good information, Neddy! I wrote a little entry on my blog because I learned how to resolve this issue today: http://maffblaster.github.io/2016/03/02/today-i-learned-mtab.html
Probably would be even better to symlink /proc/mounts to /etc/mtab:

Code:
ln -s /proc/mounts /etc/mtab


This way when /proc/mounts change, /etc/mtab changes along with it. :)
_________________
Lets make Gentoo better together!
wiki: https://wiki.gentoo.org/wiki/User:Maffblaster
blog: http://dev.gentoo.org/~maffblaster/
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Mar 03, 2016 8:08 am    Post subject: Reply with quote

It's not like openrc isn't telling you about it. https://560060.bugs.gentoo.org/attachment.cgi?id=414008


Make sure you also have set the use flag "libmount" with nfs-utils and update it with it or you'll be in trouble with nfs share.
With libmount nfs-utils will copy (to /run/mount) needed infos that are missing in /proc/self/mounts to handle user (remounting will fail, user will not be able to unmount...).

Everyone suggest to symlink with /proc/self/mounts, /proc/mounts is another symlink to it if you check it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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