using gpart(8) to slice a disk

Matthias Apitz guru at unixarea.de
Mon Feb 28 14:30:41 UTC 2011


Hello,

Last weekend I've installed 9-CURRENT on a laptop by booting a
(prepared) system from an USB key and slicing the disk with:

    # gpart create -s mbr ad4                 # Init the disk with an MBR
    # gpart add -t freebsd ad4                # Create a BSD container
    # gpart create -s bsd ad4s1               # Init with a BSD scheme
    # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
    # gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
    # gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
    # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
    # gpart add -t freebsd-ufs ad4s1          # all rest for /usr

Then I mounted the ad4s1a ... ad4s1f as a target files system tree below
/mnt and installed the system with 'make instal ... DESTDIR=/mnt';

all went fine, but the created partition on ad4 was not marked as bootable
(flag 'A'). So I used sysinstall(8) from the again booted USB key to set
ad4s1 bootable and to install in addition the FreeBSD boot manager.
After this the (new) system came up fine and is working.

I've read the man page of gpart(8) but do not see clearly what I did
wrong with the above sequence and esp. what would have set the missing
boot flag? Any hint? Thanks in advance

	matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <guru at unixarea.de> - w http://www.unixarea.de/


More information about the freebsd-questions mailing list