lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <45AE1D65.4010804@wpkg.org>
Date:	Wed, 17 Jan 2007 13:58:13 +0100
From:	Tomasz Chmielewski <mangoo@...g.org>
To:	linux-kernel@...r.kernel.org
Subject: kernel cmdline: root=/dev/sdb1,/dev/sda1 "fallback"?

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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ