From owner-freebsd-questions@FreeBSD.ORG Wed Feb 17 22:52:32 2010 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 88D9E106566B for ; Wed, 17 Feb 2010 22:52:32 +0000 (UTC) (envelope-from aiza21@comclark.com) Received: from avmxsmtp3.comclark.com (avmxsmtp3.comclark.com [202.69.191.117]) by mx1.freebsd.org (Postfix) with ESMTP id E10E38FC23 for ; Wed, 17 Feb 2010 22:52:31 +0000 (UTC) Received: (qmail 15369 invoked by uid 89); 17 Feb 2010 22:33:23 -0000 Received: by simscan 1.3.1 ppid: 15361, pid: 15364, t: 0.1267s scanners: attach: 1.3.1 clamav: 0.91.2/m: Received: from unknown (HELO ?10.0.10.3?) (202.69.173.143) by avmxsmtp3.comclark.com with SMTP; 17 Feb 2010 22:33:23 -0000 Message-ID: <4B7C7325.3020002@comclark.com> Date: Thu, 18 Feb 2010 06:52:21 +0800 From: Aiza User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Bob Willcox References: <20100217185846.GA85769@rancor.immure.com> In-Reply-To: <20100217185846.GA85769@rancor.immure.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: questions list Subject: Re: fdisk fails with "Class not found" 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: Wed, 17 Feb 2010 22:52:32 -0000 Bob Willcox wrote: > I am trying to change the sysid of a slice (partition) on my disk from 5 to > 165. When it gets to the point of writing sector 0 it always fails with: > > fdisk: Class not found > fdisk: Failed to write sector zero > > Can someone please tell me what this means, and how do I fix it? > I have included the output from an fdisk attempt below. > > Thanks, > Bob > > root@tavion:10 /usr/home/bob> fdisk -uv > ******* Working on device /dev/ad4 ******* > parameters extracted from in-core disklabel are: > cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl) > > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl) > > Do you want to change our idea of what BIOS thinks ? [n] > 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 524286945 (255999 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 1023/ head 15/ sector 63 > Do you want to change it? [n] > The data for partition 2 is: > sysid 5 (0x05),(Extended DOS) > start 524297340, size 452470725 (220932 Meg), flag 0 > beg: cyl 1023/ head 255/ sector 63; > end: cyl 1023/ head 14/ sector 63 > Do you want to change it? [n] y > Supply a decimal value for "sysid (165=FreeBSD)" [5] 165 > Supply a decimal value for "start" [524297340] > Supply a decimal value for "size" [452470725] > Explicitly specify beg/end address ? [n] > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 524297340, size 452470725 (220932 Meg), flag 0 > beg: cyl 968/ head 4/ sector 1; > end: cyl 311/ head 14/ sector 63 > Are we happy with this entry? [n] y > 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=969021 heads=16 sectors/track=63 (1008 blks/cyl) > > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=969021 heads=16 sectors/track=63 (1008 blks/cyl) > > Information from DOS bootblock is: > 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 63, size 524286945 (255999 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 1; > end: cyl 1023/ head 15/ sector 63 > 2: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 524297340, size 452470725 (220932 Meg), flag 0 > beg: cyl 968/ head 4/ sector 1; > end: cyl 311/ head 14/ sector 63 > 3: > 4: > Should we write new partition table? [n] y > fdisk: Class not found > fdisk: Failed to write sector zero > The 'Class not found' you can ignore. Fdisk still worked. Try dd if=/dev/zero of=/dev/xxx count=2 to remove the MBR them do fdisk -I /dev/xxx command