How to remove GRUB from mbr?

Using applications, configuring, problems
Post Reply
Message
Author
circularL7
Posts: 112
Joined: Sat 02 Feb 2013, 07:26

How to remove GRUB from mbr?

#1 Post by circularL7 »

Hello,

As part of an effort to make a PC run only Puppy, I did a full install, and it didn't go over so well. I can boot Puppy from a live CD or Win98SE from the slave HDD, but the GRUB files/program (?) interfere with it booting on the main HDD. So, I'd like to remove it.

Machine info: 266Mhz, 192M RAM.

What happened: after I ran the Puppy auto installer, I restarted the PC. As I recall, it stopped loading when it came to loading X windows. It froze for ten minutes, so I cycled the power. Then it kept stopping when it came to loading the mouse info.

After a few repeats, I removed the Puppy files from the HDD, but I couldn't figure out how to remove the GRUB, which is the real trouble right now.

Thank you for any help that you might provide.

(I have to leave for work again tomorrow, so it'll be a few days before I get back to answer questions.)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

You can zero the mbr with the dd command.

I am in a mood to give you code to zero any attached HDD and forget about the size.

Would be nice to hear which Puppy did not full-install-booted correctly.

circularL7
Posts: 112
Joined: Sat 02 Feb 2013, 07:26

#3 Post by circularL7 »

Karl Godt wrote:You can zero the mbr with the dd command.

I am in a mood to give you code to zero any attached HDD and forget about the size.

Would be nice to hear which Puppy did not full-install-booted correctly.
Hi Karl,

Thanks for the info. It was Puppy 420 Turbo.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

Boot off your Puppy CD and type this command

Code: Select all

ms-sys -m -w /dev/sda
However, an old version of Puppy like 420 may not have this command.

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#5 Post by starhawk »

circularL7, you already have a thread about this computer in the Beginner's Help section, where you are getting help.

Why did you start a second thread here?

Also: MBR. Master Boot Record.

circularL7
Posts: 112
Joined: Sat 02 Feb 2013, 07:26

#6 Post by circularL7 »

rcrsn51 wrote:Boot off your Puppy CD and type this command

Code: Select all

ms-sys -m -w /dev/sda
However, an old version of Puppy like 420 may not have this command.
Thanks!
starhawk wrote:circularL7, you already have a thread about this computer in the Beginner's Help section, where you are getting help.

Why did you start a second thread here?
Different topics; that thread is about getting a system going; this topic is about cleaning a mistake. The forum description for that section doesn't include this type of help, but the description for this section does. It seemed peculiar to me to ask for help in that section that seemed to belong in this section.

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#7 Post by starhawk »

I just hope that Flash (our resident Moderator) doesn't get mad at you.

TBH I'm not sure if you should've started a new thread or not... but I rather suspect not.

cthisbear
Posts: 4422
Joined: Sun 29 Jan 2006, 22:07
Location: Sydney Australia

#8 Post by cthisbear »

My How to

http://murga-linux.com/puppy/viewtopic.php?p=507622

" Recently I had a problem with Grub 4 Dos by Shinobar.

I have been using it to boot different USBs with multi Puppies etc.

I am not very knowledgeable with any sort of Grub.
However Shinobars creation is pretty good.

I wish however that I could use different boot options
for Puppy....such as >> puppy pfix=ram etc.

And maybe it's me but I find it picks up better if I name the folders....
in lower case...and use only an 8 letter name.

Anyway I must have been a bit too quick in selecting my USB options,
and my XP hard drive booted with a funny grub message,
but then would boot into Windows after 10 seconds or so.

So I had a look around for a simple MBR fix.

I tried this but it wouldn't work.

http://www.ambience.sk/fdisk-master-boo ... fixmbr.php

Hirens wouldn't work.

Other fixes didn't work.

///////////

I saw this.

http://support.microsoft.com/kb/69013

Command fdisk /mbr

" Fdisk has an undocumented parameter called /mbr that causes it to write
the master boot record to the hard disk without altering the
partition table information. "


And decided to go for it after I saw WhatsHisName response.
I used an old >> Dos 6.22 floppy disk

http://www.linuxquestions.org/questions ... br-178571/

" My post will surely be followed by several fdisk /mbr screwed my disk

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#9 Post by Karl Godt »

I remember fdisk utility for win98 . I used it several times for partitioning . Don't remember details anymore .
In case that you have grub in the mbr of the win98 disk - which would be a user fault confusing the drives which is likely because of the 2 controllers and master/slave settings - fdisk from a win98 installation cd or floppy would do the job. Since the ms web page Chris points to says only if the mbr isn't there and only for master on ide controller 0 :

Code: Select all

dd if=/dev/zero of=/dev/hda bs=1 count=512
I am guessing kernel 2.6.25.16 is an IDE kernel using /dev/hd* nodes instead of /dev/sd* and the win98 disk is master on IDE controller 0 (first controller, second is IDE-1) .

I think i remember that win98 has a feature to create a dos disk to run ms fdisk .

hal8000
Posts: 6
Joined: Tue 05 Mar 2013, 18:22

#10 Post by hal8000 »

It would be easier to download an updated puppy linux with the ms-sys util included. As you have Windows 98SE then you restore a Win95/98/98SE boot loader. The command is:

ms-sys -9 -w /dev/sda

Replace sda with correct hard drive if you have more than one drive. The -9 loads the 95/98/98SE bootloader and -w writes this code to the mbr.

Note that this writes only the first 464 bytes so will not destroy your partition table.

The windows partition must also be marked active (with a boot flag) you can check this with

fdisk /dev/sda

Press "p" to display partition you should see a "*" against the boot partition which has to be sda1 in the case of windows 98. q exists linux fdisk and you should be able to reboot and load win98.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#11 Post by Karl Godt »

Machine info: 266Mhz, 192M RAM.
It would be easier to download an updated puppy linux with the ms-sys util included
Clearly it is.

ms-sys is to be found on sourceforge
Compiled on Macpup-F3
Attachments
ms-sys-2.2.1-glibc-2.6.1.tar
(60 KiB) Downloaded 233 times

circularL7
Posts: 112
Joined: Sat 02 Feb 2013, 07:26

#12 Post by circularL7 »

Thanks for all the help! Here are the details if you're interested:

I used the fdisk/mbr command with a Win start up disk, and this cleared the problem. Then, to experiment, I used the dd command in, IIRC, ROXTerminal or something else that gave me a screen and a pound sign. The consequences of that command were a bit alarming and intriguing, and I was pleased to get more partitioning practice.

GRUB4DOS did the trick for both the PC in question and a second vintage machine.

Thanks!!!

User avatar
NETTKNUT
Posts: 135
Joined: Thu 27 Oct 2011, 09:51
Location: Wales

How to remove GRUB from MBR

#13 Post by NETTKNUT »

On 19th March rcrsn51 suggested running the command:

ms-sys -m -w /dev/sda

I also want to remove GRUB from MBR on my Puppy Linux system but am unfamiliar with this command. In particular will it delete any other files from my HD partitions sda1 sda2 sda3? Any help appreciated. Thanks.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: How to remove GRUB from MBR

#14 Post by rcrsn51 »

NETTKNUT wrote:I also want to remove GRUB from MBR on my Puppy Linux system but am unfamiliar with this command. In particular will it delete any other files from my HD partitions sda1 sda2 sda3?
No. All it does is write new boot code to the MBR of the hard drive.

User avatar
NETTKNUT
Posts: 135
Joined: Thu 27 Oct 2011, 09:51
Location: Wales

How to remove GRUB from MBR

#15 Post by NETTKNUT »

Thanks for your prompt reply. It's a relief to know it won't do any harm. Thanks

Post Reply