Date: Mon, 8 Sep 2003 23:29:14 +0100 From: Bruce Cran <bruce@cran.org.uk> To: Michael Edenfield <kutulu@kutulu.org> Cc: current@freebsd.org Subject: Re: re-fdisk'ing a partition - permission denied? Message-ID: <20030908222914.GA22263@buffy.brucec.ath.cx> In-Reply-To: <20030908221037.GA25200@wombat.localnet> References: <20030908203049.5FF375D04@ptavv.es.net> <20030908143810.V55021@walter> <20030908221037.GA25200@wombat.localnet>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 08, 2003 at 06:10:38PM -0400, Michael Edenfield wrote: > * Jason Stone <freebsd-current@dfmm.org> [030908 17:54]: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > > > > You have hit one of the main issues still to be resolved in GEOM. (I > > > don't know that phk thinks it's a problem to be resolved or a feature to > > > be documented.) > > > > > > In any case, since GEOM was added you can no longer slice or label an > > > active device. > > > > Ah - is that to say that, in general, you can't mess with the disk's MBR? > > Yes, if there are any slices in use on the disk you cannot edit the MBR. > Nor can you edit the disklable of an inactive slice if another slice on > the same phyisical disk is in use. In general I beleive all > direct-to-disk access is forbidden. > > e.g., if you have ad0s1a mounted as /, you cannot: > > * fdisk ad0 to create ad0s2 > * disklabel ad0s2 to create ad0s2a > * perform any data transfer with ad0 as the target. > > All of this based on my own attempts to repartition a dual-boot disk > into a single-boot disk, admittedly at least 2 months ago but I suspect > not much has changed since then. As mentioned, phk, at least, seemed to > beleive very strongly that this was never going to be permitted and > people just needed to be made aware.. Ultimately you need to use a boot > floppy and unmount the whole physical disk device. > > There was, at one point, talk of adding some sort of > "geom.dont_blame_phk_when_you_shoot_your_ankle_off" sysctl to permit this > type of access when the user was absolutely sure they knew exactly what > kind of dangerous and potentially corrupting thing they were doing and > wanted to do it anyway, but I'm not sure it got anywhere. > There's not a sysctl value like that that you can set, but by setting the geom debug sysctl to some value which is specified in the sources,you can get the same effect. I can't remember what the specific value is, but apparently it's fairly obvious, since someone who was new to FreeBSD found it very quickly, after commenting how aesthetically pleasing the source code is! -- Bruce Cran
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030908222914.GA22263>