A cluster in computing is a term used to describe a group of closely linked computers often appearing as a single entity to the outside world. There are various types of clusters—high-availability (HA) clusters, load-balancing clusters, compute clusters or high performance computing (HPC) clusters and grids.
Building A Highly Available Nginx Reverse-Proxy Using Heartbeat
Building A Highly-Available Web Server Cluster
nginx (pronounced as ‘engine x’) is a powerful HTTP Web server/reverse proxy and IMAP/POP3 reverse proxy. According to a survey conducted in December 2008 by Netcraft, nginx has grown significantly and has surpassed lighttpd (also known as Lighty). Because of its small memory footprint and high scalability, nginx has found tremendous usage in virtual private servers (VPS).
Recovering from lost root password in OpenBSD
Want to recover a lost root password in OpenBSD, type boot -s at the boot prompt in OpenBSD hit enter when prompted for shell and enter vt220 as the TERM.
boot> boot -s Enter pathname of shell or RETURN for sh: Enter Terminal: vt220
Next run an fsck on the root filesystem and mount it read-write. If you have a seperate /usr filesystem then you should also mount it read-write. Finally run the passwd command to change the password.
# fsck / # mount -uw / # passwd
Creating and Using MS DOS Virtual Machine in QEMU
Create a disk image of desired size. I chose 50 MB
$ dd if=/dev/zero of=msdos622.img bs=1k count=0 seek=50000
Next boot from the DOS
boot media. I had a bootable CD image.
$ qemu -hda msdos622.img -cdrom DOS6.22_bootdisk.iso -boot d
From the DOS
prompt, create a partition on drive C
using fdisk
A:\> fdisk
After the partition is created the machine will be rebooted. Once you get the DOS
prompt back format the drive C
and make it bootable:
A:\> format c: /s
The /s
option of format
command transfers the system to the drive.
Next create a directory DOS
in C:\
and copy all the utilities into it:
A:\> mkdir c:\dos A:\> copy *.* c:\dos
DOS is ready to be used. Now in order to transfer your old games and programs, you need to mount it as loopback
device in linux. There is one problem with this. Since the image file has a partition table in it, when I tried to mount it, I got the following errors:
$ sudo mount msdos622.img /mnt -o loop -t msdos mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
To work this around we need to calculate the offset size of the partition using the fidisk -ul
command:
$ fdisk -ul msdos622.img You must set cylinders. You can do this from the extra functions menu. Disk msdos622.img: 0 MB, 0 bytes 16 heads, 63 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System msdos622.img1 * 63 98783 49360+ 6 FAT16
To calculate the offset we need to multiply the starting block (63 in our case) by 512. If the image has multiple partitions then the same approach can be used and each partition can be individually mounted on a separate mount point.
$ sudo mount -o loop,offset=32256 msdos622.img /mnt $ ls /mnt command.com dos drvspace.bin io.sys msdos.sys
Now you can copy your old dos games and other files to /mnt
.
Creating and Using MS DOS Virtual Machine in QEMU
Being an old DOS user, sometimes there is an urge to go back to college days and recall how we used to do various things in DOS. Using dbase III, in a DOS environment reminds me of some of the great times I used to had in college as a student and later when I started my carrier as a Trainer.
Today’s Virtualization technology had made it possible to run a DOS environment. Read on to find out how did I manage to set-up a MS-DOS VM using QEMU. Oh by the way I damaged my copy of WordStart 4 and Lotus 123 for DOS, if you happen to have one and don’t mind sharing please upload it to a public place and send me a link.
Create a disk image of desired size. I chose 50 MB
$ dd if=/dev/zero of=msdos622.img bs=1k count=0 seek=50000
Next boot from the DOS boot media. I had a bootable CD image.
$ qemu -hda msdos622.img -cdrom DOS6.22_bootdisk.iso -boot d
From the DOS prompt, create a partition on drive C using fdisk
A:\> fdisk
After the partition is created the machine will be rebooted. Once you get the DOS prompt back format the drive C and make it bootable:
A:\> format c: /s
The /s option of format command transfers the system to the drive.
Next create a directory DOS in C:\ and copy all the utilities into it:
A:\> mkdir c:\dos A:\> copy *.* c:\dos
DOS is ready to be used. Now in order to transfer your old games and programs, you need to mount it as loopback device in linux. There is one problem with this. Since the image file has a partition table in it, when I tried to mount it, I got the following errors:
$ sudo mount msdos622.img /mnt -o loop -t msdos mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
To work this around we need to calculate the offset size of the partition using the fidisk -ul command:
$ fdisk -ul msdos622.img You must set cylinders. You can do this from the extra functions menu. Disk msdos622.img: 0 MB, 0 bytes 16 heads, 63 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System msdos622.img1 * 63 98783 49360+ 6 FAT16
To calculate the offset we need to multiply the starting block (63 in our case) by 512. If the image has multiple partitions then the same approach can be used and each partition can be individually mounted on a seperate mount point.
$ sudo mount -o loop,offset=32256 msdos622.img /mnt $ ls /mnt command.com dos drvspace.bin io.sys msdos.sys
Now you can copy your old dos games and other files to /mnt.