LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 12-29-2003, 08:48 AM   #1
jamessp007
Member
 
Registered: Aug 2002
Location: Highland, UT
Distribution: Linux Mint 9
Posts: 44

Rep: Reputation: 15
why won't my mbr fdisk /mbr?


I recently replaced my harddrive. I had a new copy of mdk 9.2 and thought it was a great time to try it out. I installed the os and used mdk for a few days. I decided to do a win 98 and suse dual boot ; my video capture card (TV @anywhere) isn't recognized. I fdisk /mbr a couple of times and tried to install windows. Install fails. I get a disk error. I then tried to manually reformat the harddrive. fdisk seized when tell it to delete partitions. I have also tried qtparted with knoppix as root. Qtparted will remove logical partitions but not the primary. I decided to try other linux flavors to see if their install tools will fix this. I tried suse, red hat 9.0 and knoppix(hdd install script). Each linux seized during install. I retried Mandrake and it reinstalled without a hitch. It reinstalled without a problem.
Any help will be appreciated.
Again, I just want to win98 and suse 9.0 dual boot my machine.
 
Old 12-29-2003, 08:59 AM   #2
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
well, you should be able to boot off the win98 cd and format the disk with that. If fdisk wont delete partitions then I would be starting to think that the HDD is goosed.

So try that, Using the win98 disk to boot from, use fdisk to nuke all partitions,and recreate your partitions, then reboot and format the primary partition, then try the win98 install.

Or do it all from SuSE. just remember that if you install win98 _after_ suse you are going to have to boot off the SuSE CD, boot an installed system, and re run lilo to reclaim the bootsector
 
Old 12-29-2003, 12:01 PM   #3
zarathustra674
Member
 
Registered: Jan 2003
Location: Bible Belt Appalachian Mnts of Western VA/Eastern KY
Distribution: Still Hoppin.
Posts: 98

Rep: Reputation: 15
Usually what i do when reinstalling windows or a dual boot, is to use the mandrake cd to do the partitioning and formating(if you dont format it wont write the partition table). I then, format the first partition with a 98 boot floppy. And then of course fdisk /mbr. Ive ran into problems a few times as well. But 95% of the time this method works for me. I hate using the windows fdisk because its soo sloooow. You might want to try a third party partitioning tool. Partition magic works for me and you can use it to create floppys to boot and create partitions with. Again this is a bit slow. There are supposedly much better partitioning tools out there but I can't think of the names right now. Good Luck. Also, I say mandrake, but the pclinuxos bootable cd os, is what I currently use for paritioning to reinstall ms products.
 
Old 12-29-2003, 12:43 PM   #4
Mugatu
Member
 
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Rep: Reputation: 30
if you've done all that stuff to your poor hard drive it might be best to do a low-level format (write zeros to the drive) and start over from scratch. most drive manufacturers provide free utilities, which often include a low-level format utility. then just use a win98 boot disk to fdisk the drive and create a fat32 partition for windows, install win98, then boot to your SuSE CD to create the linux partitions, install linux, and install lilo/grub to your mbr.
 
Old 12-29-2003, 01:08 PM   #5
Alfanut
LQ Newbie
 
Registered: Dec 2003
Location: Seattle. WA
Distribution: Mandrake 9.1/Mandrake 9.2
Posts: 23

Rep: Reputation: 15
Remotely related, perhaps, to the above SNAFU:

Thanks to stupidity, I've ruined an installation (or three) from time to time. Even though MS claims that it is not wise to use fdisk /mbr on drives with more than four partitions, it still worked fine two days ago when I managed to do it again on a 40GB hard drive with (5) 8GB partitions.

The Windows 98SE startup floppy let me into the Windows\Command directory from which I ran fdisk.
The MBR was fully restored. I have now copied fdisk onto that floppy, just in case...

For what ever this is worth, I had what I thought to be a major boot sector and FAT virus. One 40GB hard drive was inaccessible, even to Mandrake or SuSE. Using the disk manager floppy I decided to "clean up" the drive and overwrite it with zeros. It took my P4 1.6 over 4.5 hours, and then another twenty minutes to do a proper scan. The drive is as new.

My main drive, also containing Win98SE, would not boot. Apparently the bug had somehow done in the MBR. Mandrake was able to access the other partitions and even read the "C" partition. Before I tried fdisk /mbr, I copied various "important" files elsewhere.

The startup floppy did do it's job and the MBR was fully restored via fdisk /mbr. Until recently, I was using Bootmagic, which came with my Mandrake 6.5 package. Bootmagic works fine but will not see my drive where I have both Win98SE as well as Mandrake 9.2. I added 9.2 to that drive and opted to let LiLo overwrite the boot sector.

I now boot that drive by simply designating it as "primary" via CMOS settings. To me, changing the hard drive primary and slave designations via CMOS is every bit as useful as using a dual boot manager of any sort.

I presently use three drives, one with Win98SE only, one with 98 and Mandrake 9.2 and another drive with Mandrake 9.1. Any or all are bootable.

One other useful tip, long ago, was to copy a current rb00x.cab from c:\windows\sysbckup to another location. Should the primary Windows partition ever really get corrupted, restoring the four basic necessary files from a saved rb00x.cab generally restores Windows to usefulness.

Cheers and Happy New Year!
 
Old 12-29-2003, 01:18 PM   #6
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Rep: Reputation: 30
You shuld have installed Windows 98 before installing MDK. Then just to make things easier, use Partition magic in windows to create your linux partitions and install MDK after. This is what I did about 3 times now, and it always worked. By the way I got partition magic 8.0 from Kazaa a long time ago...
 
Old 12-29-2003, 06:18 PM   #7
jamessp007
Member
 
Registered: Aug 2002
Location: Highland, UT
Distribution: Linux Mint 9
Posts: 44

Original Poster
Rep: Reputation: 15
response to suggestions

Thanks to everyone who has replied. I have used all the methods suggested(excluding acronis) here to no avail, therefore my posting. Mandrake has hosed a 20 gig drive like this before and fdisk /mbr has always worked remedied the problem. Unfortunately, it seems that no matter how many times I fdisk /mbr on this drive (120 G) it never allows windows to reinstall or any other linux for that matter. However, mandrake continues to install slick as a whistle I has successfully reinstalled mandrake twice. Has anyone encountered mandrake's lilo planting anything on their mbr that hoses the mbr partition. BTW partition magic has always worked just as well as fdisk /mbr but this time it complains of corrupted drive.
If it's corrupted, why will mandrake install lilo or grub, without fail, but bite the big one with any other OS?

I guess I'll have to try acronis...
BTW I found a posting on how to LL format with an assembly command but I'm too chicken sh*t to try it. Never used assembly, too hardcore.

Anyone out there with a sure fire cure tool or assembly expertise willing to walk me through the format is welcomed.
 
Old 12-29-2003, 07:02 PM   #8
Alfanut
LQ Newbie
 
Registered: Dec 2003
Location: Seattle. WA
Distribution: Mandrake 9.1/Mandrake 9.2
Posts: 23

Rep: Reputation: 15
One more

Sorry I didn't think of this earlier, but have you tried to uninstall LILO? There are ways. LILO -u/dev/hda, for example, but this link has more info on the subject and you might try it?

http://www.dslreports.com/faq/1727

I quote:

A: When Lilo overwrites a boot sector, it saves a backup copy in /boot/boot.xxyy, where xxyy are the major and minor numbers of the device, in hex. You can see the major and minor numbers of your disk or partition by running "ls -l /dev//device''. For example, the first sector of /dev/hda (major 3, minor 0) will be saved in /boot/boot.0300, installing Lilo on /dev/fd0 creates /boot/boot.0200 and installing on /dev/sdb3 (major 8, minor 19) creates /boot/boot.0813. Note that Lilo won't create the file if there is already one so you don't need to care about the backup copy whenever you reinstall Lilo (for example, after recompiling your kernel). The backup copies found in /boot/ are always the snapshot of the situation before installing any Lilo.

If you ever need to uninstall Lilo (for example, in the unfortunate case you need to uninstall Linux), you just need to restore the original boot sector. If Lilo is installed in /dev/hda, just do "dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1'' (I personally just do "cat /boot/boot.0300 > /dev/hda'', but this is not safe, as this will restore the original partition table as well, which you might have modified in the meanwhile). This command is much easier to run than trying "fdisk /mbr'' from a DOS shell: it allows you to cleanly remove Linux from a disk without ever booting anything but Linux. After removing Lilo remember to run Linux' fdisk to destroy any Linux partition (DOS' fdisk is unable to remove non-dos partitions).

If you installed Lilo on your root partition (e.g.,/dev/hda2), nothing special needs to be done to uninstall Lilo. Just run Linux' fdisk to remove Linux partitions from the partition table. You must also mark the DOS partition as bootable.

~~~~~~~~~~~~
If it took 4.5 hours to overwrite a 40 GB drive with zeros, I'd predict that such a measure to recover that 120 GB drive would take 13 hours. Seems like an overnight option, worst case scenario. Multiple drives have their advantages; when one stops responding perhaps it can be accessed via another OS on another drive.

This I know for sure: The machine is the slave and I am it's Master! Right. Unless the drive died in some mechanical manner, I have never yet lost a round. And only two drives have ever failed me; a 850MB Seagate and, more recently, a WD 8GB drive. That 8 GB drive has been used in three different machines, set up with EZ drive overlay, repartitioned countless times, contained DOS, WFW, W95 and W98, and split to contain both MS and one Linux distro or other. Lately is held SuSE8.1. I think it just got a bit tired and "dizzy".

Nothing is forever and I wish you well.
 
Old 12-29-2003, 07:39 PM   #9
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Rep: Reputation: 30
I strongly agree with what Alfanut said. You shoudl try that before you do anything else.

Also check out this web page in microsoft.com which tells you how to uninstall lilo from boot record. This is almost the same as Alfanut's advice, except (to me), it's more straight forward.

First log in to linux and do what this says command mode without running startx.

http://support.microsoft.com/default...d=kb;hu;315224

Good Luck

Last edited by Nukem; 12-29-2003 at 07:40 PM.
 
Old 12-29-2003, 08:08 PM   #10
jamessp007
Member
 
Registered: Aug 2002
Location: Highland, UT
Distribution: Linux Mint 9
Posts: 44

Original Poster
Rep: Reputation: 15
I currently have the system booting with grub. I had hoped that maybe it was a problem with lilo. Lilo was the loader I used on the first install. Does "dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1" replace grub with lilo? BTW the install default named the drive hdc though it is the only harddrive in the box. Do I simply: dd if=/boot/boot.0300 of=/dev/hdc bs=446 count=1" instead of "dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1"?
 
Old 12-29-2003, 09:18 PM   #11
Alfanut
LQ Newbie
 
Registered: Dec 2003
Location: Seattle. WA
Distribution: Mandrake 9.1/Mandrake 9.2
Posts: 23

Rep: Reputation: 15
GRUB vs. LILO

James: As far as I know, there is no way to "uninstall" GRUB. Your only option is to overwrite it with another boot loader. That said, I'm baffled by your comment that your only drive was mounted other than as "hda". I have this strange feeling that the reason Windows fdisk can't touch it since it isn't the first "or primary master" drive. Not 100% on this, just a gut feeling.

What does CMOS say about the drive identification and where it is in the lineup? Are other media, such as DVD or CDRom drives reported as primary master or slave? Is cable select on the drive itself an issue or was it configured as master? Is the drive attached to the first controller? Sorry, I just had to ask.

Here's what I'd consider doing if that drive was on my machine:

Launch Mandrake. As "su", look at what HardDrake says about the drive and its partitions. Is the entire drive dedicated to and mounted by Mandrake?

Does HardDrake report that the drive is, in fact, hdc? What other media show as hda or hdb?

I have not had the need to try using HardDrake to resize and redesignate drive partitions but I know it can be done. For instance, I have just reinstalled 9.2 on part of a 30GB drive on which Win98SE already resided, three 10 GB partitions in all. I let Mandrake 9.2 take over the third of those partitions.

I thought to do this reinstall, having swapped the two drives via CMOS. In other words, the traditional "slave" was now the master and vice versa. Mandrake installed fine but created new home directories on the second Windows partition, refusing to "see" the already existing home partition.

I used HardDrake to redefine and mount those partitions and all was well again. We live and learn, hopefully. Back to the 120:

HardDrake may just be able to resize the current partitions, perhaps even allow changing one or more to FAT32. To me, it'd be worth a try. My sole experience with GRUB was writing it to hda1 rather than hda. I had some good advice from various pros around the globe and those notes are still floating around in the nether world; I ran across one not long ago. I think the title was "GRUB and that other OS"

The bottom line then, as now, was that GRUB can NOT be uninstalled. The only option is to overwrite it with another boot loader. Open the boot options and configure LILO and let it overwrite GRUB.

As mentioned above, I use several hard drives. Where Windows doesn't know that Linux exists on the same machine, although there are Windows utilities which will allow it to read Linux files, Linux sees all. If all else failed, I'd install another drive, then use it to manipulate the suspect problem drive in one way or another.

As you can tell from my comments, I'm not the expert I'd like to be; however, I have managed to screw things up too many times to let just another SNAFU rain on my parade. You can't break it, unless you use a hammer.

Cheers!
 
Old 12-30-2003, 07:49 AM   #12
jamessp007
Member
 
Registered: Aug 2002
Location: Highland, UT
Distribution: Linux Mint 9
Posts: 44

Original Poster
Rep: Reputation: 15
I checked it out in harddrake. The the dvd burner is /dev/scd0 and harddrake shows the drive as hdc too. I downloaded maxtors ll format tool (zerofill) and decided to wipe the whole thing and start fresh last night. As per an earlier posting, this looked to be a very timely endeavor. So I gave my windows cd one last shot. It finally fdisked and formatted. However, when format completes and reboots to setup I continue to get the "disk must be formatted notification". It sounds more and more like a virus of some sort. I gave up on windows and started the ll format program. I let it run all night and discovered this morning the program hung at about 10% complete. I'm starting to feel that maybe there's is a stinker of a virus or something there. I failed to check the cable. I'll double check that and get back .
 
Old 01-02-2004, 07:29 PM   #13
Mugatu
Member
 
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Rep: Reputation: 30
download troubleshooter.exe from this link:

http://www.user-friendly.net/download/download.htm

and it can troubleshoot your hard disk. it can run a variety of physical tests as well as a non-destructive read/write test which will check the surface of the disk for physical errors. it also comes with a low-level format utility of its own, which you can use (as a last resort). i've used it several times at work to wipe drives with sensitive information. it's worked well every time, although it is slow. i've never used it on something as large as 120 GB--maybe 20 or 40 at the most. but it will definitely take a while to ll format a large drive.
 
Old 01-03-2004, 01:41 AM   #14
jamessp007
Member
 
Registered: Aug 2002
Location: Highland, UT
Distribution: Linux Mint 9
Posts: 44

Original Poster
Rep: Reputation: 15
I have tried ll format with the maxtor supplied tool. As I mentioned ealier, it hung after 10% completion. However, after restarting from the ll format attempt, I used boot magic to check out the MBR and knoppix root to remove lilo. I also fdisk /mbr with my win98 cd to ensure the MBR was doing what it should. Then I used partition magic to lop off a 20gig chunk for windows and 100gig for linux. After this redundant prep, I attempted a win install again and to my surprise and delight, my windows install started to work. I have now successfully reinstalled win98 se and SuSE 9.0. I don't know what it was but both OS's are running stablely and I'm replying to this post via SuSE 9.0/Mozilla. Thanks to all who posted.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fdisk /MBR Eugney Slackware 39 08-23-2011 09:30 AM
fdisk /mbr in Linux? wayneinmpls Linux - Newbie 6 12-20-2005 11:27 AM
Grub - fdisk /MBR lucho707 Linux - Software 1 11-30-2005 11:07 PM
fdisk /mbr rharvey@cox Linux - Software 2 02-16-2004 12:19 PM
Life after fdisk /mbr amijinx Linux - Hardware 3 10-01-2003 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 07:04 PM.

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