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.
Hi everyone..
My computer suddenly stopped booting up normal, (black screen like for hours until it eventually booted...) so I decided to switch over to Ubuntu 6.1 since I had the live cd floating around my room for a while..
I have a 160Gb hdd, in it, I had windows uE v7 and about 50 Gb worth of downloads and aroung 5Gb of my dad's work so I told the live cd to resize my hdd so that it would install ubuntu in a separate partition.. anyway.. I don't know how I ended-up doing it but I accepted the convertion of my WHOLE NTFS harddrive to an EXT3 file system... It was done so quickly I can't believe it reformatted it.. but rather just converted the file system...
but anyway.. when I realised what had happened I rebooted immediatly and it won't even try to startup saying that there is not a valid OS on the hdd.....
I'm in deep sh*t guys.... I don't know what to do..
Is there anyone out there that could give me a hand??
Last edited by Painkiller08; 12-12-2008 at 05:17 PM.
Is there only one partition presently. Usually an install program will have a swap partition as well. If the start and end points of the partition didn't change, perhaps changing the ID of the partition to NTFS and running recovery software might help restore some of the files. Try to repair the filesystem itself. If that isn't possible, you could try testdisk or photorec to recover files of it.
After a disaster like this, it is usually best to save and image of the HD and use the utilities on the image. That way you won't make things worse using the utilities.
It probably didn't destroy the data, just the framework to get to it, since you said it happened so fast you didn't know what happened. I don't know much about windoze anymore, but I'm sure there are NTFS recovery tools out there, if not packaged on the disc, then available online somewhere. Maybe someone else here can help you out more
If you have a Live CD, you should be able to boot on the CD alone, then see what you can see on the unmounted hard drive. The Live CD should have some disk recovery tools. I wouldn't get your hopes up though.
Start with taking an image of that drive - an external won't cost much. Disconnect the external and use it to restore the original to it's current (broken) state if/when you screw up and do more damage.
Then try testdisk to get the old partition layout back. You may then be lucky to get some use out of M$oft recovery console. Else you might have to rely on something photorec to get the files (that are still intact) back.
Search LQ using some of those names I mentioned - quite popular.
No it just means the M$oft installer is too stupid to recognise any filesystem except those M$oft sell. Mind you, the Ubuntu devs have plenty to answer for as well for their installer.
Use the open system tools suggested above.
I would follow the advice of those who have tried it before. Make a cloned image of the HDD and give your rescue project the luxury of not having to be just perfect the first time.
Start with taking an image of that drive - an external won't cost much. Disconnect the external and use it to restore the original to it's current (broken) state if/when you screw up and do more damage.
Personally, I would do any restoration work on the copy (not the original) and keep the original as virgin as possible; including never mounting it, and only using dd to get its contents from now on.
That's the sensible way to do it - but we're dealing with NTFS. If you need windoze to do anything (like CHKDSK) it'll have to be on the internal.
I just find it easier to work on the disk, and restore if necessary when dealing with Redmond. Each to their own
I thank you all for your contributions, but, I have a real problem trying to understand what you are talking about... What is "an image of the harddrive" .. and how do I take it??
I have another harddrive (about 12gb) on which I could try installing winxp or/and ubuntu to see if I can look into my hdd.. I tried looking into it thru the live cd but It didn't appear in the My computer list.. just the dvd writer and dvd reader.. although it did appear in the device manager... :S but it said "Status: Unknown"
I really need this stuff explained to my little by little.. it's the first time I may be dealing with hdd recovery..
Thx anyways
To start with, you need a seperate hard disk to make a copy of the problematic disk (this needs to be big enough to contain the entire disk image so should be at least 160GB in capacity, I would choose a slightly bigger size as not all disk manufacturers agree on what exactly constitues 160GB)
This disk can be either internal or external, but it makes sense to use an external, so that you can disconnect it easily to prevent anything happening to your "safe copy" whilst you try to fix the issue.
Was the initial disk a SATA or PATA/EIDE drive?
If it is a PATA/EIDE drive it is probably either /dev/hda or /dev/hdb
If it is a SATA drive it is probably something like /dev/sda or /dev/sdb
I would advise using a Live CD to do the actual work.
To make a copy:
Boot from Live CD
Attach External Drive (ensuring it is big enough to store the backup) and mount it
Ensure you know which device name is being used for the damaged disk
use DD to make a copy of the device (The Dangerous Bit)
dd is refered to frequently as "Data Destroyer" with good reason. It will do exactly what you ask it to do (even if you didn't mean it)
Assuming that your affected disk is /dev/hda and your spare drive is mounted at /media/external the dd command to make a backup would be:
Code:
dd if=/dev/hda of=/media/external/backup_image
You can then unmount and detatch the External device with your backup and attempt your recovery.
If it is a SATA drive it is probably something like /dev/sda or /dev/sdb
If it is a recent 2.6 kernel that the live cd uses, then the device will look like a scsi device. Some of the code in the kernel was unified and a driver used for pata drives was removed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.