Setup a simple host-to-host VPN with openvpn

A VPN between two hosts is pretty easy to setup. You just need to install openvpn on server and client, generate a static key (just keep in mind that anybody who gets access to this key can compromise your vpn) which needs to be copied to the client (if generated on the server) and put a small configuration in place on client and server.

Install openvpn on server and client with

Creating a swap file

From time to time you might have the need to create some extra swap space. Instead of creating a separate partition (maybe there is no more free space on the disk) you can create a swap file. This can also easily be removed after it is not needed anymore.

In this example we will add a swap file of 64 MB which 65536 * 1024k blocks.

autofsck behaviour after unclean shutdown

If a system goes down without proper shutdown it will tell you so during reboot and asks if you want to check the filesystem integrity. Unfortunately the prompt will stay there forever if you do not enter anything. To avoid unnecessary dowwntime due to system waiting for input the behaviour can be configured in the file /etc/sysconfig/autofsck (create it if it does not exist):

Installing Fedora 10 with ext4 filesystems

Fedora 10 supports already the new ext4 filesystem. This is not enabled by default during installation. You have to start the installer with the ext4 parameter at the boot prompt:

Forcing plymouth into graphic mode

In Fedora 10 RHGB has ben replaced by plymouth which no longer uses an X server. Depending on its configuration plymouth will show an animated solar in default configuration during startup. Depending on your graphic card plymouth might not be able to show this graphical screen and just show a text progress bar during boot process.

xorg.conf in Fedora 10

Fedora 10 has no /etc/X11/xorg.conf by default. The X setup is detected automatically. If this is not the case your display might remain black or is somehow disturbed.
In this case it can be useful to create a tiny /etc/X11/xorg.conf (which will be used if present).

Installing dependencies when installing a downloaded rpm

If you download an RPM its installation instructions (if there are any) will tell you to install the packge via

rpm -ivh rpm-file

This will work if the RPM has no further dependencies. But if there are some dependencies RPM will complain about missing libraries. Now you have to determine which package(s) you need to install to get these libraries.

dump and restore a filesystem in one shot

You can dump and restore a filesystem in one shot using the pipe with one commandline:

dump -0 -b 512 -f - / | restore -r -b 512 -f -

nofail option in /et/fstab

You can specify even external USB disk drives or samba shares in /etc/fstab. Nevertheless you have to take care to specify the proper options because if the partition is not available duing boot the system will boot to rescue mode and you need to remove the filesystem from /etc/fstab.

Specify directory with spaces in /etc/fstab

If you want to add a filesystem to mount in /etc/fstab you need to use the octal ASCII value which is \040. In my case I have created a separate filesystem for VMware virtual machines: