Wednesday, February 03, 2016

Booting From an ISO image using GRUB

Sometimes, it's handy to use a specialized boot environment on your system. Examples include SpinRite, GParted, TRK, FalconFour's Ultimate Boot CD and others.

Typically, you have a CD or DVD of that environment, insert it and boot from that.

Assuming that your own system isn't borked, it is possible to use GRUB to load the ISO image and boot from that. Here's how . . .

The special software that allows you to boot from an ISO image on your drive is SYSLINUX. While it is a complete boot system, mostly noted for its ability to boot from MS-DOS and MS Windows FAT filesystems, it contains a program named MEMDISK.

NOTE: While I am focusing on Linux systems, SYSLINUX and MEMDISK have MS Windows  versions, so with a careful reading of the documents you can do the same thing on a MS Windows computer.

Intended primarily to allow you to boot legacy operating systems, it also allows you to boot from floppy disk images, hard drive images and ISO images.

To use it, copy MEMDISK from where your system installs it by default into the /boot directory. Then, copy the ISO image you want to boot from into /boot as well.

The web page for MEMDISK describes how to configure your main bootloader to launch MEMDISK and have it boot your ISO image.

For my Mageia5 Linux system, the lines that are added manually to /boot/grub/menu.lst are as follows for SpinRite.iso as an example.

title SpinRite
kernel (hd0,0)/boot/memdisk BOOT_IMAGE=SpinRite
root (hd0,0)
initrd /boot/SpinRite.iso

append iso

If the filename of your ISO image is long, don't be afraid to shorten it to something more convenient to type.

Sometimes it is necessary to use append iso raw. Try that if booting fails at first.

Using PLPBT, an Alternative Boot Loader

Rather than booting an image of an operating system or a live image of a utility, it make be necessary to boot from a different device. Most modern motherboard BIOS have a feature that allows you to boot from a number of different devices attached to your system.

If you BIOS does not support that, the Plop Boot Manager can help. It provides executables for DOS, MS Windows and Linux as well as for booting over a network.

For Linux, you copy the file plpbt.bin to your /boot directory and your GRUB entry in /boot/grub/menu.lst looks like:

title Plop Boot Manager
root (hd0,0)
kernel /boot/plpbt.bin

The documents also show how to create other boot images using the Plop Boot Manager.

Sunday, October 04, 2015

BIOS Update for a Linux Computer

Most hardware will need a BIOS update at some time and it's relatively easy to do. When you use Linux, however, you face an additional hurdle since occasionally upgrading the BIOS requires an installer that only works using Windows. Of course, no one wants to install a full Microsoft Windows OS just to spend less than 30 seconds to update the BIOS, then turn around and re-install Linux.

What if we could boot into Windows using a CD-ROM and run the win32 BIOS update program using that? Check out FalconFour's Ultimate Boot CD. The best source for it is his Facebook page or his Wordpress page. Those pages provide a link to download it via torrent or a direct link. The current version is v4.61.

Simply boot into the WindowsXP environment and run the BIOS installation program. It's that easy.

In my case, I was updating the BIOS of an HP 1120NR notebook.

Tuesday, July 07, 2015

Compiling and Running Quake2 in a modern browser window in Mageia5

Slashdot ran a story about getting Quake2 running in a browser windows. That is very cool.

There were installation instruction at quake2-gwt-port except the instructions were not for "Linux" but only for Linux distros that provide apt-get (probably Ubuntu). That is not cool at all.

While it would have been possible for them to write their HOWTO instructions in a generic way (provide a list of all dependencies, provide links to source code for needed apps not included in every Linux distro, etc.), they just assumed that everybody uses Ubuntu. Bad. Bad. Bad.

Here's what I needed to do to get it compiled and installed on my Mageia5 system. Read those Ubuntu-ed instructions first for the details. You should be using sudo to run commands that need root privileges. (All the following commands are written on one line even if they appear to be on multiple lines.)

$ sudo urpmi mercurial ant gcj-tools javacc lame vorbis-tools
$ hg clone quake2-gwt-port

$ cd ~/quake2-gwt-port

$ sudo ant run

This will install the original Quake II demo resources, build the client and server code, then run the server.

Play Quake2 in your browser with: http://localhost:8080/GwtQuake.html

It seems to run just fine in Firefox (as well as PaleMoon, QupZilla, very slow in Arora, not at all in Dillo) window. It doesn't run in very old versions of Firefox or possibly other browsers because of the opengl requirement.

Sunday, June 21, 2015

Easy Upgrade from Mageia4 to Mageia5

Back in the early days of Linux, the changes to the Operating System were so dramatic that even when updating withing the same distro, in-place point release updates were problematic enough and it was always recommended that a major version release be done from scratch. There were just too many major changes to the underlying subsystems and package naming conventions. Doing an in-place update was just asking for trouble.

Modern distros have matured quite a bit, although there are occasionally some major subsystem changes being made. Yet it's never been easier to do an in-place major version upgrade.

I just did the upgrade on several Mageia4 systems and the results were consistent and satisfactory, not to mention simple.

Step 0.

Always backup critical information. Have a Mageia4 recovery disc on hand.
Read the Release Notes and the Errata for Mageia 5.Other than updated applications, teh biggest change is support for UEFI. Review the Mageia 5 Documentation about the installer.

You can always download an ISO image to do the upgrade rather than do an in-place installation if your Internet connection is slow. DO NOT attempt an upgrade from the Live ISO image as it will overwrite your existing system.

Upgrade From GUI

Step 1.

$ sudo mgaapplet-upgrade-helper --new_distro_version=5


Upgrade From CLI

Step 1.

Fully update the packages you now have installed.

$ sudo urpmi --auto-update --auto -v

Step 2.

Remove all the existing Mageia4 repositories.

$ sudo urpmi.removemedia -av

Step 3.

Add the Mageia5 repositories. (All on one line.)

$ sudo urpmi.addmedia --distrib --mirrorlist ''

Note: for 64-bit systems, substitute x86_64 for i586.

Step 4.

Update the packages

$ sudo urpmi --replacefiles --auto-update --auto -v

Step 5.

Reboot. You'll be using a new kernel, new glibc and so on.

$ sudo shutdown -r now

Step 6.

Run the package update command from Step 4 again. It should return with no packages needing updating.

Done.  But . . . .

Do Some Checking.

$ cat /etc/redhat-release
$ cat /etc/issue

Those commands should return the information that you are running Mageia5. I did have an issue on one machine and $ sudo urpmi mageia-release-common fixed it. You can also manually edit those version files in /etc to change the version number.

Dynamic DNS Without a special ddns client

There are several Dynamic DNS clients available for Linux. I have never had them work satisfactorily with my DNS provider ZoneEdit.

It is possible to use wget to send the current IP address to ZoneEdit (all on one line, of course).

$/usr/bin/wget -O - --http-user=USER_NAME --http-passwd=PASSWORD ''

This can be run as any user.

I have found it useful to use cron to run it. Instead of a specific time, I just use the macro @daily in my crontab.

NOTE: ZoneEdit is migrating to a user key rather than a password and, while they are maintaining backwards compatibility for now, you should migrate as soon as practical.

Thursday, May 21, 2015

DOS Apps and Games

Old Apps at provides old versions of popular software.

The 6.0 DOS version of Norton Commander can be downloaded at

DOS shareware versions of Doom and Hexen are here:

Other classic PC games may be available from here:

Software for MS-DOS machines that represent entertainment and games at

 Free classic games on DOS Games Archive at

Thursday, December 04, 2014

HOWTO Install the ownCloud Server on Mageia5

It appears that "the cloud" is the popular buzzword now. All cloud computing is is a remote file server where you can store, access, share and manipulate your files. While several commercial services are available, it's possible to create your own cloud service using the ownCloud software. As with any powerful server software, it's not out-of-the-box easy, but with some preparation and understanding, it's not that difficult. Most of this HOWTO is Mageia-specific; a lot of the configuration details are enumerated at the ownCloud website documents.

We're installing ownCloud on a minimal Mageia4 virtual machine using VirtualBox just to go through the process. There is no X-server, so it's all done on the command line.

Mageia5 documentation, installation discs and Errata can be found here.

Part One -- Installing the Apache Webserver

We must begin by installing the Apache webserver. It's certainly possible to use alternative webservers, but Apache is most common. Getting a working Apache webserver is pretty straightforward.

1. Install Apache and some other related modules we'll need. Eventually, you'll want to configure ownCloud to use SSL, so install that module now.

$ sudo urpmi apache apache-mod_ssl

Note that we don't install apache-mod_dav since ownCloud supplies its own DAV module.

2. Use drakconf on the command line and choose the selection that allows you to configure the firewall to allow the web server (and the ssh server for system administration via ssh).

3. Set inint to run the webserver on startup.

$ sudo chkconfig httpd on

4. Start the webserver.

$ sudo service httpd start

5. Check to see that the webserver is working by pointing you browser to the server IP.  I used the text-based lynx browser since there is no X-server on this machine.

$ lynx localhost

And it works!

Part Two - Install Useful Dependencies

Use urpmi to install the following apps. The ownCloud documentation explains why they are useful. You might as well do it now.


Part Three - Install ownCloud

By default, the Mageia package installs ownCloud in /use/share. There's nothing wrong with that although some people prefer it to be someplace else and, with some care, you can move it wherever you like. What's important is that the user apache own all the files and directories associated with ownCloud. We do that by using:

$ sudo chown -R apache:apache /usr/share/owncloud

NOTE: When upgrading using URPMI, the file ownerships are changed but can be easily fixed as shown above.

It's also necessary to provide an initial configuration file. The easiest way to do that is to copy the example they provide. That leaves us with a pristine example file to examine if we need.

$ sudo cp /usr/share/owncloud/config/config.sample.conf  /usr/usr/share/owncloud/config/config.conf 

When we run ownCloud the first time, it will strip out all the comments and fill in some of the values during its initial setup.

Part Four - Setup ownCloud

Before you access the admin part of ownCloud, you must be logging in from an authorized fully qualified domain name (FQDN). This is allowed by editing config.php to add your FQDN. If you are assigned a dynamic IP address, you must use a dynamic DNS service to get access; it's a security feature.

Once that is out of the way, access the admin pages by pointing your web browser to http://your.server.address/owncloud.

The complete configuration is actually a little more complicated that this and I'll be adding links to documents that provide details, but essentially this is what you need to to do to get ownCloud running on Mageia4. It's just not as simple as "urpmi owncloud".

NOTE: In an older installation of ownCloud, I had some difficulty getting ownCloud 6.x to run reliably, but Mageia5 now offers version 8.X. If you need a version newer than Mageia provides, you can simply download the latest tar.bz2 package from the ownCloud site and replace the contents of /usr/share/owncloud, making sure to change the ownership to apache:apache as noted above.