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$ <in>export ARCH=i386</in>
OpenBSD$ <in>export VERSION=4.0</in>
OpenBSD$ <in>export BOOTCATALOG=${VERSION}/${ARCH}/cd40.iso</in>
OpenBSD$ <in>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 .</in>

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

$ <in>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</in> 
$ <in>lftp FTPSERVER:/pub/OpenBSD/4.0> mirror i386</in>

Burn the Disc

Using cdrtools

# <in>cdrecord dev=/dev/rcd0c -scanbus</in>

and

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

Upgrade Ports

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

Generate a Certificate for stunnel

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

Mount UFS filesystems under Linux

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

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

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

Boot from Grub2

bsd.rd

Assuming bsd.rd is somewhere on a Linux partition

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

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)