Tuesday, September 24, 2013

OpenBSD - Windows XP Dual Boot

September 25 2013
v 0.24

Recently, I stumbled upon OpenBSD and I have to say, I like it. Despite a couple of articles I've read proclaiming that it is not as secure as it claims, I'd have to question what the authors of the article understand, since I tend to agree with the OpenBSD people. In a way, OpenBSD is a little like Dassault. Dassault believes that beautiful aeroplanes fly right. OpenBSD believes that beautiful code works properly.

Whilst OpenBSD will not pander to your ignorance (people who wonder what "the big red button does" will find out quickly), having patience and reading and doing research will quickly get you on the right track.

As an aside, my stable of preferred Operating Systems is:
  • Debian Stable (with backports) for pure desktop
  • PC-BSD for desktop / server (nVidia card required for X)
  • OpenBSD for lots of stuff because it works.

Whilst I have been playing with OpenBSD in a Virtualbox VM, I wanted it on hardware. I have an Asus VX1 laptop that has a 160 gig HDD, 2 gig memory and an nVidia video card. It runs Windows XP. Now, WinXP has 6 months before MS withdraws support - no more security updates, so attaching it to the Internet could get (more) exciting. I didn't want to blow XP away if I could help it, so .. here we go.

First I removed all the files I could - hey I wasn't going to need them there anyway .. and I figured I could shrink the NTFS partition to 40 gig, leaving over 100 gig for OpenBSD. Initial disk configuration was:
  • 2 gig hidden recovery partition
  • 88 gig C drive
  • 58 gig D drive

Next .. disable virtual memory and hibernation in XP. (google is your friend). These two features are responsible for the "unmoveable" files shown when you defrag. Whilst I'm sure I could shrink the partition without trouble, I wanted to play nice.

Surgery, boot with a "Parted Magic" CD. Using this, I deleted the "D" extended and logical partitions, and shrank the "C" partition to 40 gig. I was now left with the initial "hidden" recovery partition for WinXP (careful of it - if you ever use it, it will blow away OpenBSD) and the WinXP primary partitions. I created an empty, unformatted partition to fill up the disk, this coming to about 107 gig. It is important to create this partition now as I have shown. It makes things a lot safer and easier later.

OpenBSD installation uses the fdisk program to set the boot partition and to label the installation partition as "A6". THEN it uses the disklabel program to set internal "partitions" and mount points inside this. I'll not describe the process in any more detail, since OpenBSD is not something you should be playing with if you are not able to work things out. The best web-page I found to fill in the blanks and help was this:


Booting the OpenBSD installation CD, I used fdisk to set the bootable partition and set its filesystem type. Then disklabel came up and I eventually accepted the defaults. There are several Youtube videos that give you more insight to this.

With the installation finished, I booted into OpenBSD - as the web page above said, I used fdisk to set the bootable partition back to NTFS and rebooted. Once in Windows again, I used the instructions to add OpenBSD to the Boot menu.

Final tip - remember you have an extra hidden partition, so be careful when you come to specifying partition numbers ...

Done.


PS    Editing the BOOT.INI in Windows ........

The referenced web page doesn't tell all you need to know, nor does it interpret the editing process correctly.

You edit BOOT.INI with the " bootcfg " command.  Whilst you can view boot.ini with notepad, you cannot edit it.  So ...
  • Change default OS .. "  bootcfg /default /ID [linenumber of OS to be default] " .. In our case, we want the second OS to be made the default, so we would use the number 2.
  • Change the timeout .. " bootcfg /timeout 10 "

That's it ..

1 comment:

  1. It was removed from FreeBSD and OpenBSD; the NetBSD implementation was nonfunctional until work leading up the 4.0 release made it viable again as a production file system.

    Try:- http://www.filesrecoverytool.com/bsd-data-recovery.html

    ReplyDelete