Busted MBR problems

Linux specific forum
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Busted MBR problems

Post by yrreti »

I use Windows XP pro and had PCLinuxOS installed on two seperate computors.
It uses a nice looking Grub menu boot interface. The problem is that, on
one of the computors, it somehow messed up the MBR. I couldn't get the
windows part back, and had to completely reload windows. And of course
after reloading windows, I could not access the Linux part. This makes me
scared to re install Linux and set up for multi-booting again. This also
happened to me a long time ago when using lilo. I like the Grub interface,
but how can I protect myself from this disaster?

How do you protect yourself from this disaster?
What do you use? Or how would you do this.

I need to some how save the windows MBR, and be able to replace it if it
gets messed up so I could at least get my windows back.
I would like to be able to get the Grub multi boot setup back too, with out
having to reload the linux software again.
The bottom line is that when the MBR gets messed up, it really can mess
you up too!

I would appreciate any input on this as to what you use or do for this
problem.
Thank you for your help and suggestions.
Last edited by yrreti on Mon Apr 06, 2009 6:03 pm, edited 1 time in total.
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 576
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Post by bembulak »

This is completely off topic and has nothing to do with PureBasic, but nevertheless:

http://gag.sourceforge.net/

I us this as a bootloader instead of Grub.
cheers,

bembulak
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Thank you for your reply.

But actually this does have to do with using Purebasic.
Or maybe a moderator could move this to the 'Off Topic' section
if it would be better to ask this question there. Thanks

I want to start learning to write programs for using on linux.
I had installed Purebasic on the one that crashed mentioned above,
and lost it all. If I set it up again, I just want some protective
insurance so I don't loose it all again. I looked at 'gag' in the past,
but saw a lot of problems using it on the forum. I don't know if
those issues have been fixed yet or not. But even using gag.
What can I use, or how can I recover from an MBR crash?
That is the real issue here, and I'm sure that once it has happened
to some others here, they would like to know this too.
I like Purebasic, but I lost several programs that I had been working
on. I'm scared to do it again using linux unless I can find a way to
safely recover it.
GBeebe
Enthusiast
Enthusiast
Posts: 263
Joined: Sat Oct 09, 2004 6:52 pm
Location: Franklin, PA - USA
Contact:

Post by GBeebe »

Backups :wink:
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 576
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Post by bembulak »

A broken MBR happens once in a while, yes. But if it happens more often than the day you're setting up your OS (no matter if it's Windows or Linux), then you're doing something completely wrong.

And still I don't see the connection between a broken MBR and PureBasic. Imagine what would happen, if every Joe Programmer would write a thread in the Windows section, just because GTA IV doesn't work on his box, but he wants to code such a game in PureBasic as well?

Nevertheless: If you really can't get along with installing and using Linux and constantly crashing your MBR, you should read more about the basics.
http://www.aboutdebian.com/
http://www.us.debian.org/doc/index.en.html
http://www.tldp.org/LDP/gs/gs.html
http://www.ibiblio.org/pub/Linux/docs/l ... ers-guide/

Last but not least some usefull tips:
If you're afraid of saving you Linux Sourcc Codes on Linux - save them on your NTFS or FAT partition if you have a dualboot system. So you can still access the files from within windows.
Or use a Virtual Machine instead of a real installation. So it's sandboxed.
Or use Wubi
http://wubi-installer.org/

And make backups. ;)
cheers,

bembulak
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4792
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

yrreti

EXT2IFS

Accesses a linux partition from windows. Intalls as a native driver. Free.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

bembulak
And still I don't see the connection between a broken MBR and PureBasic.
The reason I thought this would be a good place to ask this question here,
is that in the other sections, most people just use Windows and write Purebasic
programs for that. While here most people use both Linux and Windows, and
write Purebasic programs for both. This group here, would have had the
greatest posibility of this problem happening to them at one time or another.
So I thought it would be a good place to ask this question.
A moderator can move this if he wants, to maybe the Off Topic section.

I want to thank you for the good Links you listed, as well as the excellent
idea of saving those files in the Windows partition instead, but better to
even save them on a common drive w/o operating systems installed on it.


Fangbeast

Thank you for the tip about using EXT2IFS to access a linux partition from windows.
I was using that before, but lost it when I lost my Windows partition. But it's
a good program to use, and I see it's been updated.
http://www.fs-driver.org/faq.html
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4792
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Fangbeast

Thank you for the tip about using EXT2IFS to access a linux partition from windows.
I was using that before, but lost it when I lost my Windows partition. But it's
a good program to use, and I see it's been updated.
http://www.fs-driver.org/faq.html
Yes, it's come in very useful over the years.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Marlin
Enthusiast
Enthusiast
Posts: 406
Joined: Sun Sep 17, 2006 1:24 pm
Location: Germany

Post by Marlin »

I do not consider an overwriten MBR to be a disaster,
if the following conditions are met:

- I can access that computer disk with tools like gparted live cd and/or some other Linux live cd
- The disk (including MBR) is not damaged = you can write a new MBR
- I have noted down or can reconstruct the partition boundaries...

If only the partition table would be gone, I would simply recreate it with Linux fdisk,
using f.e. my notes about the partition boundaries, boot partition ...

If the boot code of the MBR is also gone, I would first restore that,
using maybe gparted live cd or a recent version of windows fdisk.
(The fdisk that comes with FreeDos might be even more handy. You could possibly boot it from floppy disk.)
The command for Windows fdisk would be "fdisk /mbr" or you could use the WinXP recovery tool "fixmbr".

I usually do not touch the MBR when using grub, but use the boot block of a primary or maybe extended partition for setting up grub.
This partition would then be set as boot partition (with Linux fdisk).
If I would want to temporarily disable grub, I would simply set my windows partition as boot partition instead of the one with grub.
(Then I could not boot Linux, so I usually do not do that ;-))

If you know, you want to use grub, you can of course set it up in the MBR.

You should know how to use grub and what partitions boot what os,
then you can also boot them using grubs command line.
(No matter whether grub was loaded from your hd or from floppy and no matter whether you do have a boot menu or not.)

Maybe the following could give you a better idea about grub:
http://www.linuxfromscratch.org/lfs/vie ... /grub.html
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

I've always been using either OSL2000 or Vamos, and always made sure the different OS'es are hidden from each other. After any of them did an overwrite of the boot sector I simply reinstalled my multiboot selector which fixed it nicely.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply