Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
I have the following problem: I wanted to create a kde-devel account on a different partition than the one my system (Ubuntu Feisty) is installed on. So I mounted the partition as /media/dev7, and then did a
Code:
sudo mount /media/dev7 /home --bind
Not knowing what I just did, I added a new user "kde-devel" and created the new home dir in /home/kde-devel, not noticing that my own one (/home/joh) was gone...
So, after some time, I did notice it, and looked for a tool to recover folders on ext3. Apparently, it's not possible since ext3 completely zeroes out the files and folders, instead of just marking them as free space on the hdd.
But in my case, I did not use "rm".
I could figure out the inodes of all the (now invisible) folders, including /home/joh, and all the subdirs using a little tool called "giis", even though it's only able to recover files deleted after the installation.
Is there a way to undelete/recover a folder if I know its inode?
I guess all you can do is get photorec. If it's your personal data you're after, you should find it quite reliable (although far from perfect with multimedia files as I found out). It doesn't recover folders, only individual files. The original names are lost so there will be quite a bit of sorting if you had many files; on the other hand, photorec allows specifying the exact sort of files you need to recover. And yes, ext3 is a bit problematic in such a case but it's usually not as bad as it sounds.
Is there a way to undelete/recover a folder if I know its inode?
The way I understand you, your files have not been deleted at all. You just mounted another partition on top of them. If you unmount your current /home, the old files will be accessible again. Move them to a temporary directory (outside /home obviously), then remount /home.
The way I understand you, your files have not been deleted at all. You just mounted another partition on top of them. If you unmount your current /home, the old files will be accessible again. Move them to a temporary directory (outside /home obviously), then remount /home.
I think you're right. It sounds like the original /home directory contents are hiding under the mounted partition.
Yes, rupertwh is correct. The kde-devel account doesn't need to have its home directory under /home. You could have a /home2 directory and use that. As long as the /etc/passwd entry has /home2/kde-devel as the homepage, it would be fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.