From owner-freebsd-current@FreeBSD.ORG Tue Mar 30 07:13:17 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A5D716A4CE for ; Tue, 30 Mar 2004 07:13:17 -0800 (PST) Received: from hotmail.com (bay8-f68.bay8.hotmail.com [64.4.27.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 449D843D2F for ; Tue, 30 Mar 2004 07:13:17 -0800 (PST) (envelope-from evantd@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 30 Mar 2004 07:13:17 -0800 Received: from 128.208.59.102 by by8fd.bay8.hotmail.msn.com with HTTP; Tue, 30 Mar 2004 15:13:16 GMT X-Originating-IP: [128.208.59.102] X-Originating-Email: [evantd@hotmail.com] X-Sender: evantd@hotmail.com From: "Evan Dower" To: roberto.nunnari@supsi.ch, freebsd-current@freebsd.org Date: Tue, 30 Mar 2004 07:13:16 -0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 30 Mar 2004 15:13:17.0209 (UTC) FILETIME=[87644890:01C41669] Subject: RE: help! I broke the partition table of the drive with the bootable partition! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 15:13:17 -0000 You'll need to run fdisk (or the visual version of fdisk in sysinstall that you can get to through Index->fdisk) to change the values back to what they were. In order for the partition to be marked bootable, it needs the flag 0x80 (active). In sysinstall's fdisk interface you can get the effect by pushing S (for Set bootable). I hope this helps you out, -- Evan Dower Undergraduate, Computer Science University of Washington Public key: http://students.washington.edu/evantd/pgp-pub-key.txt Key fingerprint = D321 FA24 4BDA F82D 53A9 5B27 7D15 5A4F 033F 887D >From: Roberto Nunnari >To: freebsd-current@freebsd.org >Subject: help! I broke the partition table of the drive with the bootable >partition! >Date: Tue, 30 Mar 2004 10:30:53 +0200 > >Hi all. > >I was installing a new drive on my 5.2.1-p3 and I believe >I made some mistake while using fdisk and bsdlabel.. in >fact the partition table for my bootable disk has changed. > > >this was my fdisk amrd0 before: > >web.dti.supsi.ch# cat fdisk.amrd0 >******* Working on device /dev/amrd0 ******* >parameters extracted from in-core disklabel are: >cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) > >Figures below won't work with BIOS for partitions not in cyl 1 >parameters to be used for BIOS calculations are: >cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) > >Media sector size is 512 >Warning: BIOS sector numbering starts with sector 1 >Information from DOS bootblock is: >The data for partition 1 is: >sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 63, size 71007237 (34671 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 1023/ head 254/ sector 63 >The data for partition 2 is: > >The data for partition 3 is: > >The data for partition 4 is: > > > >and this is how it looks now.. > >web.dti.supsi.ch# fdisk amrd0 >******* Working on device /dev/amrd0 ******* >parameters extracted from in-core disklabel are: >cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) > >Figures below won't work with BIOS for partitions not in cyl 1 >parameters to be used for BIOS calculations are: >cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) > >Media sector size is 512 >Warning: BIOS sector numbering starts with sector 1 >Information from DOS bootblock is: >The data for partition 1 is: >sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 0, size 70766325 (34553 Meg), flag 0 > beg: cyl 0/ head 0/ sector 1; > end: cyl 308/ head 254/ sector 63 >The data for partition 2 is: > >The data for partition 3 is: > >The data for partition 4 is: > > > >as you can see, it is no longer bootable, and it doesn't >start at sect 63 like before but at 0 > >How can I fix it? I was about to give the following command >but thought I'd better ask first here... > >web.dti.supsi.ch# fdisk -B > >I expect the above to reinstall the boot code and to correct >the partition table.. I expect I'll be able to give that >command while the system and running and so the filesystem >mounted. > >or if that doesn't work.. >web.dti.supsi.ch# fdisk -B -f fdisk.conf.amrd0 > >also.. with the -t option the results are almost identical >to the original state, but end cyl is different.. See.. >is that important? > >web.dti.supsi.ch# fdisk -t -B -f fdisk.conf.amrd0 >******* Working on device /dev/amrd0 ******* >fdisk: WARNING line 2: number of cylinders (4420) may be out-of-range > (must be within 1-1024 for normal BIOS operation, unless the entire >disk > is dedicated to FreeBSD) >parameters extracted from in-core disklabel are: >cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) > >Figures below won't work with BIOS for partitions not in cyl 1 >parameters to be used for BIOS calculations are: >cylinders=4420 heads=255 sectors/track=63 (16065 blks/cyl) > >Information from DOS bootblock is: >1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 63, size 71007237 (34671 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 323/ head 254/ sector 63 >2: >3: >4: > > >and here is the fdisk.conf.amrd0 file >web.dti.supsi.ch# cat fdisk.conf.amrd0 ># values extacted from old fdisk.amrd0 >g c4420 h255 s63 >p 1 165 63 71007237 >p 2 0 0 0 >p 3 0 0 0 >p 4 0 0 0 >a 1 > > >Thank you for your help. >-- > Roberto Nunnari -software engineer- > mailto:roberto.nunnari@supsi.ch > Scuola Universitaria Professionale della Svizzera Italiana > Dipartimento Tecnologie Innovative > http://www.dti.supsi.ch > SUPSI-DTI > Via Cantonale tel: +41-91-6108561 > 6928 Manno """ fax: +41-91-6108570 > Switzerland (o o) >=======================oOO==(_)==OOo======================== > >_______________________________________________ >freebsd-current@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-current >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" _________________________________________________________________ Free up your inbox with MSN Hotmail Extra Storage. Multiple plans available. http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/