5.1-Release: Write operation on enire ad{0,1,2,...} with mounted partition[s]

Joshua Oreman oremanj at webserver.get-linux.org
Sat Jun 14 21:12:54 PDT 2003


On Sun, Jun 15, 2003 at 05:04:32AM +0300 or thereabouts, kAlunya seemed to write:
> Hello, Core-Team!

This is the freebsd-questions mailing list.

> 
> As shortly said in ${SUBJECT}, there is a question.
> In 5.1 Release thereis a situation:
> # whoami
> root
> # dd if=/dev/ad0 of=sect0_copy count=1
> ..........it is ok........
> # dd if=sect0_copy of=/dev/ad0
> dd: /dev/ad0: Operation not permitted
That's at the device level.
> # rm -rf /                ????? :)
That's at the filesystem level. There's an important difference.
> 
> What is going on with permition to write my boot sector back on ad0?
> So image repeats when I am in single mode with / mounted as RO
> Is it ok with driver?
> >From one side - it's ok, FreeBSD says: "Hm... Thereis mounted things on this device! ;( Go away from my ad0!!!"
> >From other side... Am I r00t on 127.0.0.1??? :((
> I _DO WANT_ this operation. But Free doesn't...

It's GEOM.
Google the archives for allow_shooting_into_my_foot.
There's a patch to make this a sysctl-configurable behavior.

-- Josh

> 
> Is it good with she?
> -------------------------
> With best wishes, Nick.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list