[ previous ] [ next ] [ threads ]
 
 From:  eehouse <eehouse at eehouse dot org>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Unable to dual-boot on CF card using GRUB
 Date:  Sat, 28 Oct 2006 16:46:09 +0000
Hello,

I'm trying to get M0n0wall running on a 1G Sandisk CF card in a WRAP
box.  I've been using LEAF (leaf.sf.net) on this box for several
years, but want to try M0n0wall.  But to keep LEAF around, I need to
set up to dualboot, ideally with GRUB.

My problem is that GRUB seems unable to recognize the partition I've
put M0n0wall on:

grub> root (hd0,2,a)                                                           
 Filesystem type unknown, partition type 0xa5

GRUB is able to recognize the linux partitions.  I'm currently running
LEAF off of the same card.

Here's what I did (running Debian GNU/Linux, and with the card in a
USB reader that's worked fine for a year or so):

* partitioned new card.  Here's how it reads now on the WRAP box:

chloris# fdisk /dev/hda
[...]
Disk /dev/hda: 1024 MB, 1024966656 bytes
32 heads, 63 sectors/track, 993 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         125      125968+  a5  FreeBSD
/dev/hda2             126         250      126000   a5  FreeBSD
/dev/hda3             251         375      126000   a5  FreeBSD
/dev/hda4             376         993      622944    5  Extended
/dev/hda5             376         377        1984+  83  Linux
/dev/hda6             378         382        5008+  83  Linux
/dev/hda7             383         387        5008+  83  Linux

* Formatted /dev/hda5-7 with ext2 filesystems, put GRUB's staging
  files on hda5 and working LEAF installations on hda6 and hda7.
  Installed GRUB on the MBR.

* Downloaded wrap-1.22.img, gunzipped it, and using

dd if=wrap-1.22.img of=/dev/sda3

  copied it to the Sandisk card.  When the copy was finished, I
  mounted the partition read-only and looked around.  No errors.
  /boot/loader is there.

* Put the card in the WRAP box and rebooted.  Grub comes up in the
  serial console.  If I point it at hda6 or hda7, it boots the linux
  kernels there and I'm fine.  If I point it at the M0n0wall
  partition, grub complains that it can't recognize partitions of type
  0xa5.  If I ignore the complaint and use the kernel command that too
  fails:

grub> kernel /boot/loader                                                      
Error 17: Cannot mount selected partition

Can anyone suggest how to get M0n0wall running on this configuration?

Caveats: This is my first experience with *BSD, and I don't have
access to a working *BSD system.  I do know my way around Linux pretty
well.  I've used grub only with linux-based systems until now.

Thanks,

--Eric House
-- 
******************************************************************************
* From the desktop of: Eric House, xwords at eehouse dot org                        *
*        Crosswords 4.1.4 for PalmOS now ARM-native: xwords.sourceforge.net  *
******************************************************************************