help-grub
[Top][All Lists]
Advanced

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

Re: Embedding a file into core.img


From: Andrey Borzenkov
Subject: Re: Embedding a file into core.img
Date: Wed, 20 Mar 2013 07:18:49 +0400

В Wed, 20 Mar 2013 00:15:07 +0100
"Arbiel (gmx)" <address@hidden> пишет:

> Hi
> 
> I'm trying to embed a file into core.img. I followed instructions from 
> GNU Grub Manual's 5.4 Embedding a configuration file into Grub and tried 
> to replicate the example given there with a config file figuring two lines
> 
>       search.fs_uuid the_uuid_of_my_partition root
>       set prefix=($root)/boot/grub
> 
> 
> I used the following commands
> 
> #! /bin/bash
> cd "${1}"
> cat 1> grub/embed.cfg <<EOF
> search.fs_uuid 0aceef09-a694-4105-bade-2dca95a09a08 root
> set prefix=($root)/boot/grub
> EOF
> sudo grub-mkimage -c 'grub/embed.cfg' -o 'grub/grub-image' -O i386-pc -d 
> '/usr/lib/grub/i386-pc' -C none search_fs_uuid

-O and -d together are redundant. 

> sudo chmod +x 'grub/grub-image'
> sudo grub-install --boot-directory=/media/maisonnette 
> --grub-mkimage=grub/grub-image /dev/sdb 2>grub/msg.log
> 

--grub-mkimage points to program to create image, not to image itself.

You do not explain what you attempt to achieve. May be using grub-rescue
to build ISO image that includes full grub and can optionally include
arbitrary files would be easier?

> I get the following error message
> 
> grub/grub-image: 1: grub/grub-image: Syntax error: word unexpected 
> (expecting ")")
> 
> Can anybody tell me what's wrong, knowing that my partition 
> /media/maisonnette has nothing to do with the 
> 0aceef09-a694-4105-bade-2dca95a09a08 partition.
> 
> Thank you
> 
> I used the following command
> 
>   
> 
> 
> 
> _______________________________________________
> Help-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-grub




reply via email to

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