[LFS Trac] #2698: Small update on the grub-page (8.4.)

HouHongxun hohoxu_hao115 at hotmail.com
Thu Jun 24 23:50:35 PDT 2010


  On 2010年06月25日 13:57, LFS Trac wrote:
> #2698: Small update on the grub-page (8.4.)
> ----------------------+-----------------------------------------------------
>   Reporter:  splotz90  |        Owner:  lfs-book@…
>       Type:  task      |       Status:  closed
>   Priority:  normal    |    Milestone:  6.7
> Component:  Book      |      Version:  SVN
>   Severity:  normal    |   Resolution:  invalid
>   Keywords:            |
> ----------------------+-----------------------------------------------------
>
> Comment(by splotz90):
>
>   The search command does something for LFS ...
>
>   This command set the root-device for GRUB to hd0,1:
>   {{{
>   set root=(hd0,1)
>   }}}
>
>
>   After that GRUB will look for a partiton with the UUID ''06910bbb-95ff-
>   43f7-ac74-d44fe9caecf1'':
>
>   {{{
>   search --no-floppy --fs-uuid --set 06910bbb-95ff-43f7-ac74-d44fe9caecf1
>   }}}
>
>   If there's no partition with this UUID, GRUB will use the device set
>   before (hd0,1). If a partition with this UUID exists, GRUB will boot from
>   this partiton. In the most cases the partition set with the first command
>   will have the UUID in the search command.
>
>   This means: GRUB can boot if the device has changed (for example hd0,1 -->
>   hd1,1) and if a new filesystem was created.
>
Oh, yes. Now I understand. The "search --set {uuid}" command is used by 
grub itself, it has nothing to do with kernel's parameters or initrd.

Some days ago, I encountered a problem: I had changed set root=(hd0, x) 
to set root=(hd0, y), but grub still booted the kernel in (hd0, x) 
partition, I didn't know why, now I get the answer(I have the search 
line in my grub.cfg file).

Thank you.



More information about the lfs-book mailing list