From owner-freebsd-questions Tue Feb 19 9:40:11 2002 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.infowest.com (ns1.infowest.com [204.17.177.10]) by hub.freebsd.org (Postfix) with ESMTP id 7A74C37B53A for ; Tue, 19 Feb 2002 09:39:22 -0800 (PST) Received: from Presarionb (unknown [208.186.109.20]) by ns1.infowest.com (Postfix) with SMTP id 1218C217D8; Tue, 19 Feb 2002 10:39:20 -0700 (MST) Date: Tue, 19 Feb 2002 10:37:44 -0700 To: Glenn Becker , FreeBSD Questions From: Lorin Lund Subject: Re: partitions, disklabel, etc. X-Mailer: Opera 5.11 build 904 X-Priority: 3 (Normal) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <20020219173920.1218C217D8@ns1.infowest.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've got a little program, runs under DOS, uses BIOS disk IO that allows some mucking around with the BIOS partition table. If it would be useful I could send it to you. Some of it's capabilities are: 1) hand-editing the type field, the start cyl field, the end cyl field, 2) swap slots in the partition table, It's built with djgpp & rhide. Let me know if you think it would help. 2/18/2002 7:09:33 PM, Glenn Becker wrote: >Hi, > >I've got a dual boot Debian GNU/Linux and FreeBSD 4.5 installation on >an older Toshiba laptop (Satellite Pro 470CDT). Lately I've been >concerned about some messages upon bootup (relevant part of dmesg >output reproduced below) where the Linux hunks of the hard drive are >picked out as being invalid. > >Honestly, I'm not sure why they are showing up there at all. But I >think the problem(s) may originate with my stupid deletion of my >Linux swap partition and my subsequent replacement of that same >partition -- I recall reading in a FreeBSD + Linux Mini-HOWTO that >a) one has to put FreeBSD =after= Linux on an HD and b) it's best >not to muck with the Linux partitions after the dual-OS system is >set up. > >I've had no problems (yet) with either system, but have been trying >to research it to see if I can fix it WITHOUT reinstalling both OSs >from scratch (I'd like to avoid this and the wear on the lappy's CD >drive if possible). Some other weird stuff has popped up. > >If I run disklabel -r command on /dev/ad0, I get this: > >disklabel: bad pack magic number (label is damaged, or pack is >unlabeled) > >Without -r, I get something completely different, which I reproduce >at the end of this message. > >The output of fdisk (see below) also seems completely screwed up - >it shows all three partitions on the drive as beginning and ending >at the same CHS spot: cyl 1023/ head 254/ sector 63. This seems >like a cylinder 1024 thang? Mebbe? > >Soooo, I'm wondering: 1) should I create a disklabel for /dev/ad0, >or will this totally bork all my Linux stuff? 2) can I simply >-delete- the device files /dev/ad0s1* and /dev/ad0s2*, since I'm >not using them for anything in FreeBSD? Or not? > >In short, how do I fix this thing? Or do I? > >Thanks for any enlightenment and apologies for the length. > >Glenn Becker > > > > > >%%%%%% RELEVANT lines from dmesg %%%%%%%%%%% > >Mounting root from ufs:/dev/ad0s3a >ad0s1: raw partition size != slice size >ad0s1: start 63, end 27342629, size 27342567 >ad0s1c: start 63, end 30716279, size 30716217 >ad0s1: truncating raw partition >ad0s1: rejecting partition in BSD label: it isn't entirely within the slice >ad0s1: start 63, end 27342629, size 27342567 >ad0s1f: start 414367, end 30716279, size 30301913 >ad0s2: raw partition size != slice size >ad0s2: start 27342630, end 27599669, size 257040 >ad0s2c: start 27342630, end 58605119, size 31262490 >ad0s2: truncating raw partition >ad0s2: rejecting partition in BSD label: it isn't entirely within the slice >ad0s2: start 27342630, end 27599669, size 257040 >ad0s2b: start 27445030, end 27715973, size 270944 >ad0s2: rejecting partition in BSD label: it isn't entirely within the slice >ad0s2e: start 27715974, end 27756933, size 40960 >ad0s2: rejecting partition in BSD label: it isn't entirely within the slice >ad0s2f: start 27756934, end 58605119, size 30848186 > > >%%%%%%%%%%OUTPUT of disklabel /dev/ad0 %%%%%%%%%%% > ># /dev/ad0: >type: unknown >disk: amnesiac >label: fictitious >flags: >bytes/sector: 512 >sectors/track: 63 >tracks/cylinder: 255 >sectors/cylinder: 16065 >cylinders: 3648 >sectors/unit: 58605120 >rpm: 3600 >interleave: 1 >trackskew: 0 >cylinderskew: 0 >headswitch: 0 # milliseconds >track-to-track seek: 0 # milliseconds >drivedata: 0 > >8 partitions: ># size offset fstype [fsize bsize bps/cpg] > c: 58605120 0 unused 0 0 # (Cyl. 0 - 3647) > > >%%%%OUTPUT of fdisk /dev/ad0 %%%%%%%%%%% > >******* Working on device /dev/ad0 ******* >parameters extracted from in-core disklabel are: >cylinders=3648 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=3648 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 131,(Linux filesystem) > start 63, size 27342567 (13350 Meg), flag 0 > beg: cyl 0/ head 1/ sector 1; > end: cyl 1023/ head 254/ sector 63 >The data for partition 2 is: >sysid 130,(Linux swap or Solaris x86) > start 27342630, size 257040 (125 Meg), flag 0 > beg: cyl 1023/ head 255/ sector 63; > end: cyl 1023/ head 254/ sector 63 >The data for partition 3 is: >sysid 165,(FreeBSD/NetBSD/386BSD) > start 27599670, size 31005450 (15139 Meg), flag 80 (active) > beg: cyl 1023/ head 255/ sector 63; > end: cyl 1023/ head 254/ sector 63 >The data for partition 4 is: > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message