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.
well, i had no luck with gpart, testdisk, and fixdisktable. however, rescuept gave me some decent info. partitionmagic 8 gave me nothing. i can't believe the little 10 sec command took out the entire disk.
you see, i had a dual boot with winnt4 and redhat 7.3. i needed usb support so i thought this would be a great time to upgrade to win2k - takes too long in linux to get usb up and running. i did the upgrade but i had problems with grub. so i said why not wipe out grub. i tried the dos fdisk /mbr method but since my partition was 6gig ntfs, it would not work. so i looked for a linux way to wipe mbr. well the newsgroups gave me a great way! all i wanted was a way to use my usb2 sandisk drive so i could read some docs off it and get ahead in my job. i should have not gotten out of bed today.
That's the danger of trying stuff as root.
I feel your pain though, a long time ago I had something similar.
I sure hope nothing important was on that disk, always take backups.
If you had run lilo before doing that then in /boot there is a backup of the bootsector. I'm not sure what the number would be for sda but for hda it would be /boot.0300
The partition table is is between bytes 447 - 512 the first part would be lilo. If you do a dd if=/boot/boot.0300 of=/dev/hda then you will uninstall lilo. But thats easy to fix, just run lilo again.
/dev/sda looks empty to the os. i ran gpart, rescuept , etc by moving the disk to another linux box since i would boot off the scsi disk. so would the scsi version of
Even though lilo makes a backup of the bootsector I usually make another 1 or 5 backups and keep them on other partitions, or windows partitions or even floppy.
In your case you rebooted which made the drive unreadable. But if you had access to a backup bootsector you could have saved yourself alot of work.
For future reference, you could have undone the oops like this:
lilo -u # That would put the original bootsector (with the partition table) back on the drive.
lilo # This would reinstall lilo since the first command removed 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.