Bug#417407: debian-installer: possible workarounds for "d-i destroyed existing raid device"
Cut and paste from BTS web interface so sorry for the formatting!
From: Samuel Thibault <firstname.lastname@example.org>
Subject: Re: Bug#417407: debian-installer: d-i destroyed existing raid device
Date: Tue, 3 Apr 2007 19:26:25 +0200
martin f krafft, le Tue 03 Apr 2007 10:28:24 +0200, a écrit :
And the other question of course is why the kernel decided it had
any business doing recovery on an fs that was marked for ro mount.
Because it always do so, see linux/fs/ext3/super.c:ext3_load_journal():
even if the mount is read-only, the journal is recovered. If (but only
if) the device itself is read-only, then nothing is written back to the
disk. Ext3 clearly lacks xfs' norecovery mount option.
I can think of two possible workarounds for this. NB: I have not
looked at the code but I'm just thinking out loud.
 at the partitioner stage configure md devices... IIRC this should
recognize the preexisting device. Then mark the device to be mounted
at /home (or /oldhome for the ultra paranoid) and markit to be left
alone (ie not formatted). _Presumably_ os-prober would then ignore the
md device and it's components when looking for other OS's.
 wrap the mount/umount sections of code in os-prober with calls to
blockdev to set the block device readonly (and restore old perms on
umount). This would side step the deficiencies in the "unconditional
ext3 journal recovery code". (but this would need a block-dev udeb
added to util-linux source)
Just some thoughts...