[Top][All Lists]

[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: Fri, 1 Oct 2010 23:06:17 +0800

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
    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    :)

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

reply via email to

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