Outils pour utilisateurs

Outils du site


Panneau latéral

Tips

Divers

Projets

Ham Radio

Machines

Research

Privé

Études

tips:openbsd

OpenBSD Tips

Some things that I sometimes need to remember when installing and maintaining my OpenBSD systems.

Create a Disc

Create a bootable OpenBSD CD for i3861) from the release tree.

OpenBSD$ export ARCH=i386
OpenBSD$ export VERSION=4.0
OpenBSD$ export BOOTCATALOG=${VERSION}/${ARCH}/cd40.iso
OpenBSD$ mkisofs -r -b ${VERSION}/${ARCH}/cdrom${VERSION/./}.fs `ls ${VERSION} | grep -v "${ARCH}\|ports\|sys\|src\|ftplist\|ANNOUNCEMENT\|HARDWARE\|PACKAGES\|PORTS\|README\|SIZES\|XF4.tar.gz" | sed -e "s#^#-x ./${VERSION}/#" -e 's#/$##' ` `ls  | grep -v ${VERSION} | sed -e "s#^#-x ./#" -e 's#/$##' `  -c ${BOOTCATALOG} -o iso/OpenBSD-${VERSION}-${ARCH}.iso .

Do the same thing with a smaller subset of the tree.

$ lftp FTPSERVER:/pub/OpenBSD/4.0> mget ANNOUNCEMENT HARDWARE PACKAGES PORTS README SIZES XF4.tar.gz ports.tar.gz sys.tar.gz src.tar.gz
$ lftp FTPSERVER:/pub/OpenBSD/4.0> mirror i386

Burn the Disc

Using cdrtools

# cdrecord dev=/dev/rcd0c -scanbus

and

# cdrecord -v dev=/dev/rcd0c speed=8 file.iso

Upgrade Ports

$ cd /usr
$ export CVSROOT=anoncvs@anoncvs.de.openbsd.org:/cvs
$ cvs -q get -rOPENBSD_3_6 -P ports

Generate a Certificate for stunnel

# umask 077; /usr/sbin/openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/private/stunnel.pem -keyout /etc/ssl/private/stunnel.pem

Mount UFS filesystems under Linux

# mount -t ufs -o ufstype=44bsd /dev/sda4 /mnt
# mount -orw,remount /dev/sda4 /mnt

FreeBSD's partitions are UFS2 which is now very different from 44BSD:

# mount -t ufs -o ufstype=ufs2 /dev/sda4 /mnt

Boot from Grub2

bsd.rd

Assuming bsd.rd is somewhere on a Linux partition

set root=(hd0,1)
kopenbsd /openbsd.rd
^X

Full System

Somewhere that will end up in grub.cfg (e.g. /etc/grub.d/40_custom)

menuentry "OpenBSD"
        root (hd0,2)
        chainloader +1
}

If Grub2 complains about invalid nested partitions after installing OpenBSD, it may be worth trying this patch or that one.

1) including ports and sources
tips/openbsd.txt · Dernière modification: 2013-11-15 05:06 (modification externe)