Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't access mtab!
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
EEPS
n00b
n00b


Joined: 05 Apr 2005
Posts: 69
Location: Chico, CA

PostPosted: Tue Aug 29, 2006 1:54 am    Post subject: Can't access mtab! Reply with quote

Hi, I am just setting up a little gentoo server box and everything is going great. All of the sudden, I noticed that I can't seem to access /etc/mtab or anything that uses it. if I try to read /etc/mtab I get:

Code:

mtab: Input/output error


This happens any time I try to look at the file, including ls /etc/mtab, file /etc/mtab. Not only that, I can not mount anything! Is this a file system error? or what....

*Update
I also can not do "df -h" presumably because it looks at mtab for this info...
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4733
Location: Angra do Heroísmo (PT)

PostPosted: Tue Aug 29, 2006 1:57 am    Post subject: Reply with quote

Hi.

Do you get this inside the chroot? If so, did you mount /proc under the chroot and did cat /proc/mounts > /etc/mtab?
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
EEPS
n00b
n00b


Joined: 05 Apr 2005
Posts: 69
Location: Chico, CA

PostPosted: Tue Aug 29, 2006 2:38 am    Post subject: Reply with quote

So, I could not remember if I did what you said and I decided to try it again anyway. I booted a live CD, chrooted and tried grep -v rootfs /proc/mounts > /etc/mtab as the gentoo handbook suggests. It also had the same error writing to mtab. So it would appear as if I can not write to that file at all.... I am wondering if it may be a fs error. I started an fsck, I will let you know how it goes....
Back to top
View user's profile Send private message
EEPS
n00b
n00b


Joined: 05 Apr 2005
Posts: 69
Location: Chico, CA

PostPosted: Tue Aug 29, 2006 3:04 am    Post subject: Reply with quote

I did an fsck and it fixed a bunch of errors. I hope none were to serious. I think I accidently hard rebooted my computer once and it may have caused the dammage. I will run some drive checks to make sure the HD is ok. -Thanks
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4733
Location: Angra do Heroísmo (PT)

PostPosted: Tue Aug 29, 2006 3:26 am    Post subject: Reply with quote

Just make sure that you're not trying to update /etc/mtab outside of the chroot. You won't be able to do that as that is a file in the cd-rom. What you need is to mount your partitions under /mnt/gentoo and to update /mnt/gentoo/etc/mtab.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Tue Aug 29, 2006 10:01 am    Post subject: Reply with quote

actually, you could just aswell symlink /etc/mtab to /proc/mounts . i always do it on my systems, and it works nice :D
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Wed Jun 27, 2007 2:13 pm    Post subject: /etc/mtab : Input/output error Reply with quote

genkernel 2.6.19-gentoo-r5. Just set it off and sat back ( :wink: )
Im trying to recover some stuff off a WinXP HD
Code:
skippy paul # fdisk /dev/hdb

The number of cylinders for this disk is set to 24321.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1       24320   195350368+   7  HPFS/NTFS

Command (m for help): q

skippy paul # mount -t ntfs /dev/hdb1 /mnt/hdb/
mount: can't open /etc/mtab for writing: Input/output error


FWIW I havent got an /etc/mtab file

Code:
skippy paul # ln -s /proc/mounts /etc/mtab
ln: accessing `/etc/mtab': Input/output error
skippy paul #


How do i get access to the HD ?
_________________
join the optout - http://nhsconfidentiality.org
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