From owner-freebsd-questions@FreeBSD.ORG Mon Dec 29 10:05:06 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 233A71065674 for ; Mon, 29 Dec 2008 10:05:06 +0000 (UTC) (envelope-from dscialom@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.190]) by mx1.freebsd.org (Postfix) with ESMTP id 6F7258FC17 for ; Mon, 29 Dec 2008 10:05:05 +0000 (UTC) (envelope-from dscialom@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so3123184tib.3 for ; Mon, 29 Dec 2008 02:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=s58neI+3C4+PTbf9yp++6E/c/TSXYJIi2cuxH7qsNko=; b=M7wMPSnEIq9JU4cN+p/Pd0otDV9epx7sJZyUWj2WomED33TZFMpeRr2apxW95/drAT ybc0hxwI43c10Jx9n3EnAtK08njyYpRQELxrVhkB4M69kZ5ONoM2gvDB62so6whYQuTy cpRqhwlQP/bI6QqqUIiMhhdmWuoAjwPyZEVe4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=DLQId60IURVtYAYOR31QyWUOWT7Z6f70bLLot3IQ2rVPcNK5HpkeiLURYb9Z3laTqe upQob4MtzUwKoX5+R0BCaBijBJEX0NcdWvK1MyOl4+vPWH5MWuJ0QzgZPpYbUvj6Yt6T dXkDmhiHrMo8cqHa9pUUrqezdm1a+K/ctMJwE= Received: by 10.110.40.8 with SMTP id n8mr469998tin.0.1230545104247; Mon, 29 Dec 2008 02:05:04 -0800 (PST) Received: by 10.110.17.13 with HTTP; Mon, 29 Dec 2008 02:05:03 -0800 (PST) Message-ID: Date: Mon, 29 Dec 2008 11:05:03 +0100 From: "David Scialom" To: Tim , freebsd-questions@freebsd.org In-Reply-To: <4957E333.1050103@gmail.com> MIME-Version: 1.0 References: <4957E333.1050103@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Unable to modify sysid with Fdisk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 10:05:06 -0000 Hello Tim, Thanks for your suggestion. The probleme after the section 3 does not exist. It is actually a wrong copy paste done by me. Nothing changed after your suggestion : Zurich# dd if=/dev/zero bs=512 count=128 of=/dev/da0 128+0 records in 128+0 records out 65536 bytes transferred in 0.095998 secs (682681 bytes/sec) Zurich# fdisk -u da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=8 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=8 heads=64 sectors/track=32 (2048 blks/cyl) Do you want to change our idea of what BIOS thinks ? [n] *fdisk: invalid fdisk partition table found* 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 32, size 16352 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 7/ head 63/ sector 32 Do you want to change it? [n] y Supply a decimal value for "sysid (165=FreeBSD)" [165] 12 Supply a decimal value for "start" [32] Supply a decimal value for "size" [16352] Explicitly specify beg/end address ? [n] sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) start 32, size 16352 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 7/ head 63/ sector 32 Are we happy with this entry? [n] y The data for partition 2 is: Do you want to change it? [n] The data for partition 3 is: Do you want to change it? [n] The data for partition 4 is: Do you want to change it? [n] Partition 1 is marked active Do you want to change the active partition? [n] We haven't changed the partition table yet. This is your last chance. parameters extracted from in-core disklabel are: cylinders=8 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=8 heads=64 sectors/track=32 (2048 blks/cyl) Information from DOS bootblock is: 1: sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) start 32, size 16352 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 7/ head 63/ sector 32 2: 3: 4: Should we write new partition table? [n] y *fdisk: Geom not found: "da0"* Zurich# fdisk da0 ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=8 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=8 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found 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 32, size 16352 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 7/ head 63/ sector 32 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: 2008/12/28 Tim > David Scialom wrote: > >> Hello, >> >> It seems that it is impossible to modify the sysid with fdisk since >> FreeBSD >> 6.2. I am actually using FreeBSD7.0. >> When I want to modify my the sysid from 165(ufs) to 12(Fat32) i get the >> message "Geom not found: da0" and no change is made: da0 is stock with >> sysid >> = 165. The detail are provided below. I tried also to do the same from the >> install FreeBSD CD without success. >> >> As someone a solution ? >> >> Zurich# fdisk -u da0 >> ******* Working on device /dev/da0 ******* >> parameters extracted from in-core disklabel are: >> cylinders=1009 heads=64 sectors/track=32 (2048 blks/cyl) >> >> parameters to be used for BIOS calculations are: >> cylinders=1009 heads=64 sectors/track=32 (2048 blks/cyl) >> >> Do you want to change our idea of what BIOS thinks ? [n] >> *fdisk: invalid fdisk partition table found* >> 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 32, size 2066400 (1008 Meg), flag 80 (active) >> beg: cyl 0/ head 1/ sector 1; >> end: cyl 1008/ head 63/ sector 32 >> Do you want to change it? [n] y >> Supply a decimal value for "sysid (165=FreeBSD)" [165] 12 >> Supply a decimal value for "start" [32] >> Susysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) >> start 32, size 2066400 (1008 Meg), flag 80 (active) >> beg: cyl 0/ head 1/ sector 1; >> end: cyl 1008/ head 63/ sector 32 >> Are we happy with this entry? [n] y >> The data for partition 2 is: >> >> Do you want to change it? [n] >> The data for partition 3 is: >> >> Supply a decimal value for "size" [2066400] >> Explicitly specify beg/end address ? [n] >> sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) >> start 32, size 2066400 (1008 Meg), flag 80 (active) >> beg: cyl 0/ head 1/ sector 1; >> end: cyl 1008/ head 63/ sector 32 >> Are we happy with this entry? [n] y >> The data for partition 2 is: >> >> Do you want to change it? [n] >> The data for partition 3 is: >> >> Do you want to change it? [n] >> The data for partition 4 is: >> >> Do you want to change it? [n] >> Partition 1 is marked active >> Do you want to change the active partition? [n] y >> Supply a decimal value for "active partition" [1] >> Are you happy with this choice [n] y >> >> We haven't changed the partition table yet. This is your last chance. >> parameters extracted from in-core disklabel are: >> cylinders=1009 heads=64 sectors/track=32 (2048 blks/cyl) >> >> parameters to be used for BIOS calculations are: >> cylinders=1009 heads=64 sectors/track=32 (2048 blks/cyl) >> >> Information from DOS bootblock is: >> 1: sysid 12 (0x0c),(DOS or Windows 95 with 32 bit FAT (LBA)) >> start 32, size 2066400 (1008 Meg), flag 80 (active) >> beg: cyl 0/ head 1/ sector 1; >> end: cyl 1008/ head 63/ sector 32 >> 2: >> 3: >> 4: >> Should we write new partition table? [n] y >> fdisk: Geom not found: "da0" >> Zurich# fdisk da0 >> ******* Working on device /dev/da0 ******* >> parameters extracted from in-core disklabel are: >> cylinders=1009 heads=64 sectors/track=32 (2048 blks/cyl) >> >> parameters to be used for BIOS calculations are: >> cylinders=1009 heads=64 sectors/track=32 (2048 blks/cyl) >> >> fdisk: invalid fdisk partition table found >> 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 32, size 2066400 (1008 Meg), flag 80 (active) >> beg: cyl 0/ head 1/ sector 1; >> end: cyl 1008/ head 63/ sector 32 >> The data for partition 2 is: >> >> The data for partition 3 is: >> >> The data for partition 4 is: >> > >> > > The "Warning: Invalid fdisk partition table found" is a red flag to me. If > the partition boundries don't lie on a cylinder, than it's invalid. > > I also see after it prints partition 3, it randomly asks for the size of > the partition, without asking for anything else. > > I think those first 512 sectors are messed up. If I were you, I'd wipe the > first 2 tracks of the disk. > dd if=/dev/zero bs=512 count=128 of=/dev/da0 > > And recreate the partition then. fdisk isn't seeing a sane layout to begin > with and it may silently be discarding the changes asked. > > Good luck. >