Re: Change root partition
Dear Martin,
On Tuesday 10 March 2009, Martin Michlmayr wrote:
> * Mathias Waack <M.Waack@gmx.de> [2009-03-10 19:59]:
> > > The root device is stored in the ram disk, so you have to run:
> > > update-initramfs -u
> > > after changing /etc/fstab.
> >
> > thanks for the fast answer, but it raises another question: is there a
> > workaround for #514756 (bug in parsing /proc/mdstat)?
>
> You could try to make the following change to
> /usr/share/initramfs-tools/hook-functions. It should work for your
> particular setup:
>
> --- hook-functions~ 2009-02-10 17:06:17.000000000 +0100
> +++ hook-functions 2009-02-10 17:06:53.000000000 +0100
> @@ -268,7 +268,7 @@
> # md root /dev/mdX
> elif [ "${root#/dev/md}" != "${root}" ]; then
> root=${root#/dev/}
> - block=$(awk "/^${root}/{print substr(\$5, 1, 3); exit}" \
> + block=$(awk "/^${root}/{print substr(\$6, 1, 2); exit}" \
this doesn't work, do you mean:
+ block=$(awk "/^${root}/{print substr(\$6, 1, 3); exit}" \
?
In my setup update-initramfs also checks the root partition to find out which
boot loader is used (/usr/sbin/update-initramfs mbr_check() in line 188ff).
After changing both lines update-initramfs works, but the nas is dead after
reboot. Good time to test the recovery mode;)
Mathias
Reply to: