Author Topic: OZ 3.3.5 with CF card as root directory?  (Read 2117 times)

patrick

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • http://www.eglyph.com
OZ 3.3.5 with CF card as root directory?
« on: May 08, 2004, 02:44:43 pm »
Has anyone been able to pivot the root directory to the CF card while booting OZ? The instructions in OZ faq #192, \"How can I run my Zaurus entirely off of the SD card?\" (http://www.openzaurus.org/oz_website/faq/faq?id=192) states that they\'ll also work with a CF card, but I haven\'t been able to adapt them in any way such that my Zaurus will do this.

If I boot the Z up from the internal flash memory, after Qtopia is running, I can run pivot_root successfully (though, of course, the machine crashes shortly thereafter because it loses a bunch of stuff it set up during boot after the pivot).

My setup: SL-5500, OZ 3.3.5 (64/0), SanDisk 256MB CF card (formatted as ext2 with a whole directory hierarchy on it)

thanks,

patrick charles hayes

hotwolf

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://
OZ 3.3.5 with CF card as root directory?
« Reply #1 on: August 15, 2004, 10:42:39 am »
I have exately the same problem.

So far I've been able to display the error messages that the "proot" script produces when it's running in the boot sequence.
The mount call complains that /dev/hda1 is not a valid block device. I'm not a Linux expert but it appears that there some
kernel module has not been loaded at this point in time.

It seems that there is no easy solution to the problem. If you insert the "proot" script at a later point in the boot sequence,
you'll probably see the same crashes, that you get when run pivot_root on a running system.

I haven't meesed around with the boot sequence too much, because I don't understand it.  Is there any piece of
documentation which explains the OZ boot process?  

I'm thankful for any hint.
Dirk
SL5500 OZ3.3.6pre1 Hentges ROM

hotwolf

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://
OZ 3.3.5 with CF card as root directory?
« Reply #2 on: August 21, 2004, 06:33:39 pm »
I'm still trying to run my OZ (3.3.6pre1) entirely off my CF card.  So far I've found two howtos (OZ FAQ and OpemEmbedded Wiki pages) which show how to do such a setup on a SD card. If tried the first setup on a SD card and it worked fine on my Zaurus (SL-5500). If I try the same thing w/ a CF card nothing works and I don't understand why.

In my latest attempt I used the script from the OpenEmbedded pages and modified it as follows (changes are highlighted red ):

#!/bin/sh
#
# proot - pivot_root
#
. /etc/default/rcS

vtmaster=/dev/tty0

if test ! -b /dev/
hda1 ; then
   /bin/mount -o remount,rw / > $vtmaster
   /bin/mknod /dev/
hda1 b 3 1 > $vtmaster
   /bin/mount -o remount,ro / > $vtmaster
fi

if test ! -b /dev/hda1 ; then
  echo "/dev/
hda1 is still not a block device" > $vtmaster
fi


/sbin/e2fsck -y /dev/mmcda1
> $vtmaster
/bin/mount -n -t ext2 -o defaults,noatime /dev/
hda1 /mnt/cf > $vtmaster

if test -f /mnt/
cf/.bootme ; then
   echo "from
CF" > $vtmaster
   /sbin/pivot_root /mnt/
cf /mnt/cf/mnt/root > $vtmaster
else
   echo "from internal flash" > $vtmaster
   /bin/umount -n /mnt/
cf
fi


I've also added some extra outputs (purple), so this is what I see when I reboot:

test ! -b /dev/hda1:  no output
fsck:   possibly non-exsistent or a swap device
mount:  not a valid block device

After the system has been booted /dev/hda1 is mounted w/o problems and fsck can be run on the CF card w/o errors.

Does anyone have an idea why this kind of setup works on a SD card, but not on CF? I sure don't.

Dirk
SL5500 OZ3.3.6pre1 Hentges ROM