Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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'm a true newbie to Linux and not a "computer-person" at all. I've screwed up my hard disk fiddling with a partition for Windows. All my own fault. I'll try to explain how it happened and what is my situation now (all data lost?) probably in not a very technical way, but I'll try to give as much detail as I can think of. If there is any further info that I can provide, just ask, please. But bear in mind that outside a graphical environment I find myself quite lost, I'm afraid.
I could not install Windows in a partition I made to that effect because its setup program would not recognize a XP-compatible partition. That doesn't bother me anymore, I can live with that. But since Windows setup reformatted the /mnt/windows partition Linux could not boot. So I got the Mandrake 9.0 installation CD and tried to fix that (why should I'd thought I could do so, I don't know).
I had originally allocated 5Mb to Linux in the root partition. Then there was the small swap partition, 10Mb for Windows and 25Mb for my data that was mounted on “/home”.
At the stage of choosing the new partitions or keep those existing ones I believe I made a mistake. I formatted the windows partition again so it would not give me any more problems starting Linux (I left installation of Windows for a better occasion). But then I forgot (read, “I was so stupid as to not”) setting the 25Mb partition properly so the data was kept in place. Obviously, at the end of installation I found that all my data was no longer there, in the “/home” folder. Gone. (I have my regular backups, but unfortunately last week was especially productive...)
I read some documentation and help files on the Internet and learned that there won't be a chance of recovering my data if I had done a hard drive format. Then found some software that claims that can recover data even after the hard drive has being formatted, but seems to run under windows even if you are trying to recover a Linux hard drive. That's a choice, although I'll have to get me someone that can work that out.
But then I realised (I'm still not used to the whole mount/partitions thing), that KDiskFree only showed two of the partitions:
That is, my other drive, hda3, the one with the data, did not appeared there, nor even empty. In my ignorance, and in an exercise of wishful thinking I considered the possibility of my data being still actually there, somewhere in the hard drive, but just hidden from the system. After all, I just asked Mandrake installation to format hda6.
My question, finally, is, Is it possible that my data is still there? I've tried to determine the mount point of the partition in “/home”, to check whether I just had left the system blind to that partition, but DiskDrake said that if I format the partition (although I just added the mount point) all data in the partition will be lost. If there is the slightest chance of recovering my data, I don't want to repeat the mistake. What should I do (apart from more frequent backups and avoid fiddling with what I do not understand)?
What you need is a stable system to run so that you can examine all of your partitions to see what is there and what is not. I recommend using one of the CD based Linux systems such as knoppix. As a second choice you could try a bootable floppy system like tomsrtbt. knoppix is better than tomsrtbt because it has more software available on it. Also with knoppix you can do at least part of your work from a GUI whereas tomsrtbt is all command line (and has much less software available for your use).
Boot knoppix. Then, one by one, mount each of your hard disk partitions and try to list the files there.
Another alternative is to boot your install CD and look for a rescue function instead of using the installer. I don't know whether the Mandrake install CD has a rescue function or not. If it does then you could use that to inspect all of your partitions.
Once you find out what data you still have and where it is then you can work out a reasonable recovery plan.
Fortunately I already had Knoppix around, so I'll try that now.
I just realized that in my first message I've talked several times of Mb when I wanted to say Gb. A 40 Gb hard drive is new and far toooo big for me yet :-)
I started Knoppix from my CD-Rom and it automatically detected the hda3 partition that I was missing, and all the data was there. Yes!
Now I'm not sure where to go from here.
To make a backup of my data in cdroms I have a problem because Knoppix is running from the cd drive. I can try to set up a friend's usb cdrw, but I have had awful experiences with usb and Linux, and anyway I do not know how to get to su mode in Knoppix, it keeps asking me for a root password I didn't set in the first place.
And I couldn't find any CD-writing application in Knoppix anyway, so even if I copy Knoppix to my HD and run it from there, I don't know if I should try to execute from Knoppix the programs installed in Mandrake. (???)
I'm talking about standar CD-rom burning here because I've always done it like that, I'm not familiar with backup applications. Maybe there there is the answer, but I'll need some piece of advice on that.
Or maybe I'm just making things too complicated. Now I'm know the data is there, how can I mount that unmounted, but already formatted partition without losing the data, as DiskDrake says it will happen? Or can I make a backup from Mandrake of a partition it cannot see into?
"Or can I make a backup from Mandrake of a partition it cannot see into?"
From your description in your first post I though that you did not have a working Linux system other than the install CDs. If you have a working Mandrake system which ignores /dev/hda3 then boot your Mandrake system, login as root or su to root, then issue these commands:
mkdir /aristotle
mount /dev/hda3 /aristotle
and you can access your data through /aristotle. If you want you can put a line in /etc/fstab which will automatically mount /dev/hda3 every time you boot:
/dev/hda3 /aristotle ext2 defaults 1 2
"And I couldn't find any CD-writing application in Knoppix anyway, so even if I copy Knoppix to my HD and run it from there, I don't know if I should try to execute from Knoppix the programs installed in Mandrake. (???)"
Knoppix is designed as a general purpose system. You can built a special purpose CD system that functions as a better rescue CD by using LifeBoat:
Thank you, Steven. Everything is allright now: Mandrake can look into the data now and these are being burned into cds as I write.
I don't understand why a command line can determine a mount point so easily while doing the same with DiskDrake implies erasing existing data. But there you go...
I know mine may have seemed a stupid problem for you, but I wouldn't have solved it on my own in a lifetime. And now I know a bit more about Linux. Thanks a lot.
"I don't understand why a command line can determine a mount point so easily"
That is the power of the command line. Unix has a large number of simple commands that can be used in very powerful combinations. Unfortunately they are hard to learn and poorly documented. I suggest that you force yourself to read all of:
man mount
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.