From: Dances With Crows <danceswithcrows@usa.net> Subject: Re: MBR of pc(x86) ? depends on CHS geometry Date: 27 Apr 2002 20:14:24 GMT References: <aaeii0$m9n$1@ctb-nnrp1.saix.net> On 27 Apr 2002 16:10:40 GMT, cglur@onwe.co.za staggered into the Black Sun and said: > when DOS fdisk \MBR executes does it write the MBR according to > the geomentry of the specific disk ? Actually, I think it'd give a message similar to "Invalid argument." Perhaps you meant "FDISK /MBR"?
If you use the undocumented /MBR switch to FDISK.EXE, the first 446 bytes of the first sector on the disk are overwritten and replaced with a "standard" DOS bootsector. It doesn't overwrite the partition table or otherwise fiddle with it. This standard DOS bootsector examines the partition table, finds the first primary partition that's marked active, then loads the first sector from that partition and executes it. Under DOS and derived (Lose9x/ME) the first sector of the DOS partition contains the first sector of IO.SYS. > Or can I copy the MBR from another disk ? Not the entire MBR, just the first 446 bytes. > All 5 of my IDE drives have become non-DOS-bootable. > Which is not a great problem, since I boot my prefered OS > (oberon: native or DOSbased or LinuxBased) and Linux via fd0. That's not a great idea. Floppies die, and they're slow. > When I tried to partition a friend's hda to take linux as well as his > W95, again his hda became non-DOS-bootable ! > I used linux fdisk. I need to fix his disk !!
Booting DOS and derived systems from LILO or GRUB is covered extremely well in several HOWTOs. If you've got a Linux/DOS dual-boot system, the best thing to do is to have LILO or GRUB boot both OSes. You can do this all from Linux. > For some of the disks which I've investigated, DOS's fdisk doesn't > even see the device although the BIOS auto detect sees the correct > CHS, and linux or Oberon can read the various partitons & files. > A DOS 'officinado' tells me that if DOS-fdisk can't see it, I can't > restore the MBR ? Not with FDISK, you can't. Fortunately, you can get a valid DOS MBR by doing "dd if=/dev/hda of=/somewhere/dos.mbr.raw bs=446 count=1" if you have a /dev/hda with a valid DOS MBR on it. Reverse the if= and of= arguments to put this valid DOS MBR anywhere. > Thanks for any advice, also emailed to cglur@onwe.co.za You mailed a copy of this Usenet post to yourself? Or are you trying to say, "Please CC: me a copy of any replies,"? If it's the latter, there's a time-honored tradition in Usenet that goes, "Post here, Read here." If your NNTP feed is flaky, then http://groups.google.com/advanced_group_search is very nice for tracking down posts you made and any replies. -- Matt G|There is no Darkness in Eternity/But only Light too dim for us to see Brainbench MVP for Linux Admin / http://www.brainbench.com / "He is a rhythmic movement of the -----------------------------/ penguins, is Tux." --MegaHAL
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
---October 2, 2004
Would this save/restore MBR (dd...) work if you got the MBR from another PC, and fired it into your own?
---October 2, 2004
The reference talks about dd'ing from another disk - why would it matter if that came from another machine?
---October 3, 2004
I don't know. I'm just asking...
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar