Jump to content
  • Advertisement
Sign in to follow this  
__filip

Lost bootloader... and filesystem?

This topic is 5462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I hope there are any linux gurus here who can help me with this. I'm dualbooting between Linux Slackware (10.0) and Windows98 SE using LILO. Yesterday when running windows Norton Antivirus told me the MBR of my windows/linux drive had changed. I was pretty sure that i hadn't got any virus (My windows installation still works fine) but it still struck me as odd, because i hadn't done anything lately that would have changed the MBR. So I chose to restore the MBR from a previous backup, of course knowing I would lose my bootloader. The bootloader was removed, no big thing (or so a thought), so I used the 2nd Slackware disk as a rescue disk to boot a linux system where I could reinstall LILO. The problem is, when I try to mount my linux partition (hda2) with the following command: mount -t reiserfs /dev/hda2 /mnt/ linux tells me "wrong fs type, bad option or bad superblock". Well simply put, the kernel doesn't recognise my reiserfs partition. So my question is, Why? and How can I regain access to my linux partition? I mean the filesystem is AFAIK not stored in the MBR so it can't have been damaged, can it? PS: I have also tried to boot with a knopix CD and a boot floppy, without success.

Share this post


Link to post
Share on other sites
Advertisement
I assume that is infact not where your data is or it actually isn't reiserfs. Or maybe the slackware kernel doesn't support reiserfs, but I doubt that's the case. So basically what __tunjin__ said. Use fdisk and make sure everything is what you expect it to be.

Share this post


Link to post
Share on other sites
The MBR (the very first sector of the disk) contains the partition table (but not the extended partition table). If you re-partition, or use an automatic partition re-sizer, then that counts as "changing the MBR".

It sounds as if the partition table in your restored MBR doesn't match the actual layout of data on the disk. If you haven't actually run any of the OS-es on the disk since then (i e, only booted from CD), there's a chance you can re-create the old partition table by searching for the specific data of the superblocks of your file systems. If you've booted one of the Os-es, it's possible that that OS has used the faulty partition table to tromp all over our other partition.

No biggie, though; you can probably just recover by restoring from your most recent backup, so you shouldn't have lost more than a day or two.

Share this post


Link to post
Share on other sites
Running fdisk showed me the following:

Disk /dev/hda: 160.0 GB

Device Boot Start End Id System
/dev/hda1 * 1 16709 c W95 FAT32 (LBA)

Clearly only the first partition (The one with windows) is present. I guess the partitiontable was restored to some intermediate state where the second partionen wasn't created yet. I haven't accessed hda2 from linux (obvious) so the data stored there shouldn't be damaged. But how can I restore it, I mean do I have to manually edit my MBR or something? (sounds scary, eh). You have any ideas?

Well, I'll just be looking for some free partiton recover utility, with support for reiserfs then.

My deepest thanks to you guys!

Edit: Yay, it works!! I used a utility called testdisk to restore the partition. Then I simply used the rescue disk to reinstall lilo.

[Edited by - __filip on October 7, 2004 12:41:04 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!