[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <55FAA6BB.3060008@odi.ch>
Date: Thu, 17 Sep 2015 13:40:43 +0200
From: Ortwin Glück <odi@....ch>
To: Drew DeVault <sir@...wn.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Failover root devices
> I would like to see Linux support multiple root devices
You can do that completely in user space from an initramfs.
From your init script you can do what you want. You may even parse /proc/cmdline and use the root=
parameter as you propose. Then mount whatever root device you want by whatever method you like and
finally
exec switch_root /mnt/root /sbin/init "$@"
See here for example scripts for initramfs:
http://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html
Above script actually makes it easy by supporting disk labels: root=LABEL=ROOT will boot the first
available partition that is labelled ROOT. It is independent of the device name and works nice when
you switch hardware vs. virtual machines for instance.
Ortwin
--
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