Secrets of BIOS, Grub, and Triple Boot Servers

June 9, 2013

Have you read: Rodger’s Very Simple Dual Boot Method?

If you haven’t already, do check it out. One advantage: no Master Boot Record (MBR) modifications! Another advantage: it allows all disks and operating systems the option to be completely independent of each other. You can remove any disk, insert it into another machine, and it will boot perfectly fine. The disks are no longer married to each other. But mainly, this post won’t make any sense to you, otherwise.

A few months ago, I used this method with only two operating systems: Redhat 5.5 and Windows 7. Then recently, in the same server, I installed Redhat 6.4 onto a third disk. But suddenly I had an awful time getting all three to work.


Redhat 6.4 booted Redhat 5.5 perfectly. But when I booted Windows from the Redhat 6.4 grub.conf file, I got the error:

File:  \BOOT\BCD
Status:  0xc0000001
Info:  An error occurred while attempting to read the boot configuration file

Redhat 5.5 booted Windows 7 perfectly. But when I tried to boot Redhat 6.4 from the Redhat 5.5 grub.conf file, I got the error:

Error 2: Bad file or directory type

So, I could only boot two of the three operating systems at one time.  To make things work, I’d have to be changing sata cables. That really defeated the purpose of a triple boot.

This was really mysterious, and no one on the newsgroups had any idea how to fix it. Mere mortals would have given up and implemented some kind of work around. 🙂 But here is how I ultimately overcome the errors and got all the three disks to boot cleanly.  Read the rest of this entry »

Adding A Windows Hard Disk To A Linux Server

February 19, 2013

It’s relatively easy to add a Linux disk to a Windows machine. But it’s not as easy to add a Windows disk to a Linux machine.

I have a powerful Linux server that I spent a number of weeks installing software on. When I configured it, I decided to make it a dedicated Linux server. However, a lot of software actually works on Windows. I’ve considered virtual machines. But if you have read my escapades with Virtual Box, a dual boot just makes one less variable and software to be concerned with.

In the past, I’ve created a number of Windows/Linux dual boot machines, and the order of operations was pretty easy. First, install Windows on disk 1. Then install Linux on disk 2. Installing Linux will install grub, update the Master Boot Record (MBR) on disk 1, and give a choice of Windows or Linux when booting.

But this time the order of operations was reversed, and Linux was installed first. Since it took so long to install all the software on Linux, I didn’t want to modify anything on the Linux disk. If there was a problem, I wanted to put it back to the way it was; just remove the Windows disk, and boot Linux as before.

So, the requirements were: Install Windows on a second disk. Get the machine to dual boot, without modifying any of the existing Linux install. Allow for rollback.


At first, I tried using EasyBCD for a few hours. But I was unable to figure out a solution. On the forums, there were no responses to my question on how to accomplish my task.

Eventually, I got this to work using two methods. The first was to use an older version of SuperGrub. The second method was to use Linux commands. In both cases, I had to get to the Linux OS using either Supergrub, or Supergrub2.
Read the rest of this entry »

Best Kept Secret Of Linux – Apropos

November 30, 2011

It always amazes me how many Unix people do not know about the command: apropos. It’s fabulous!

Here’s where it is useful. Say you are struggling with something. You know there is a command for what you are doing, but forget what exactly the command is. Perhaps, how to list the open files. So you run:

apropos file

a2ps (1) – format files for printing on a PostScript printer
a2ps (rpm) – Converts text and other types of files to PostScript(TM).
access (2) – check user’s permissions for a file
access (3p) – determine accessibility of a file
access.conf [access] (5) – the login access control table file
acct (5) – execution accounting file

zip (rpm) – A file compression and packaging utility compatible with PKZIP.
zipsplit [zip] (1) – package and compress (archive) files
zisofs-tools (rpm) – Utilities for creating compressed CD-ROM filesystems.
zless (1) – file perusal filter for crt viewing of compressed text
zlib-devel (rpm) – Header files and libraries for Zlib development.
zmore (1) – file perusal filter for crt viewing of compressed text
znew (1) – recompress .Z files to .gz files

Since linux handles files really well, there are actually a LOT of possibilities for “file”. On my system, over 1600.

apropos file | wc
1640 16328 117382

Configuration files such as .conf are of type (5).

The commands that can be used at the prompt are of type (1), and (8). By adding grep, you can narrow the results. But I still get over 600 possibilities.

apropos file | grep -i -e “(1)” -e “(8)”

vipw (8) – edit the password or group files
virt-xml-validate (1) – validate libvirt XML files against a schema
visudo (8) – edit the sudoers file
vol_id (8) – probe filesystem type and read label and uuid
wbmptopbm (1) – convert a wireless bitmap (wbmp) file to a PBM
wc (1) – print the number of newlines, words, and bytes in files
webalizer (1) – A web server log file analysis tool
whereis (1) – locate the binary, source, and manual page files for a command
writelog (8) – add a entry to an INN log file

At this point, you can scan visually. Or, use grep some more.

apropos file | grep -i -e “(1)” -e “(8)” | grep -i “open”

gimp-remote [gimp-remote-2] (1) – tells a running GIMP to open a (local or remote) image file
lsof (8) – list open files

Right! lsof! Of course!


Before apropos is useful, you have to run the command: makewhatis

makewhatis (8) – Create the whatis database

makewhatis creates the whatis database, by reading key sections of all the man pages. When I worked on Sun Microsystems operating systems, I remember the equivilent command was catman. Either will take a number of minutes to finish. It’s write once, read many, so you just need to do it the once.


Then, you can also use the command: whatis. This is useful when you are instructed to use a command online you haven’t seen before. Before running the command, you can check what it does.

whatis vfs_catia
vfs_catia (8) – translate illegal characters in Catia filenames

Other useful commands that I use include, which and file.


which will tell where exactly a file is located in your search path:

which sysctl


file will tell you what type of file it is:

file /sbin/sysctl
/sbin/sysctl: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

There are many types of files:

file /etc/*

/etc/rc5.d: symbolic link to `rc.d/rc5.d’
/etc/rc6.d: symbolic link to `rc.d/rc6.d’
/etc/rc.d: directory
/etc/rc.local: symbolic link to `rc.d/rc.local’
/etc/ Bourne shell script text executable
/etc/rc.sysinit: symbolic link to `rc.d/rc.sysinit’
/etc/readahead.d: directory
/etc/reader.conf: ASCII English text

You then always can use the man pages for more info. Go to SEE ALSO for related commands.

One of my beefs about the man pages is that they often tell me everything, except what I need to know. In fact, for apropos, the critical fact that you need to first run makewhatis is not found at all in SEE ALSO. Perhaps that’s why it’s not used much.

Usually I just need a simple example that works. I find I get much better info from blogs these days. Why can’t those who write man pages do similar?

Using apropos has allowed me learn many things about unix and linux that I would not have discovered otherwise. You can spend a lot of time with it, and learn heaps.

Overcoming The Malware “XP Internet Security”

May 1, 2011

Viruses, worms, trojans, and rogue antispyware software are getting pretty sophisticated.  As careful as I am, one caught me today, on a computer I don’t usually use.  Usually I use Firefox.  But I opened up Google Chrome, right clicked on a link, and open in new window.  Suddenly, I got one of those phony webpages telling me that I had a virus, and doing a scan.

Zone Alarm did not catch it, which is pretty disappointing.  I set it to deny, as I usually do, but it still executed.

ZoneAlarm and XCV.exe

Read the rest of this entry »

%d bloggers like this: