Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
- what caused this?
- is the partition mounted read-write?
- if it is an ext2/ext3 partition, do files have extended attributes set? (lsattr)
- what is the exact error you get for each of chown/chmod/rm?
The system was running fine, and after a reboot, it kernel wouldn't boot, it kept halting at checking a disk. Eventually, it came up and said I had to run fsk manually. I did, and I had to "fix" files about 1,000 times. After that, I had these files messed up. I could try fdisk again.
It is a ext3 partition, mounted as read/write, not sure about extended attributes.
The system was running fine, and after a reboot, it kernel wouldn't boot, it kept halting at checking a disk.
*Something* must have happened for this to occur. Errors like these don't pop up all by themselves. If you are sure you did *nothing* (with all due respect but I can't imagine that), do your syslog files hold any clues?
Check the state of the partition with "tune2fs -l /dev/partitiondevicename | grep state:". If it says "clean" then running fsck again should not be necessary.
Check SELinux is disabled setting "selinux=disabled" in /etc/sysconfig/selinux if you boot a SELinux-enabled kernel (or use setenforce 0).
Check extended file attributes with "lsattr".
Check the directory being chowned root first, then chmodded 0700 before you try to delete files inside an unowned directory. If it still gives errors please give output for a single file this way:
ls -alZ filename 2>&1 | tee /tempdir/file.log
lsattr -a filenname 2>&1 | tee -a /tempdir/file.log
stat filename 2>&1 | tee -a /tempdir/file.log
* Since you're running an RPM-based distro we could try to recover files if 0) they are part of a package, and 1) if your RPM databases in /var/lib/rpm are OK and 2) if the files in lost+found are OK. The remainder we can probably recover running "file" and reading them. Start by dumping the contents of the RPM database to file:
"rpm -qa --dump > /tempdir/rpmsums.log". If the subject is a file then the fourth field will be the MD5sum.
Now md5sum the contents of /lost+found: "md5sum /lost+found/* > /tempdir/lostsums.log". If the subject is a file then the second field will be the MD5sum. Now compare for sums and if you have a match you'll have 0) verified the content of the file is unchanged and 1) the name, rights and location. Need a script for it? :-]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.