Re: Fixing a MBR (and more) that ??? trashed

2005-09-15 Thread Alex Zbyslaw

Gayn Winters wrote:


-Original Message-
From: Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 14, 2005 1:59 AM

To: [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Subject: Re: Fixing a MBR (and more) that ??? trashed

Gayn Winters wrote:

   

Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
  
Why do you think it's not safe to add hard drives?
   


It doesn't seem safe if Windows blows away the multiboot MBR that
FreeBSD so carefully made!  Windows overwriting the MBR 
 


seems to be the reason people recommend loading Windows before loading
   



 


FreeBSD, which I do.  I just never realized that this problem would
   

come back 
 


to bite me when I added another disk drive.
   



 

I know of know reason why it should.  I've added disks half a dozen 
times without blowing away any MBRs.  Even the Windows blowing away
   

the 
 

MBR is an annoyance, not a disaster since it is easy to rewrite.  
Whatever pickle you find yourself in seems to have to do with 
more than just adding a disk or Windows killing your MBR.


--Alex
   



I certainly am willing to admit that I'm doing something stupid!
The motherboard and its BIOS are also known to be strange.

One thing to note is that if I reconfigure (fresh FBSD install), add
hardware, and then boot first into FBSD, all is well EXCEPT the boot
loader, whose prompt is:
F1 ???
F2 FreeBSD
F5 Drive 1

Default: F2

If I select F2, then I get FreeBSD.  If I select F5 I get Windows!  I.e.
F5 gives me the same slice as does F1!!!  (Drive1 is the extra IDE
drive.)  I can't blame Windows for this, since it never got booted.
Also, if FBSD gets booted first, Windows doesn't (further) corrupt the
MBR.  Incidentally, rewriting the MBR with
boot0cfg -B -o packet /dev/ad1
does not change anything.  The F5 option is still there, and it still
brings up the Windows that is on slice1.  If I add a third IDE drive,
the situation also remains the same.  In particular, I don't get an F9
option.

 

I know too little about your setup.  Are you sure ad1 is your second 
disk?  (There's nothing to stop you booting from any disk whatsoever if 
you BIOS allows, and many do).  When you boot off F2, what does say df show?


If you had a FreeBSD MBR on the second disk, then you *ought* to get 
another F1, F2 etc menu.  If you have a third disk, then the second disk 
would also have an F5 option e.g.


   DISK1 DISK2  DISK3
   F5-DISK2   F5-DISK3   F5-DISK1

There's never anything higher than F5 since there can never be more than 
4 slices on a disk (F1-F4), plus F5 for the next disk (if any).


--Alex

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fixing a MBR (and more) that ??? trashed

2005-09-14 Thread Alex Zbyslaw

Gayn Winters wrote:

Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
   


Why do you think it's not safe to add hard drives?
   



It doesn't seem safe if Windows blows away the multiboot MBR that
FreeBSD so carefully made!  Windows overwriting the MBR seems to be the
reason people recommend loading Windows before loading FreeBSD, which I
do.  I just never realized that this problem would come back to bite me
when I added another disk drive.
 

I know of know reason why it should.  I've added disks half a dozen 
times without blowing away any MBRs.  Even the Windows blowing away the 
MBR is an annoyance, not a disaster since it is easy to rewrite.  
Whatever pickle you find yourself in seems to have to do with more than 
just adding a disk or Windows killing your MBR.



I need to be able to operate on my clients' disks.  Sometimes I need a
tool that runs under Windows, and other times I need a tool that runs
under FBSD.  This doesn't permit adding an OS to their disks. 

I don't really understand what you're saying here; sorry.  Dual boot 
machines are really common (I have three here) and despite adding disks 
to each of them at some point in their lives, I've never ended up with 
anything going wrong.



A
bootable external USB drive may be the ideal Fixit drive ...  Of
course, I'd rather figure out how not to have the problem at all!  It
would be nice if FreeBSD could write out whatever changes to the MBR and
the partition/slice tables that the new hardware required so that
Windows didn't feel obligated to fix things.
 

FreeBSD can do that.  I'm not denying that you're in a pickle, but that 
is not a necessary consequence of adding a disk.


--Alex



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Fixing a MBR (and more) that ??? trashed

2005-09-14 Thread Gayn Winters
 -Original Message-
 From: Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 14, 2005 1:59 AM
 To: [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Subject: Re: Fixing a MBR (and more) that ??? trashed
 
 Gayn Winters wrote:
 
 Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
 
 Why do you think it's not safe to add hard drives?
 
 It doesn't seem safe if Windows blows away the multiboot MBR that
 FreeBSD so carefully made!  Windows overwriting the MBR 
 seems to be the reason people recommend loading Windows before loading

 FreeBSD, which I do.  I just never realized that this problem would
come back 
 to bite me when I added another disk drive.
   
 I know of know reason why it should.  I've added disks half a dozen 
 times without blowing away any MBRs.  Even the Windows blowing away
the 
 MBR is an annoyance, not a disaster since it is easy to rewrite.  
 Whatever pickle you find yourself in seems to have to do with 
 more than just adding a disk or Windows killing your MBR.
 
 --Alex

I certainly am willing to admit that I'm doing something stupid!
The motherboard and its BIOS are also known to be strange.

One thing to note is that if I reconfigure (fresh FBSD install), add
hardware, and then boot first into FBSD, all is well EXCEPT the boot
loader, whose prompt is:
F1 ???
F2 FreeBSD
F5 Drive 1

Default: F2

If I select F2, then I get FreeBSD.  If I select F5 I get Windows!  I.e.
F5 gives me the same slice as does F1!!!  (Drive1 is the extra IDE
drive.)  I can't blame Windows for this, since it never got booted.
Also, if FBSD gets booted first, Windows doesn't (further) corrupt the
MBR.  Incidentally, rewriting the MBR with
boot0cfg -B -o packet /dev/ad1
does not change anything.  The F5 option is still there, and it still
brings up the Windows that is on slice1.  If I add a third IDE drive,
the situation also remains the same.  In particular, I don't get an F9
option.

I'm still in a curious pickle, but at least this one isn't choking me!

Thanks again for the help!

-gayn



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fixing a MBR (and more) that ??? trashed

2005-09-14 Thread Jerry McAllister
  Gayn Winters wrote:
  
  Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
  
  Why do you think it's not safe to add hard drives?
  
  It doesn't seem safe if Windows blows away the multiboot MBR that
  FreeBSD so carefully made!  Windows overwriting the MBR 
  seems to be the reason people recommend loading Windows before loading
 
  FreeBSD, which I do.  I just never realized that this problem would
 come back 
  to bite me when I added another disk drive.

  I know of know reason why it should.  I've added disks half a dozen 
  times without blowing away any MBRs.  Even the Windows blowing away
 the 
  MBR is an annoyance, not a disaster since it is easy to rewrite.  
  Whatever pickle you find yourself in seems to have to do with 
  more than just adding a disk or Windows killing your MBR.
  
  --Alex
 
 I certainly am willing to admit that I'm doing something stupid!
 The motherboard and its BIOS are also known to be strange.
 
 One thing to note is that if I reconfigure (fresh FBSD install), add
 hardware, and then boot first into FBSD, all is well EXCEPT the boot
 loader, whose prompt is:
   F1 ???
   F2 FreeBSD
   F5 Drive 1
 
   Default: F2
 
 If I select F2, then I get FreeBSD.  If I select F5 I get Windows!  I.e.
 F5 gives me the same slice as does F1!!!  (Drive1 is the extra IDE
 drive.)  I can't blame Windows for this, since it never got booted.

That sounds correct to me.

F1-F4 would be the the [up t0] four slices on the first disk
and then F5 tells it to look on the second disk.   There is looks
for an MBR.   If it happened to be a FreeBSD MBR you should get
a second menu something like F1 ??? F2 FreeBSD, F3 DOS, etc.   But
if it is an MS MBR, it will only know to boot MSxxx.

 Also, if FBSD gets booted first, Windows doesn't (further) corrupt the
 MBR.  Incidentally, rewriting the MBR with
   boot0cfg -B -o packet /dev/ad1
 does not change anything.  The F5 option is still there, and it still
 brings up the Windows that is on slice1.  If I add a third IDE drive,
 the situation also remains the same.  In particular, I don't get an F9
 option.

You would never get an F9.   They are only F1--F4 +F5 which takes you
to the next disk's F1-F4.What the MBR on the second disk does when
you hit F5 depends on what MBR is on it.

You may have something weird on the second disk.  I really don't 
know from what you say.   But, at least the main boot disk (ad0 ??)  
behavior looks correct.   Adding the FreeBSD MBR to the second disk
wouldn't change much if the slice on the second disk has a boot
sector that boots MSxxx.   If it is MS, it may insist on booting
from the first disk anyway.   I am not that familiar with weirdnesses
from MS other than that they are weird. 

jerry

 
 I'm still in a curious pickle, but at least this one isn't choking me!
 
 Thanks again for the help!
 
 -gayn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fixing a MBR (and more) that ??? trashed

2005-09-13 Thread Alex Zbyslaw

Gayn Winters wrote:


Life was good until I wanted to add another disk.  The w2k operating
system, when booted, saw the new hardware, installed it, and demanded
that I reboot.  OK, but when I did, the FreeBSD boot manager was
trashed. Its menu looked like:

F1 ???
F2 FreeBSD
F5
Default: F#

I could not boot either operating system. In fact the only keys that did
anything were ctrl-alt-del!  I removed the new hardware and using Fixit
on the 5.4 release CD, I tried 
	boot0cfg -B ad1  
This recovered the boot manager, and allowed me to boot w2k, but FBSD

wouldn't boot.  Pressing F2 in the boot menu still did nothing.
 

How far into the disk was FreeBSD?  I had a similar problem until I 
specified -o packet

i.e.
   boot0cfg -B -o packet ad1

You could also try writing the boot manager using sysinstall/boot CD:

http://www.freebsd.org/cgi/getmsg.cgi?fetch=61+617364+/usr/local/www/db/text/2005/freebsd-questions/20050626.freebsd-questions

--Alex



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fixing a MBR (and more) that ??? trashed

2005-09-13 Thread Gary W. Swearingen
Gayn Winters [EMAIL PROTECTED] writes:

 1.  What did/do I need to do to completely fix the Master Boot Record?
 (Short of reinstalling FreeBSD!)

I like what the other guy said about -o packet.

 2.  Was the disk label on the FreeBSD slice ad1s2 really corrupted?  If

Unlikely, at least until you ran sysinstall.  I've never figured out
how it handles existing disklabels.  Badly, in my limited experience.
Use bsdlabel from a rescue CD and see what you have there.  If
you're concered about the mount points, mount the / device and look
in /etc/fstab.

 3.  I couldn't get sysinstall to fix this mess - even though I thought
 it was fixing the FreeBSD partition mount points and applying a new BSD
 Boot Manager.  I couldn't get these fixes to commit.  Can sysinstall
 fix this mess without reinstalling?

I'd use a rescue system -- either CD or another hard disk.

 4.  How do I avoid this situation when I add another disk? (Other than
 trash the w2k partition.)

I don't know about dual-booting MSFT, but you could dd the first
tracks of the HDD and it's primary partitions to files on a formatted
floppy or two for safe-keeping, before doing anything that could mess
up the boot records.  You might want to save the first track of your
FreeBSD primary partition too.  You can then put them (or selected
sectors) back with dd from most unixy rescue OSes.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Fixing a MBR (and more) that ??? trashed

2005-09-13 Thread Gayn Winters
 -Original Message-
 From: Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 13, 2005 2:06 AM
 To: [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Subject: Re: Fixing a MBR (and more) that ??? trashed
 
 
 Gayn Winters wrote:
 
 Life was good with my dual boot w2k/fbsd system until 
 I wanted to add another disk.  The w2k operating
 system, when booted, saw the new hardware, installed it, 
 and demanded that I reboot.  OK, but when I did, the 
 FreeBSD boot manager was trashed. Its menu looked like:
 
 F1 ???
 F2 FreeBSD
 F5
 Default: F#
 
 I could not boot either operating system. In fact the only keys that
did
 anything were ctrl-alt-del!  I removed the new hardware and using
Fixit
 on the 5.4 release CD, I tried 
  boot0cfg -B ad1  
 This recovered the boot manager, and allowed me to boot w2k, but FBSD
 wouldn't boot.  Pressing F2 in the boot menu still did nothing.
   
 
 How far into the disk was FreeBSD?  I had a similar problem until I 
 specified -o packet
 i.e.
 boot0cfg -B -o packet ad1
 

Ah ha!  FreeBSD started at cylinder 41610.  Looks like I definitely 
needed the packet option.


 You could also try writing the boot manager using sysinstall/boot CD:
 
http://www.freebsd.org/cgi/getmsg.cgi?fetch=61+617364+/usr/local/www
/db/text/2005/freebsd-questions/20050626.freebsd-questions

--Alex

You know, I think I tried that, unsuccessfully.  Here are Gary's
thoughts:

 -Original Message-
 From: Gary W. Swearingen [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 13, 2005 8:03 AM
 To: [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Subject: Re: Fixing a MBR (and more) that ??? trashed
 
 
 Gayn Winters [EMAIL PROTECTED] writes:
 
  2.  Was the disk label on the FreeBSD slice ad1s2 really corrupted?
 
 Unlikely, at least until you ran sysinstall.  I've never figured out
 how it handles existing disklabels.  Badly, in my limited experience.
 Use bsdlabel from a rescue CD and see what you have there.  If
 you're concerned about the mount points, mount the / device and look
 in /etc/fstab.
 
  3.  I couldn't get sysinstall to fix this mess - even though I
thought
  it was fixing the FreeBSD partition mount points and applying a new
BSD
  Boot Manager.  I couldn't get these fixes to commit.  Can
sysinstall
  fix this mess without reinstalling?
 
 I'd use a rescue system -- either CD or another hard disk.
 
  4.  How do I avoid this situation when I add another disk? 
 (Other than trash the w2k partition.)
 
 I don't know about dual-booting MSFT, but you could dd the first
 tracks of the HDD and it's primary partitions to files on a formatted
 floppy or two for safe-keeping, before doing anything that could mess
 up the boot records.  You might want to save the first track of your
 FreeBSD primary partition too.  You can then put them (or selected
 sectors) back with dd from most unixy rescue OSes.

Regarding repair:

Alex (above) seemed to think sysinstall would do it, 
but I tried a couple times (reloading FreeBSD each time) 
and gave up.  Given Gary's comments, I suspect that I
corrupted the disk label on the FreeBSD partition mis-using sysinstall
somehow.

I like Gary's idea of a spare copy of the MBR saved on a floppy.
Seems like good insurance.

Regarding avoidance:
I would still like to add additional hard drives to my dual boot
systems.
Is there any safe way to do this?  

Thanks!!!

-gayn


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fixing a MBR (and more) that ??? trashed

2005-09-13 Thread Alex Zbyslaw

Gayn Winters wrote:


Regarding repair:

Alex (above) seemed to think sysinstall would do it, 
but I tried a couple times (reloading FreeBSD each time) 
and gave up.  Given Gary's comments, I suspect that I

corrupted the disk label on the FreeBSD partition mis-using sysinstall
somehow.

 

Sorry, I didn't follow the whole discussion;  I have no idea how 
sysinstall might handle a corrupted disk label, but I do think that when 
it works, it will do -o packet writing the MBR when it thinks it 
necessary, possibly by default.  I thought you'd said that you'd run 
boot0cfg from a fixit shell, and all I was really suggesting was that -o 
packet would fix your boot selection issue.



Regarding avoidance:
I would still like to add additional hard drives to my dual boot
systems.
Is there any safe way to do this?


Why do you think it's not safe to add hard drives?

My own policy is to have every disk in my system capable of booting 
FreeBSD, some more than once (mostly to allow easy upgrading between 
major revisions, or to allow me to try out 6.X ow whatever), but even a 
disk mostly given over to , say, XP, will have a bit at the end that 
boots BSD.  Doesn't solve everything, but even if one disk goes 
ka-blooey I'll be able to boot something more than a fixit shell (I hope 
:-)).


My new policy is to have a hardcopy of fstab, df and all bsdlabels for 
all partitions... being printed even as this email is being sent :-)


--Alex


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Fixing a MBR (and more) that ??? trashed

2005-09-13 Thread Gayn Winters
 -Original Message-
 From: Alex Zbyslaw [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 13, 2005 2:43 PM
 To: [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Subject: Re: Fixing a MBR (and more) that ??? trashed
 
 
 Gayn Winters wrote:
 
 Regarding avoidance:
 I would still like to add additional hard drives to my dual boot
systems.
 Is there any safe way to do this?
 
 Why do you think it's not safe to add hard drives?

It doesn't seem safe if Windows blows away the multiboot MBR that
FreeBSD so carefully made!  Windows overwriting the MBR seems to be the
reason people recommend loading Windows before loading FreeBSD, which I
do.  I just never realized that this problem would come back to bite me
when I added another disk drive.  

 My own policy is to have every disk in my system capable of booting 
 FreeBSD, some more than once (mostly to allow easy upgrading between 
 major revisions, or to allow me to try out 6.X or whatever), 
 but even a disk mostly given over to , say, XP, will have a bit at the
end that 
 boots BSD.  Doesn't solve everything, but even if one disk goes 
 ka-blooey I'll be able to boot something more than a fixit 
 shell (I hope :-)).
 
 My new policy is to have a hardcopy of fstab, df and all 
 bsdlabels for all partitions... being printed even as this email is
being sent :-)
 
 --Alex
 

I need to be able to operate on my clients' disks.  Sometimes I need a
tool that runs under Windows, and other times I need a tool that runs
under FBSD.  This doesn't permit adding an OS to their disks.  A
bootable external USB drive may be the ideal Fixit drive ...  Of
course, I'd rather figure out how not to have the problem at all!  It
would be nice if FreeBSD could write out whatever changes to the MBR and
the partition/slice tables that the new hardware required so that
Windows didn't feel obligated to fix things.

Thanks for the help,

-gayn


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Fixing a MBR (and more) that ??? trashed

2005-09-12 Thread Gayn Winters
I recently installed Windows 2000 and FreeBSD 5.4 on an old HP Pavilion
XG836.  [The FreeBSD installation was a breeze (Kudos to the FBSD
hardware team), while w2k was a disaster!  But, that's another story...]
For reasons of space and cabling (it is a very small box) I put the CD
as the master and the HDD as the slave on a single IDE cable so that the
HDD was ad1.  I dual booted using the FreeBSD Boot Manager.

Life was good until I wanted to add another disk.  The w2k operating
system, when booted, saw the new hardware, installed it, and demanded
that I reboot.  OK, but when I did, the FreeBSD boot manager was
trashed. Its menu looked like:

F1 ???
F2 FreeBSD
F5
Default: F#

I could not boot either operating system. In fact the only keys that did
anything were ctrl-alt-del!  I removed the new hardware and using Fixit
on the 5.4 release CD, I tried 
boot0cfg -B ad1  
This recovered the boot manager, and allowed me to boot w2k, but FBSD
wouldn't boot.  Pressing F2 in the boot menu still did nothing.

Fdisk indicated that the two slices were ok, and the disklabel in
sysinstall showed that the partitions in ad1s2 were fine, but the
mounting information was apparently gone.  If I went into Fixit,
disklabel (bsdlabel) indicated that the label on ad1s2 was bad.  I was a
little surprised, since I assumed (perhaps incorrectly) that all the
corruption that w2k caused was in the Master Boot Record. I tried fixing
it with the disklabel in sysinstall without luck.  Back in Fixit mode, I
could execute bsdlabel -w ad1s2, I couldn't get bsdlabel -e ad1s2 to
work since I couldn't get an editor to run.  EDITOR was /mnt/stand/vi,
which didn't work and blanking EDITOR didn't work either.  Reinstalling
FreeBSD brought everything back.

Questions:
1.  What did/do I need to do to completely fix the Master Boot Record?
(Short of reinstalling FreeBSD!)
2.  Was the disk label on the FreeBSD slice ad1s2 really corrupted?  If
so, I tend to doubt that w2k did it; hence, the culprit would be ... me!
What did I do?
3.  I couldn't get sysinstall to fix this mess - even though I thought
it was fixing the FreeBSD partition mount points and applying a new BSD
Boot Manager.  I couldn't get these fixes to commit.  Can sysinstall
fix this mess without reinstalling?
4.  How do I avoid this situation when I add another disk? (Other than
trash the w2k partition.)

TIA,

-gayn





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]