From owner-freebsd-questions@FreeBSD.ORG Sun Dec 28 20:36:16 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 5FAE81065675 for ; Sun, 28 Dec 2008 20:36:16 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by mx1.freebsd.org (Postfix) with ESMTP id 33DB08FC26 for ; Sun, 28 Dec 2008 20:36:16 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: by wa-out-1112.google.com with SMTP id m34so2558877wag.27 for ; Sun, 28 Dec 2008 12:36:16 -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 :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=8NwB2doAOvZ7DRyWBPKWg2BB/K7TFKR5cPjMLzNoxGw=; b=scZJ+NiXvK8T9XQvvCcv6qBaCdq5D7yBS0iQh1CoTBBjclBXFkMheF+J24paH7PYl+ 2E0Q5pB1CP//RPXc2YPO8XRbV5XNqFQxZWsyFLGXV4NYodRsKOrskPcpfkQ2+xkGn6Z4 cUdBi+Z+ydZxevXBnAj7STcaun9IDzneMuKF8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=MMunUlXr2hrQjj2JqtWXXSiHnB6Y48Qf9ShD5Rxw0PLnTWFLpuw2ZG2MIZjRNoNPwf g6nwOZUQbKusHgpvjGzSsJfBUTMnJg/VQwW39/FR3vEngKHuKURJ5uLytsQTiOMnnl5w umTKlhbUUF4SfA4//0dIWHnzZl/Te65lTZJuY= Received: by 10.114.133.1 with SMTP id g1mr8489568wad.21.1230496575903; Sun, 28 Dec 2008 12:36:15 -0800 (PST) Received: from ?192.168.4.44? (c-76-113-34-1.hsd1.nm.comcast.net [76.113.34.1]) by mx.google.com with ESMTPS id a8sm15508099poa.19.2008.12.28.12.36.13 (version=SSLv3 cipher=RC4-MD5); Sun, 28 Dec 2008 12:36:14 -0800 (PST) Message-ID: <4957E333.1050103@gmail.com> Date: Sun, 28 Dec 2008 13:36:03 -0700 From: Tim User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: David Scialom References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org 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: Sun, 28 Dec 2008 20:36:16 -0000 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.