Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot delete non-existent file weirdness!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
woZa
Guru
Guru


Joined: 18 Nov 2003
Posts: 340
Location: The Steel City - UK

PostPosted: Wed Nov 10, 2004 11:50 am    Post subject: Cannot delete non-existent file weirdness! Reply with quote

Running emerge sync always gives me this error
Code:
/usr/portage/metadata/cache/x11-misc/p': No such file or directory


And it's right. It isn't there! So I figured I'd
Code:
rm -R /usr/portage/*
and rebuild portage with and emerge sync but again
Code:
rm: cannot remove `/usr/portage/metadata/cache/x11-misc/p': No such file or directory


WTF is going on...???!? :?
Code:
chown -r root:root /usr/portage/
same problem....

I am truly confused.
_________________
A few months struggling with gentoo is better than a lifetime struggling with windoze!
Back to top
View user's profile Send private message
gearmonk
n00b
n00b


Joined: 30 Oct 2003
Posts: 43

PostPosted: Wed Nov 10, 2004 3:27 pm    Post subject: Reply with quote

Issues like this usually point to some corrupted data on that part of your disk. Boot to single user mode, or use a livecd, and run a scan on the partition where your /usr/portage lives with the appropriate tool for your filesystem. If you need other help, post back with which type of filesystem you are using, though on a hunch I'm going to guess it's ReiserFS, since it's done that to me as well.
Back to top
View user's profile Send private message
woZa
Guru
Guru


Joined: 18 Nov 2003
Posts: 340
Location: The Steel City - UK

PostPosted: Thu Nov 11, 2004 12:00 pm    Post subject: Reply with quote

Thanks for your reply. I have managed to check all partitions except /usr & /(root) - (/var & /home had errors on them which reiserfsck --rebuild-tree managed to fix).

The pc is a remote one that I can only access via ssh and I am stumped as to how to unmount /usr. Killed/stopped all processes that I can but still device is busy. How do I boot to single user mode?

Thanks for your help so far...
_________________
A few months struggling with gentoo is better than a lifetime struggling with windoze!
Back to top
View user's profile Send private message
gearmonk
n00b
n00b


Joined: 30 Oct 2003
Posts: 43

PostPosted: Thu Nov 11, 2004 12:06 pm    Post subject: Reply with quote

You need to be sitting at the machine to boot to single user mode, since it only allows you to login locally. You can try using lsof to figure out what processes are accessing /usr. Check 'man lsof'
Back to top
View user's profile Send private message
MagnusBerg
Guru
Guru


Joined: 07 Oct 2003
Posts: 370
Location: Burgsvik, Gotland, Sweden

PostPosted: Thu Nov 11, 2004 6:40 pm    Post subject: Reply with quote

A lasy solution is to rename the old /usr/portage, make a new one and emerge sync until you feel for doing "reiserfsck --rebuild-tree managed". After that process all files on the partition will be placed in a lost+found directory and you will need to move them back too the toplevel manually to make the system work again..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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