Am Donnerstag, den 29.10.2009, 00:00 +0100 schrieb Robert Millan:
> On Wed, Oct 28, 2009 at 11:33:51PM +0100, Felix Zielcke wrote:
> > +if which sfdisk /dev/null ; then
> > + GRUB_DEVICE_DISK=`echo ${GRUB_DEVICE} | sed -e "s/[0-9]*$//"`
> > + sfdisk -R ${GRUB_DEVICE_DISK} 2>/dev/null
> > +fi
>
>
On Wed, Oct 28, 2009 at 11:33:51PM +0100, Felix Zielcke wrote:
> +if which sfdisk /dev/null ; then
> + GRUB_DEVICE_DISK=`echo ${GRUB_DEVICE} | sed -e "s/[0-9]*$//"`
> + sfdisk -R ${GRUB_DEVICE_DISK} 2>/dev/null
> +fi
s/[0-9]*$// doesn't catch all partition path layouts. More heuristic
is needed
/dev/disk/by-uuid seems to be only created when the partition table gets
reread after a new filesystem has been created.
So here's a patch which does it with sfdisk.
I wasn't sure if some devices like e.g. /dev/mapper/* should be ignored.
mdraid devices can have partitions so they should be tried