All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Chmielewski <mangoo@wpkg.org>
To: linux-kernel@vger.kernel.org
Subject: kernel cmdline: root=/dev/sdb1,/dev/sda1 "fallback"?
Date: Wed, 17 Jan 2007 13:58:13 +0100	[thread overview]
Message-ID: <45AE1D65.4010804@wpkg.org> (raw)

I have a Linux (ARM) device that normally starts from /dev/sda1.

It is configured to do so via a cmdline in a RedBoot bootloader:

root=/dev/sda1


The device is pretty small and has no keyboard, video card etc., so if 
it ever happens to break (can be a disk failure, but also operator who 
messed with startup scripts), it has to be opened (warranty!).


These all unpleasant tasks could be avoided if it was possible to have a 
"fallback" device. For example, consider this hypothetical command line:

root=/dev/sdb1,/dev/sda1


/dev/sdb1 - USB-stick which can boot the device
/dev/sda1 - HDD which normally starts the device


It would mean, that kernel tries to boot the OS from /dev/sdb1, and if 
there isn't such a device, it tries to boot the OS from /dev/sda1.


In our case, /dev/sdb1 would be an external USB-stick capable to boot 
the device (in that case, we'd have to add rootdelay= option, too).
One would connect it only if he/she wants to service the device.

If /dev/sdb1 is not found by the kernel, the boot would start 
("fallback") from /dev/sda1.


Does this make sense?


As I understand correctly, the needed change would have to be done in 
init/do_mounts.c, around "static int __init do_mount_root" and "void 
__init mount_block_root"? Any clues on that?


-- 
Tomasz Chmielewski
http://wpkg.org



             reply	other threads:[~2007-01-17 13:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-17 12:58 Tomasz Chmielewski [this message]
2007-01-17 13:37 ` kernel cmdline: root=/dev/sdb1,/dev/sda1 "fallback"? Jan Engelhardt
2007-01-17 14:09   ` Tomasz Chmielewski
2007-01-17 20:33     ` H. Peter Anvin
2007-01-18 10:33       ` Tomasz Chmielewski
2007-01-18 10:47         ` H. Peter Anvin
2007-01-18 11:48           ` Tomasz Chmielewski
2007-01-18 18:48             ` H. Peter Anvin
2007-01-17 13:37 ` Alon Bar-Lev
2007-01-17 13:56   ` Tomasz Chmielewski
2007-01-17 14:06     ` Alon Bar-Lev
2007-01-17 14:12       ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2007-01-18 10:50 Al Borchers
2007-01-18 14:21 ` Tomasz Chmielewski
2007-01-18 20:33   ` H. Peter Anvin
2007-01-19  4:12   ` Al Borchers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45AE1D65.4010804@wpkg.org \
    --to=mangoo@wpkg.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.