Archive

Archive for December, 2010

SystemRescueCd

December 31st, 2010 No comments

The SystemRescueCd has all sorts of useful tools to restore ailing Linux systems.
Check it out at: https://www.sysresccd.org

Grub Recovery on CentOS 5 with RAID

December 30th, 2010 No comments

I recently replaced the RAID 1 drives in my CentOS 5 box and had to reinstall the grub MBR. As the drives are a couple of TB each, I thought I’d try GPT instead of the old MBR partitioning, since soon all drives will exceed MBR’s 2TB limit. Luckily GPT is baked into RH/CentOS kernels (unlike many others).
Restoring the MBR was trickier than I expected and I made a couple of mistakes along the way – wish I had found the following description sooner:
https://idolinux.blogspot.com/2009/07/reinstall-grub-bootloader-on-md0.html

In a nutshell run grub interactively and do the following:

# grub
grub> root (hd0,0)        
root (hd0,0)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.
grub> quit
# reboot

OCaml for Mac

December 1st, 2010 1 comment

As I install most Linux/BSD software on Mac via Macports, I figured I’d forgo GODI and try to install OCaml the Macports way.

Everything went mostly smoothly except for ocamlnet which is installed as a dependency of batteries. By default, to avoid installing GPL software, Macports doesn’t build nethttpd and related modules. To work around this, perform the install as usual:

sudo port install caml-batteries

but this won’t install the httpd files. To the ocamlnet Portfile I had to add:

configure.args-append   -with-nethttpd

after configure.pre_args. Also, for ocamlnet 2.2.9, I had to patch src/batCamomile.ml as follows:

replace:
-module CDC = CamomileLibrary.CamomileDefaultConfig
with:
+module CDC = CamomileLibraryDefault.Config
and:
-include CamomileLibrary.Main.Make(CamConfig)
with:
+include CamomileLibrary.Make(CamConfig)
then port uninstall batteries (and ocamlnet), then reinstall.
Categories: Uncategorized Tags: