bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-install doesn't handle correctly separate /boot partition


From: Alessandro Rubini
Subject: Re: grub-install doesn't handle correctly separate /boot partition
Date: Mon, 9 Oct 2000 23:07:32 +0200

I think there is another problem with the line shown by Thierry:

> grubdir_device=`df ${grubdir} | grep /dev/ \
>     | sed 's%.*\(/dev/[a-z0-9]*\).*%\1%'`

The sed expression is wrong as it restricts device names to be lowercase
alphanumeric chars. This is a bad assumption. I'd prefer to make
no assumptions at all:

        df ${grubdir} | awk '/dev/ {print $1}'

If, however, "$1" looks too generic or awk doesn't look a good tool to
use, the sed expression should return everything up to a space-or-tab,
not only alphanumeric chars. Under some systems devices live under
/dev/dsk.  For example when a Linux kernel uses devfs.

        df ${grubdir} | grep /dev/ | sed 's%.*\(/dev/[^         ]*\).*%\1%'

(note the space-tab char set).

/alessandro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]