1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to remove boot manager in freebsd 8.0 ?

Discussion in 'Installing and Upgrading FreeBSD' started by riku, Apr 13, 2010.

  1. riku

    riku New Member

    Messages:
    14
    Thanks Received:
    1
    I can not use this command

    Code:
    fdisk -B -b /boot/boot0 ad0


    error info

    Code:
    fdisk: Class not found
    fdisk: Faild to write sector zero
     
  2. Bunyan

    Bunyan Member

    Messages:
    143
    Thanks Received:
    15
    You'll never do that as long as the filesystems are mounted (fdisk operates on unmounted filesystems only).
    You need a FreeBSD LiveFS CD.
    I am not sure whether it works in single-user mode.
     
    riku thanks for this.
  3. vermaden

    vermaden Well-Known Member

    Messages:
    2,364
    Thanks Received:
    678
    @riku

    Try that:
    Code:
    # sysctl kern.geom.debugflags=16
    # kldload geom_mbr
    # fdisk -B -b /boot/boot0 ad0
    # sysctl kern.geom.debugflags=0
    # kldunload geom_mbr


    @Bunyan

    fdisk(1) does not operate on filesystems ... no matter if mounted or unmounted.
     
    riku thanks for this.
  4. Bunyan

    Bunyan Member

    Messages:
    143
    Thanks Received:
    15
    Perhaps I should have said devices i.e files that are in use.
     
  5. phoenix

    phoenix Moderator Staff Member Moderator

    Messages:
    3,450
    Thanks Received:
    771
    And, depending on the version of FreeBSD, you may need to set debugflags to 17 before you can manipulate an in-use device.
     
  6. riku

    riku New Member

    Messages:
    14
    Thanks Received:
    1
    Thanks !