This is the mail archive of the
mailing list for the eCos project.
Re: RedBoot 'ifdisk' command
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Frank Pagliughi <fpagliughi at mindspring dot com>
- Cc: eCos Patches <ecos-patches at ecos dot sourceware dot org>
- Date: Mon, 15 May 2006 13:01:50 +0200
- Subject: Re: RedBoot 'ifdisk' command
- References: <446744FF.email@example.com>
On Sun, May 14, 2006 at 10:55:59AM -0400, Frank Pagliughi wrote:
> This patch adds a command to RedBoot called 'ifdisk'
> It allows for a command to be executed conditionally based on the
> presence of a disk drive. It's included as an option to the RedBoot
> disks package.
I've not looked at the details yet, I don't think you actually need
The exec command will not do anything if the previous load did not
work. So it should be possible to do something like:
mount -d /dev/hda1 -t ext2 /extern
load -m disk /extern/boot/zImage
mount -d /dev/hdb1 -t ext2 /intern
load -m disk /intern/boot/zImage
If the external disk exists, the load will work and the first exec
will happen. If the disk does not exist, the first load fails, the
first exec is a NOP and the second load and exec boots the internal