Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Dear all,
I'm not even sure if this is right forum where i should post my query. But here is my problem (hope someone can help)
I have a 160Gb Hard disk, with two partitions one had windows 2000 Pro and the other Linux Fedora Core 2. Grub was the boot loader.
I've installed cygwin under win2k. I wanted to create a Linux bootable USB Stick, and so used dd command (dd if=bootdisk.img of=/dev/sda) from the bash within cygwin. But what it actually did was to write the bootdisk.img in the sector 0 of the local hard disk. When i rebooted the system, keep getting the error "BOOT ERROR" and nothing else
When i used the GPARTD Live CD it dose not recognise any of the partitions on the Disk.
I know all the data is there in the disk and safe for the moment, is there any way i can load an external boot loader and provide instructions to load either the windows or Linux to it. If possible let me know about it.
If not Please suggest an alternative method of restoring my HD without having to reformat. If this is possible.
How long did dd go before stopping? And how large was the bootable image?
The MBR is very small (512K, if memory serves), so if you wrote a ~30MB image to the drive starting with the MBR, you would have overwritten the MBR, partition table, and a good deal of the first partition on the disk.
In other words, you totally toasted the thing. Unless you have a backup of the partition table somewhere, recovery is probably beyond being practical. Even if you have the partition table backed up, you still will have lost some data.
That's 512 bytes (one sector).
Fixing the partition table is generally pretty easy, recovering a filesystem that has been trampled on is less so. *Especially* if it's NTFS - I've never had any real luck. You might get away with something like photorec or foremost. Search these fora - you will need plenty of spare time.
The data was only 4.58MB but looks like it created a partition of 12MB. DD returned almost immediately. Even after return from dd, the windows are running for another 10mnts before i rebooted the system.
That's 512 bytes (one sector).
Fixing the partition table is generally pretty easy, recovering a filesystem that has been trampled on is less so. *Especially* if it's NTFS - I've never had any real luck. You might get away with something like photorec or foremost. Search these fora - you will need plenty of spare time.
I've used some of the data recovery tools to check the basic sanity of the NTFS, looks most of the data is there.
Try testdisk to recover the second partition, then define another (dummy) partition to cover the rest.
- If the NTFS partition was first on the disk, then Fedora should be o.k. From the Fedora CD you can then recover grub and/or chroot into your disk install. From there is a matter of harvesting what data you can from the NTFS partition.
- If the Fedora partition was first on the disk, then NTFS should be o.k. - use the FC CD to set the NTFS as bootable (after testdisk), then boot the Win2k CD and run fixmbr from recovery console. If you were using LVM, I have no idea how you can get your Fedora system back if it was trampled on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.