Hi Dan,
Hope you don't mind me forwarding this to the fedora-olpc list,
because I think other people may be having the same problem.
I'll have a look at submitting a patch upstream or working around the
problem.
Martin
On Sun, Oct 04, 2009 at 05:40:28PM -0700, Dan Krejsa wrote:
Hmm,
Maybe since in the initrd image sh is a symlink to dash (not bash), the problem
is a difference between dash and bash.
http://gondor.apana.org.au/~herbert/dash/
Perhaps 10olpc-boot-premount.sh should avoid bashisms like [[ ?
- Dan
On Sun, Oct 4, 2009 at 5:08 PM, Dan Krejsa <dan.krejsa(a)gmail.com> wrote:
> Hi Martin,
>
> I'm trying to boot my g1g1 XO using a USB flash drive created
> according to the instructions at
>
> http://people.sugarlabs.org/~mtd/soas/README.txt
>
> using the soas71xo.4gremovable.img.tar.lzma filesystem.
>
> The boot is failing to mount the root fs, with messages ending with
> stuff like the following (copied manually & skipping the timestamps):
>
> VFS: Cannot open root device "LABEL=OLPCRoot" or unknown-block(0,0)
> Please append a correct "root=" boot option; here are the available
partitions:
> 1f00 1048576 mtdblock0 driver: CAF|-e NAND
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
>
> I tried adding a 'root=/dev/sda1' argument to the boot line in the openboot
> and setting the 'ramdisk' environment variable to
>
> u:\boot\initrd-2.6.30_xo1-20090808.1740.1.olpc.a817f86.img
>
> before booting. That got somewhat further, but still failed as discussed
> below.
>
> I found that if I added a symlink /boot/initrd.img to the file
> initrd-2.6.30_xo1-20090808.1740.1.olpc.a817f86.img in the same
> directory, I didn't need to intervene at the openboot forth prompt.
> The ramdisk was then loaded and /dev/sda was mounted automatically.
>
> However, there were still errors during boot. First, there were some messages
>
> FATAL: Module scsi_wait_scan not found.
>
> that repeated several times before the root file system was apparently
> successfully
> mounted.
>
> Immediately after the 'Hello, (children of the) world!'
>
> message, there were the following errors:
>
> [: 48: 1: unexpected operator
> /pre-mount/10olpc-boot-premount.sh: 71: -z: not found
> [: 72: 0: unexpected operator
> [: 85: unexpected operator
> dracut: Mounted root filesystem /dev/sda1
> dracut: Warning: Machine in enforcing mode and cannot execute load_policy.
> dracut: Warning: To disable selinux, add selinux=0 to the kernel command line
> dracut Warning: Not continuing
>
> I figure I could add 'selinux=0' to the command line set up in
> /boot/olpc.fth (?)
> but I'm not sure about the earlier things that look like script errors earlier.
> I gather that /pre-mount/10olpc-boot-premount.sh is in the initrd image.
> I'm not an expert bash scripter and am not sure what's going on there.
> Any ideas?
>
> - Dan
>