help-grub
[Top][All Lists]
Advanced

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

Re: What does grub-install do?


From: Dennis Cao
Subject: Re: What does grub-install do?
Date: Sat, 2 Oct 2010 00:48:50 +0800

HI �橇�,
I think you are right.
My OS is Ubuntu 9.10 and GRUB is 1.97 beta.  :)


在 2010年10月1日 下午11:51,Goh Lip <address@hidden> 写道:
> On Friday 01,October,2010 11:06 PM, Dennis Cao wrote:
>> hi, �橇�
>> Thanks a lot for your help :)
>>
>> You are right, my usb disk is (hd0,1) if  I choose boot from USB Hard
>> Disk in BIOS.  If I choose to boot from hard disk, the usb disk is
>> (hd1,1). The grub.cfg in usb disk has:
>>     set root=(hd0,1)
>>     search --no-floppy --fs-uuid --set 119b5aaf-7d23-45d7-bcb8-b6b94a5eb238
>> May I ask what env variable root is used for by grub?
>>
>> I tried these commands in grub command line after booting from usb disk:
>>      grub>echo $root
>>      hd1,8
>>      grub>set root=(hd0,1)
>>      grub>ls /
>>      boot, grub, ...
>>
>>   It shows that after executing command 'set root=(hd0,1)', root
>> directory '/' is set to disk (hd0,1).  But in this disk, I just create
>> a folder 'boot', why a folder named 'grub' is created here?
>>
>> As for the grub-mkrescue command, the syntax may be in Grub 1.97beta:
>>     grub-mkrescue grub-rescue.iso    :)
>>
>>
>>
>>
>> NOTE:
>> commands used to install grub to usb disk:
>>           $ sudo grub-install /dev/sdb1
>>          $ mount /dev/sdb1 /media/usb01
>>       $ cd /media/usb01
>>       $ mkdir -p ./boot/grub
>>       $ cp -dpR /boot/grub/* ./boot/grub
>>           (edit /media/usb01/boot/grub/grub.cfg as mentioned above)
>>
>>
>> -----
>> Cao, Guilin
>
> Cao,  你好, command "grub-mkrescue grub-rescue.iso" is for older
> versions of grub2; what OS and version are you using? A slightly newer
> version uses "--overlay" and the newest version requires you to add
> "--output". But nevermind, if it works, so be it.  :)
>
> Why the need for the folder 'grub' in 'boot'? - I guess that's how the
> OS boot was created and when we "grub-install --root-directory", it
> copies it there.
>
> The commands you used was about how I created an old grub-legacy
> dedicated partition and I would think it will work too with grub2. But I
> personally think with the easier shortcuts now available for grub2, it
> will not be necessary. But, again, if it works and you are comfortable
> with it, so be it.
>
> Good luck, Cao and best wishes. - Goh Lip
>
> --
> Nice place, Guilin; my wife visited there about 5 times.
> Me? I've never been to China.  :(
>
> _______________________________________________
> Help-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-grub
>



-- 
---------------------------------
曹贵林 ( Dennis Cao )



reply via email to

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