From owner-freebsd-current Thu Jan 4 10:53:58 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA23561 for current-outgoing; Thu, 4 Jan 1996 10:53:58 -0800 (PST) Received: from GndRsh.aac.dev.com (GndRsh.aac.dev.com [198.145.92.241]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA23536 for ; Thu, 4 Jan 1996 10:53:51 -0800 (PST) Received: (from rgrimes@localhost) by GndRsh.aac.dev.com (8.6.12/8.6.12) id KAA29761; Thu, 4 Jan 1996 10:53:05 -0800 From: "Rodney W. Grimes" Message-Id: <199601041853.KAA29761@GndRsh.aac.dev.com> Subject: Re: Odd question.. ;-) To: peter@jhome.DIALix.COM (Peter Wemm) Date: Thu, 4 Jan 1996 10:53:05 -0800 (PST) Cc: current@freebsd.org In-Reply-To: from "Peter Wemm" at Jan 4, 96 09:43:52 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org Precedence: bulk > > Hi all.. > > I have a strange question.. (even stranger since it's from somebody who > should know.. :-) > > How do I update the boot code to -current? :-) 1) fdisk sd0 | lpr #Hardcopy so you can read it if it gets #trashed 2) disklabel sd0 | lpr #Ditto 3) disklabel -B sd0 4) fdisk sd0 #Make sure it matches 1) above. > > Last time I messed with disklabel and /usr/mdec, I ended up trashing my > system beyond repair.. I've not looked again in something like 12 months. Your disk is probably partitioned so that the offset of the BSD slice starts at sector 0 of the disk, this causes the boot1 code to overlay the MBR when you do a disklabel -B, which causes your MBR to revert to the compiled in one. I have seen other replies saying that they have had no problem whatsoever with disklabel -B, and that will be true so long as the offset of your BSD slice is >0 sector. For example: ******* Working on device /dev/rsd0 ******* parameters extracted from in-core disklabel are: cylinders=511 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=511 heads=64 sectors/track=32 (2048 blks/cyl) Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 0 is: The data for partition 1 is: The data for partition 2 is: The data for partition 3 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 0, size 1046528 (511 Meg), flag 80 beg: cyl 0/ sector 1/ head 0; end: cyl 510/ sector 32/ head 63 SkyRsh# SkyRsh# disklabel -B sd0 SkyRsh# fdisk sd0 ******* Working on device /dev/rsd0 ******* parameters extracted from in-core disklabel are: cylinders=511 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=511 heads=64 sectors/track=32 (2048 blks/cyl) Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 0 is: The data for partition 1 is: The data for partition 2 is: The data for partition 3 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 0, size 50000 (24 Meg), flag 80 beg: cyl 0/ sector 1/ head 0; end: cyl 1023/ sector 63/ head 255 SkyRsh# Boom... there goes my partition table :-(. > Basically, I want to install a new /usr/mdec/boot2, because this system > has a version 2.0.5 boot2 that has the missing LF during boot.. :-) > (real crisis, eh? :-) > > So, what do I do? disklabel -B sd0 ? I think last time I did that, I > lost the fdisk tables... but I dont really remember... -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD