From: Andre Noll <maan@systemlinux.org>
To: "Keld Jørn Simonsen" <keld@dkuug.dk>
Cc: Neil Brown <neilb@suse.de>, linux-raid@vger.kernel.org
Subject: Re: auto-assembling arrays without a configuration file
Date: Mon, 10 Mar 2008 16:08:45 +0100 [thread overview]
Message-ID: <20080310150845.GF32242@skl-net.de> (raw)
In-Reply-To: <20080310134828.GF9348@rap.rap.dk>
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
On 14:48, Keld Jørn Simonsen wrote:
> Hmm, I am still looking for a way to boot a linúx raid as root.
Here's an init script that works for me on a server that has its root
partition on a software raid5 on /dev/md1. It uses busybox for all
commands except mdadm.
#! /bin/sh
export PATH=/bin:/sbin
echo initramfs startup
cat > /etc/fstab << EOF
proc /proc proc defaults 0 0
sysfs /sys sysfs rw 0 0
EOF
cat > /etc/mdev.conf << EOF
null 0:0 666
ptmx 0:0 666
EOF
mount /proc
mount /sys
mdev -s
mknod /dev/md1 b 9 1
echo 'DEVICE partitions' > /etc/mdadm/mdadm.conf
mdadm -E --scan >> /etc/mdadm/mdadm.conf
mdadm -A --scan || sh
mount -oro /dev/md1 /mnt || sh
mount --move /proc /mnt/proc
mount --move /sys /mnt/sys
cd /mnt
mount --move . /
exec chroot . /sbin/init 2 > /dev/console 2>/dev/console < /dev/console
Andre
--
The only person who always got his work done by Friday was Robinson Crusoe
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-03-10 15:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-08 0:40 auto-assembling arrays without a configuration file Keld Jørn Simonsen
2008-03-08 10:49 ` Keld Jørn Simonsen
2008-03-09 23:25 ` Neil Brown
[not found] ` <18388.27742.907731.241140@notabene.brown>
2008-03-10 13:48 ` Keld Jørn Simonsen
2008-03-10 15:08 ` Andre Noll [this message]
2008-03-14 5:27 ` Neil Brown
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=20080310150845.GF32242@skl-net.de \
--to=maan@systemlinux.org \
--cc=keld@dkuug.dk \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).