GRUB2 Port installation

Christian Franke Christian.Franke@t-online.de
Sun May 23 03:53:00 GMT 2010


Mario Limonciello wrote:
> I was looking to use /usr/sbin/grub-install from the Cygwin GRUB2 port
> to install to a partition.  I can't seem to determine however what to
> use as the install_device argument.  There aren't any device nodes w/
> cygwin, and grub-probe insists that it has error finding a device for
> /boot/grub (since /dev isn't mounted).
>    

The INSTALL_DEVICE argument should be the Cygwin device name of the boot 
disk (not the boot partition), typically "/dev/sda". This device node is 
provided by Cygwin even if it does not appear in /dev directory.

The grub-probe tool can be used to detect the device name of a specific 
partition:

  # /usr/sbin/grub-probe -t device /cygdrive/c
  /dev/sda2


Here some recommended steps to install grub2 on a new machine:

- Create a grub rescue image which includes osdetect.lua script:

  $ grub-mkrescue --output=rescue.iso /usr/share/grub/osdetect.lua

- Burn rescue.iso to a CD (or 'dd' it to floppy or USB stick).

- Boot the rescue disk.

- Detect installed operating systems and run created boot menu:

  grub> lua /osdetect.lua
  grub> normal

- Boot Windows through boot menu.


If the above works GRUB is compatible with the machine and you have a 
working rescue disk in case grub-install fails.

- Install grub:

   # /usr/sbin/grub-install --no-floppy /dev/sda

- Create grub config file:

   # /usr/sbin/grub-mkconfig /boot/grub/grub.cfg



-- 
Regards,
Christian Franke


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list