fdisk incompatibility between major versions
Freddie Cash
fjwcash at gmail.com
Mon May 25 17:59:32 UTC 2009
On Mon, May 25, 2009 at 10:35 AM, Robert Huff <roberthuff at rcn.com> wrote:
> Due to a combination of my spectacular stupidity and external events, a
> machine running -Current from late April will no longer boot. Specifically,
> instead of the loader menu screen I get "Invalid partition".
> Crud.
> Broke out the most recent fixit disk, which is from 7.1 (Jan 2009).
> Boots fine; fdisk finds the correct slice information; bsdlabel finds the
> right partition data; mount / and /usr under LiveFS
> Whew!!!!
> So ... I'm guessing the problem in the boot code is corrupted, and if I do
>
> fdisk -B -b <path to -CURRENT boot blocks> da0
>
> it should put things back to normal.
> However: when I do the second commit I get
>
> fdisk: Geom not found "da0"
> fdsk: failed to write sector 0
In order to alter a drive with a mounted filesystem (ie an active
drive), you need to first set the drive to writable:
sysctl -w kern.geom.debugflags=16
This has been the case for several years now (since 5.x I believe).
--
Freddie Cash
fjwcash at gmail.com
More information about the freebsd-current
mailing list