How to revert to original mbr using grub4dos?
How to revert to original mbr using grub4dos?
Hi all,
I installed Lucid Puppy on my E drive after formatted it to ext2, leaving winXP on my C drive.
I also installed Grub4dos as a bootloader.
When installing Grub4dos, it said it there was an option to restore the original MBR.
At the time I stupidly didn't write down the thing it told me to do in order to go back to the original MBR, thinking I could just google it if I wanted to do this.
Anyway, I can't find anywhere how to restore this backup with whatever command I need, and I'm hoping that someone here will be able to help me.
I've tried using Windows Recovery COnsole on WinXP CD, but I just get a blue screen with WIndows Set Up as a title and no other options. My intention if I'd had options was to use fixmbr command in the hope of going back to windows only, and just using the puppy linux live Cd instead of having it as a dual boot on my hard drive.
Anyway,
I am hoping someone can give me clear instructions to guide me to restoring my backed-up copy of my original master boot record, using the terminal commands.
(this is driving me completely bonkers btw)
I installed Lucid Puppy on my E drive after formatted it to ext2, leaving winXP on my C drive.
I also installed Grub4dos as a bootloader.
When installing Grub4dos, it said it there was an option to restore the original MBR.
At the time I stupidly didn't write down the thing it told me to do in order to go back to the original MBR, thinking I could just google it if I wanted to do this.
Anyway, I can't find anywhere how to restore this backup with whatever command I need, and I'm hoping that someone here will be able to help me.
I've tried using Windows Recovery COnsole on WinXP CD, but I just get a blue screen with WIndows Set Up as a title and no other options. My intention if I'd had options was to use fixmbr command in the hope of going back to windows only, and just using the puppy linux live Cd instead of having it as a dual boot on my hard drive.
Anyway,
I am hoping someone can give me clear instructions to guide me to restoring my backed-up copy of my original master boot record, using the terminal commands.
(this is driving me completely bonkers btw)
Code: Select all
ms-sys --mbr --write /dev/sda
thanks for the reply, but I wonder if you could kindly elaborate on what you've typed above, or if someone else could.rcrsn51 wrote:Code: Select all
ms-sys --mbr --write /dev/sda
I need clear step by step instructions to try to get my old windows installed mbr back.
If not already obvious, I best state now that I'm a complete noob regarding linux.
do I just open the Console terminal window and type the above code?
anyone help? or suggest where I can get help?
I'll summarise my first post:
I believe Grub4dos made a backup of my old master boot record.
I now want to restore that original master boot record (abandoning grub and puppy hard drive installation).
For some reason (unknown to me), I can't use the windows repair/recovery console with WinXP CD to fix the mbr.
(I intend format the sda6 partition with puppy live CD, after I've got mbr sorted)
any help out there? anyone?
I'll summarise my first post:
I believe Grub4dos made a backup of my old master boot record.
I now want to restore that original master boot record (abandoning grub and puppy hard drive installation).
For some reason (unknown to me), I can't use the windows repair/recovery console with WinXP CD to fix the mbr.
(I intend format the sda6 partition with puppy live CD, after I've got mbr sorted)
any help out there? anyone?
restore mbr
Canadians seem to be people of few words aren't they rcrsn1?
Maybe someone can enlighten this subject further.
At first install a small screen popped up with a different text than rc adviced.
It started with cat
Three questions:
- Can someone write down the 'cat' phrase again
- Is it possible to adapt the grub4dos help file in a way that it is possible to learn how to reset the mbr to its original state.
- Can someone explain the difference between the two commands to reset the mbr
Thanks a lot in advance for showing the commands AND explaining a bit.
Maybe someone can enlighten this subject further.
At first install a small screen popped up with a different text than rc adviced.
It started with cat
Three questions:
- Can someone write down the 'cat' phrase again
- Is it possible to adapt the grub4dos help file in a way that it is possible to learn how to reset the mbr to its original state.
- Can someone explain the difference between the two commands to reset the mbr
Thanks a lot in advance for showing the commands AND explaining a bit.
here's some more info
@rcrsn51 is helpful he may have been to busy to go into details at that time
a little GUI would be nice, hint coders
----------------------------------------------
This program is used to create Microsoft compatible boot records. It is able
to do the same as Microsoft "fdisk /mbr" to a hard disk. It is also able to
do the same as Microsoft "sys d:" to a floppy or FAT partition except that
it does not copy any system files, only the boot record is written.
Specifications of boot records is taken from
http://www.geocities.com/thestarman3/as ... detail.htm
The program is useful when using Linux to restore a backup of a reference
Microsoft Windows installation.
Author of this program is Henrik Carlqvist (henca@users.SourceForge.net), it
is available for download from http://ms-sys.sourceforge.net/
@rcrsn51 is helpful he may have been to busy to go into details at that time
a little GUI would be nice, hint coders
----------------------------------------------
This program is used to create Microsoft compatible boot records. It is able
to do the same as Microsoft "fdisk /mbr" to a hard disk. It is also able to
do the same as Microsoft "sys d:" to a floppy or FAT partition except that
it does not copy any system files, only the boot record is written.
Specifications of boot records is taken from
http://www.geocities.com/thestarman3/as ... detail.htm
The program is useful when using Linux to restore a backup of a reference
Microsoft Windows installation.
Author of this program is Henrik Carlqvist (henca@users.SourceForge.net), it
is available for download from http://ms-sys.sourceforge.net/
If you can actually get into Windows there is a nice little boot sector manager called BOOTICE that has a Portable Apps version and handles all sorts of Boot sectors on all sorts of disks/flash drives.
It is a Gui as well as a command line tool and will generate boot code and put it in the right place for you.
It will also let you edit a BCD file (Vista and Windows 7) or a Grub4Dos menu.lst.
I've still to discover some of it's capabilities!!
It is a Gui as well as a command line tool and will generate boot code and put it in the right place for you.
It will also let you edit a BCD file (Vista and Windows 7) or a Grub4Dos menu.lst.
I've still to discover some of it's capabilities!!
"Just think of it as leaving early to avoid the rush" - T Pratchett
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
scewup22, Ypu screwed up.
It is always necessary to read and eventually make notes of what you are doing.
I suppose you can boot from the puppy CD.
If yes, you can probably find the menu.lst which is generated.
pen this file with an editor (probably geany) and look at the first part.
Normally the code to restore the MBR is mentioned there.
It is always necessary to read and eventually make notes of what you are doing.
I suppose you can boot from the puppy CD.
If yes, you can probably find the menu.lst which is generated.
pen this file with an editor (probably geany) and look at the first part.
Normally the code to restore the MBR is mentioned there.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
This is the thread of screwup, not yours.Strampke wrote:And what is that 'cat'-line please?
That's what screwup was asking for.
You were the one who brought up the cat issue, not screwup.
You should have noted the cat thing when you got it on the screen.
Screwup has got several solutions for his problem.
Let's wait which one did solve his problem.
Last edited by Béèm on Sat 23 Jul 2011, 23:01, edited 1 time in total.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
It is always necessary to read and eventually make notes of what you are doing.
@BéèmYou should have noted the cat thing when you got it on the screen.
So you are the teacher type.
Well instead of pinpointing others to what the should have done, you might consider just helping and explaining, because that is what this forum is all about my friend.
Maybe best to avoid these topics. They become lengthy and no solution.
I could say get a Windows 98 boot floppy, boot with it and type A:FDISK /MBR, but people probably think that wouldn't work.
http://support.microsoft.com/kb/69013
~
I could say get a Windows 98 boot floppy, boot with it and type A:FDISK /MBR, but people probably think that wouldn't work.
http://support.microsoft.com/kb/69013
~
But not with Grub 4 Dos....
see my post.
Boot Floppy...to fix MBR.
http://www.murga-linux.com/puppy/viewtopic.php?t=70076
""""
Chris.
see my post.
Boot Floppy...to fix MBR.
http://www.murga-linux.com/puppy/viewtopic.php?t=70076
""""
Chris.
Strampke, I thought this was Puppy forum, cats shouldn't be talked aboutStrampke wrote:It is always necessary to read and eventually make notes of what you are doing.@BéèmYou should have noted the cat thing when you got it on the screen.
So you are the teacher type.
Well instead of pinpointing others to what the should have done, you might consider just helping and explaining, because that is what this forum is all about my friend.
I don't think the cat thing is what you think it is. I might remember it wrongly but I don't think it did anything to restore the boot record. What it might have done is type out the contents of the menu.lst which might have instructions at the top on how to restore the boot record (which might have been using the dd command like: dd if=mbr.bin of=/dev/sdb).
Just use a text editor to open your menu.lst and read.
ms-sys --mbr --write /dev/sda
That writes a new Windows 98 style master boot record to the first hard drive.
dd if=/dev/sda of=/mbrbackup.bin bs=512 count=1
That copies the existing MBR (512 bytes long) to a backup file.
There are some boot records in the /usr/lib/syslinux folder.
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=440 count=1
That will write DOS/Windows boot record to second disk
cat menu.lst
That prints out menu.lst in terminal window
cat mbr.bin > /dev/sdb
That will also write mbr.bin to second disk.
I didn't know anything about Linux before reading this forum so hopefully I have it right.
Last edited by hoven on Sun 24 Jul 2011, 04:18, edited 2 times in total.
Just to add a little spice
Microsoft changed the /MBR switch after ME and it overwrite a different length by four bytes.
> If you read again you will see that I told the user to use a *Windows
> 98* startup floppy and use the fdisk /mbr command, this command rewrites
> or zeros out the 4 byte long disk signature from offsets 1B8h through
> 1BBh. These are 4 of the famous 6 bytes that fdisk /mbr rewrites, it
> rewrites the 4 byte disk signature at bytes 440 to 443 along with the
> two bytes 444 & 445. Rewriting the disk signatures invalidates the
> Mount Manager's database and allows or causes it to reassign drive
> letters. The Windows 2000/XP fixmbr command does not rewrite these
> bytes, it rewrites the first 440 byte and doesn't touch the disk
> signature, fdisk /mbr rewrites the first 446 bytes and zeros out the
> signature.
Also there is an undocument switch /CMBR n where n is the drive number STARTING AT ONE NOT ZERO. see http://bharucha.com/tp701/fdiskSecrets.html
Microsoft changed the /MBR switch after ME and it overwrite a different length by four bytes.
> If you read again you will see that I told the user to use a *Windows
> 98* startup floppy and use the fdisk /mbr command, this command rewrites
> or zeros out the 4 byte long disk signature from offsets 1B8h through
> 1BBh. These are 4 of the famous 6 bytes that fdisk /mbr rewrites, it
> rewrites the 4 byte disk signature at bytes 440 to 443 along with the
> two bytes 444 & 445. Rewriting the disk signatures invalidates the
> Mount Manager's database and allows or causes it to reassign drive
> letters. The Windows 2000/XP fixmbr command does not rewrite these
> bytes, it rewrites the first 440 byte and doesn't touch the disk
> signature, fdisk /mbr rewrites the first 446 bytes and zeros out the
> signature.
Also there is an undocument switch /CMBR n where n is the drive number STARTING AT ONE NOT ZERO. see http://bharucha.com/tp701/fdiskSecrets.html
"Just think of it as leaving early to avoid the rush" - T Pratchett