[rear-users] Grub2

Christian Meißner cme at bashbuch.de
Tue Jun 11 11:44:43 CEST 2013


i think the code should be better inside 94_grub_rescue.sh. Why? a separate
file will produce code redundancies. For example:

### Only do when explicitely enabled
if [[ ! "$GRUB_RESCUE" =~ ^[yY1] ]]; then
    return
fi

or

grub_version=$(get_version "strings $grub_binary")

here it will be better to use a more common binary e.g. "grub-install" or
so.

Also the part of kernel or initrd linking will be exists twice if we create
a new script. IMHO it would be better to create a structure like that:

case "grub_version" in
        1.*) echo "do 1.0 stuff" ;;
        2.*) echo "do 2.x stuff" ;;
        *) echo "foo" ;;
esac

ATM i don't find time to write the code. but perhaps i will come back later
if we're not so busy anymore.

br

Christian


2013/6/11 Gratien D'haese <gratien.dhaese at it3.be>

> Great, I would use 94_grub2_rescue.sh as name.
>
> On Tue, 11 Jun 2013 11:03:54 +0200, Christian Meißner <cme at bashbuch.de>
> wrote:
>
> ok, i have found the skript which creates grud menu.lst entry in
> "/usr/share/rear/output/default/94_grub_rescue.sh". This code doesn't know
> anything about grub2. While we only use grub2-systems i will write the
> needed code.
> What do you think, should i add grub2 ability to the above script or is a
> single script the better way?
>  Cheers
>  Christian
>
>
> 2013/6/11 Christian Meißner <cme at bashbuch.de>
>
>> Hi Gratien,
>> 1st) i refer to http://relax-and-recover.org/usage/. And here paragraph
>> "Rescue System". This seems not working for grub2 systems.
>>  2nd) i think that the first point don't interfers with
>>      OUTPUT=ISO
>>     ISO_DIR=/srv/backup/rear/
>>     ISO_PREFIX=${HOSTNAME}_$(date +"%Y%m%d_%H%M")
>>  which we already configured.
>>  br
>>  Christian
>>
>>
>>  2013/6/10 Gratien D'haese <gratien.dhaese at it3.be>
>>
>>>  The first question - not sure I understood the question correctly -
>>> are you talking about the rear boot menu?
>>>
>>> Second question - use a different OUTPUT_URL from the BACKUP_URL to
>>> separate the archive backup from the iso image.
>>>
>>> On Mon, 10 Jun 2013 17:42:22 +0200, Christian Meißner <cme at bashbuch.de>
>>> wrote:
>>>
>>> How we can add an entry to grub2 menu automatically? And how we can copy
>>> the iso to /boot and another location?
>>>
>>>   _______________________________________________
>>> rear-users mailing list
>>> rear-users at lists.relax-and-recover.org
>>> http://pikachu.3ti.be/mailman/listinfo/rear-users
>>>
>>>
>
> --
>
> Gratien D'haese
> IT3 Consultants bvba
> Vennestraat 15, B-2560 Nijlen
>
>
> _______________________________________________
> rear-users mailing list
> rear-users at lists.relax-and-recover.org
> http://pikachu.3ti.be/mailman/listinfo/rear-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pikachu.3ti.be/pipermail/rear-users/attachments/20130611/ff482079/attachment.html>


More information about the rear-users mailing list