Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 May 2003 10:11:59 -0700
From:      Joshua Oreman <oremanj@webserver.get-linux.org>
To:        Herbert <herbert@bugat.at>
Cc:        questions@freebsd.org
Subject:   Re: fdisk/disklabel - Error: unable to write data to disk ad0
Message-ID:  <20030531171159.GA26434@webserver.get-linux.org>
In-Reply-To: <20030531170555.GA585@TK212017121218.teleweb.at>
References:  <20030531170555.GA585@TK212017121218.teleweb.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 31, 2003 at 07:05:56PM +0200 or thereabouts, Herbert seemed to write:
> Hei!
> 
> On Thursday May 29th I installed FreeBSD 5.1 Beta2. The next day I've
> update to CURRENT from May 30th. I have a 60 GB ATA harddisk and during
> installation I created only 1 20 GB slice for FreeBSD. Today I wanted
> to use the other 40 GB of my hard disk and create two more slices each
> 20 GB. Well, fdisk reports that the disk geometry is wrong and sets it
> to 7476/255/63, the same disk geometry the BIOS reports. When I try to
> save the changes in fdisk, I get the following error messages:
> 
>       Error: Unable to write data to disk ad0
>       Disk partition write returned an error status!

It's GEOM preventing you from shooting yourself in the foot. Feature, not bug :-)

> 
> Hmm, I tried both in multiuser and singleuser mode.
> Finally I booted with the floppies I had used to setup FreeBSD 5.1B2.
> Fdisk also reports that the disk geometry is wrong and sets it to
> 7476/255/63. But creating the slices and saving the changes did work:
> 
> The data for partition 1 is:
> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
> ----[snip]----
> The data for partition 2 is:
> sysid 165 (0xa5),(FreeBSD/NetBSD/386BS
> ----[snip]----
> The data for partition 3 is:
> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
> ----[snip]----
> The data for partition 4 is:
> <UNUSED>
> 
> Now I have booted FreeBSD from hard disk and try to create partitions
> within the new slices. But again I get:
> 
>     Error: unable to write data to disk ad0
> 
> Now I am booting with the install floppies again. I guess this is 
> working fine.
> Any ideas what I am doing wrong?

Nothing - you should boot from install floppy to partition any drive which is
even partially being used, even if you don't change the used parts. (I had
this problem too due to a swapspace on the drive.)

HTH,
-- Josh

> 
> Regards,
> Herbert
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030531171159.GA26434>