Re: re-fdisk'ing a partition - permission denied?

From: Michael Edenfield <kutulu_at_kutulu.org>
Date: Mon, 8 Sep 2003 18:10:38 -0400
* Jason Stone <freebsd-current_at_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.

--Mike


Received on Mon Sep 08 2003 - 13:10:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC