So I’ve got a small laptop that I tried to install Haiku on. It doesn’t have a CD/DVD-ROM drive so here’s how I did it:
- I’m using a CF micro-harddrive as the disk for this laptop. I am using another laptop with a CD/DVD-ROM drive to run the installation.
- I boot up Linux on the installation hard drive with the CF micro-drive in a USB memcard reader. I partitioned the CF micro-drive to have a small 10 mb primary Linux partition and an extended BeOS partition taking up the rest.
- I set up the small 10 mb partition to be a grub partition. It is formatted ext2 and has grub installed on it.
- I rebooted into the Haiku installation CD.
- I formatted the extended partition as BeFS and mounted it.
- I installed Haiku on the extended partition.
- I then setup the bootmanager by running that from the installer.
Now, at this point, I can reboot the installation laptop and have it boot Haiku from the CF card just fine. But when I put the CF card into the target laptop, Haiku boots but crashes when trying to mount the root file system.
Here’s what I think is happening and I need your help to confirm this. When the CF micro-drive is in the USB card reader connected to the installation laptop, the partitions come up as /dev/sda1 /dev/sda2 in Linux and (hd1,0) and (hd1,1) in grub. When I put the CF micro-drive in the target laptop, it is the primary drive in the IDE bus and therefore comes up as (hd0,0) and (hd0,1) in grub and would be /dev/hda1 and /dev/hda2 in Linux, if Linux were installed.
I properly fixed up the grub boot commands by manually editing them at boot time so that it would boot (hd0,1) instead of (hd1,1).
What I suspect is happening is that when Haiku gets installed, and the boot manager gets set up using the installation laptop, it records in the BeFS somewhere that the root filesystem is the second partition on the second hard drive. But then when I put the CF micro-drive in the target laptop, the root filesystem is actually the second partition on the first hard drive and that’s why the root filesystem can’t be found when booting on the target laptop.
Is this the case? Does the hard drive number (first or second) get recorded somewhere in the BeFS? How would I fix up the contents of the BeFS so that Haiku can find the root partition on boot? I wish there was a terminal shell and vim available in the installer. That would make things a lot easier because I could poke around in the mounted file system and fix things up.
What I’ll have to do now is boot the live CD on the installation laptop, mount the CF micro-drive in the card reader, and then fix things up if needed.