Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This 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.


  Search this Thread
Old 01-18-2005, 06:37 AM   #1
LQ Newbie
Registered: Jan 2005
Location: India
Distribution: Redhat 9
Posts: 1

Rep: Reputation: 0
formatted my c:, linux boot data lost, how could i recover


I had a dual os. Redhat 9 and win98. After sometime i formatted my primary partition C:. I lost my bootrecord about my Redhat 9.How could i recover the boot record and how could i add the previously installed Redhat 9 without reinstalling it.

Can anybody help me?
Old 01-18-2005, 06:56 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657Reputation: 657
If you didn't delete the c:\ drive (hda1) then the information used for lilo or grub hasn't changed (except for the windows entry which you can remove if you want). You need to boot up into the rescue system. Then you need to mount you file system under /mnt. Mount the root partition first. Then you can read the /etc/fstab file to help you mount the other partitions needed.
2) Next, use the chroot command. chroot /mnt.
3) To set up the root accounts normal paths enter: bash -l. This starts up the login shell which will set up the aliases and paths.
4) If you want to do this now, remove the stanza for booting windows, since it no longer exists. (/etc/lilo.conf for lilo and /boot/menu.lst or /boot/grub/menu.lst for grub.
5) Execute the command to rewrite the MBR. For lilo /sbin/lilo. For grub [/b]/usr/sbin/grub-install[b].
6) Watch the output of the command. For example, if there is an error in /etc/lilo.conf, the lilo command or a drive device doesn't exist, lilo will complain and the MBR will not be replaced. So you need to make sure that the last step worked before trying to reboot.
7) Reboot and cross your fingers.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
recover data from formatted hdd sebastiano Linux - General 5 03-27-2006 08:40 AM
How to recover data on a RAISERFS formatted harddisk compghod Linux - General 2 03-19-2005 06:43 AM
How to recover data on lost partitions Red Squirrel General 12 03-20-2004 12:37 PM
Data Lost! Is It Possible To Recover? rddreamz Linux - Newbie 3 11-17-2003 10:15 PM
Partition formatted, mount points, data lost eneko Linux - Newbie 7 11-16-2003 08:46 PM

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration