Re: Can't change partition table anymore

From: Daniel O'Connor <doconnor_at_gsoft.com.au>
Date: Mon, 4 Apr 2005 12:35:15 +0930
On Mon, 4 Apr 2005 12:27, Andrey Chernov wrote:
> On Mon, Apr 04, 2005 at 11:45:17AM +0930, Daniel O'Connor wrote:
> > Altering the MBR while you have a partition mounted is potentially quite
> > dangerous.
>
> Don't say "dangerous" for _root_ user. Is there any purpose left for being
> root anymore? According to your logic, all root operations should be
> disabled by some unknown undocumented sysctls because it is too dangerous
> to be the root. Better kill yourself than to be the root.

Why chflags noschg libc and the kernel then?
Why have any warnings on anything?

> > The reason it was possible in the past was because there was no
> > protection against this kind of thing.
>
> Does anybody asks for protection here? It was not me. It was not majority
> of Unix sysadmins. Such kind of protection should be turned off by default
> in case it even exists as the toy for some paranoid people.

I'm not sure that is the case.

> > Use boot0cfg and the FreeBSD bootloader instead?
>
> boot0cfg not works (I assume the reason is the same).
>
> I can't write FreeBSD bootloader because reinstalled Windows overwrite it
> with standard MBR and sysinstall don't allow to write bootloader anymore.
> The only thing I not try yet in that situation was 'dd' - I was too lasy
> to find needed byte.

Strange, I can run boot0cfg fine here..

[inchoate 12:34] ~ >sudo boot0cfg -Bv -o nopacket /dev/ad0
#   flag     start chs   type       end chs       offset         size
1   0x00      0:  1: 1   0x06     63: 11:63           63        64197
2   0x00      4:  0: 1   0x0f    891:254:63        64260     30716280
3   0x80    892:  0: 1   0xa5    127:254:63     30780540     86429700

version=1.0  drive=0x80  mask=0xf  ticks=182
options=nopacket,update,nosetdrv
default_selection=F1 (Slice 1)

[inchoate 12:34] ~ >sudo boot0cfg -Bv -o packet /dev/ad0
#   flag     start chs   type       end chs       offset         size
1   0x00      0:  1: 1   0x06     63: 11:63           63        64197
2   0x00      4:  0: 1   0x0f    891:254:63        64260     30716280
3   0x80    892:  0: 1   0xa5    127:254:63     30780540     86429700

version=1.0  drive=0x80  mask=0xf  ticks=182
options=packet,update,nosetdrv
default_selection=F1 (Slice 1)

[inchoate 12:34] ~ >uname -a
FreeBSD inchoate.localdomain 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Thu Mar 31 11:28:52 CST 2005     darius_at_inchoate.localdomain:/usr/src/sys/i386/compile/INCHOATE  i386

[inchoate 12:34] ~ >mount
/dev/ad0s3a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad0s3e on /usr (ufs, local, soft-updates)
/dev/ad0s3d on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

Received on Mon Apr 04 2005 - 01:05:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:31 UTC