setting up a multi-distro SD card?

how hard is it to set up a multi-distro SD card? since i want the
option to boot to one of a set of choices of root filesystem, i'd like
to put various distros on a single SD card, so here's what i'm
imagining it would take.

  first, in the DOS partition, i would still have the files MLO,
u-boot.bin, and uImage.bin and, in a perfect world, the same uImage
file would work with all those root filesystems. is that reasonable?
as long as i create a kernel that's comprehensive enough, i'd like to
think that it can be used to mount one of a number of root filesystems
(angstrom, android, etc.), so my DOS partition wouldn't have to
change.

  from there, i could just create as many ext3 partitions as i needed
with fdisk on a sizable SD card, so that part's not hard.

  finally, it appears that i would simply need to parameterize

# printenv
...
mmcargs=setenv bootargs console=${console} ${optargs} \
     root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

to select the value of "root=" every time i boot.

  is there any more to it than that? is there something subtle that
i'm not taking into account? thanks.

rday

Robert,

This would work. A few remarks though:

- you need to interrupt the boot process over serial to change the
booting rfs
- the distro's need to use the same kernel (and provide the modules
for that kernel version)
- of course you could also load a different kernel image
- you could set things up that there is a simple variable to select
which system to boot (e.g. if (os = "a) setenv bootimage
"debian.bin" ....
- if you save the variable you can even boot into the last used os
- and from that os you could use fw_setenv to change the os var. (btw:
is there a package that provides fw_setenv for the target?)
- but even better you could write a dedicated small app which you
launch which has e.g. a grub-line UI (you can start non-linux apps
from u-boot; see www.denx.de)

Let us know how you proceed (or, even better, document it in the
wiki).

Frans

Robert,

This would work. A few remarks though:

- you need to interrupt the boot process over serial to change the
booting rfs

  if i'm always interrupting the initial boot process to drop into
u-boot and make some kind of manual selection there, this wouldn't be
an issue, would it?

- the distro's need to use the same kernel (and provide the modules
for that kernel version)
- of course you could also load a different kernel image

  yup, i mentioned in my initial post that, in a perfect world, i
could use the same kernel uImage for every distro, but clearly, i can
always go with the pre-built, distro-specific kernel for each distro,
and slowly figure out a common config that would work for all of them.

- you could set things up that there is a simple variable to select
which system to boot (e.g. if (os = "a) setenv bootimage
"debian.bin" ....
- if you save the variable you can even boot into the last used os
- and from that os you could use fw_setenv to change the os var. (btw:
is there a package that provides fw_setenv for the target?)
- but even better you could write a dedicated small app which you
launch which has e.g. a grub-line UI (you can start non-linux apps
from u-boot; see www.denx.de)

  and this is where i really should read the u-boot manual to see what
i'm allowed to do and what programming constructs are available for
this. i'll let you know.

rday