[Top][All Lists]

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

Re: Grub2 does not detect any devices

From: Andrei Borzenkov
Subject: Re: Grub2 does not detect any devices
Date: Wed, 10 Aug 2016 17:01:12 +0300

On Wed, Aug 10, 2016 at 3:18 PM, Maxim Blinov <address@hidden> wrote:
> Hi, I'm having some trouble with (what I suspect) a custom core.img binary
> to work.
> I have a 1Gb HDD image (created using bximage for Bochs), onto which I wish
> to install Grub 2. There is no OS present.
> I understand that a Grub installation consists of 3 parts:
>  - The boot.img image, which occupies the first sector
>  - The core.img image, which occupies space following the first sector up
> until the start of the next track
>  - And the /boot/grub/ directory, in which the grub.cfg and other modules
> are located.
> ----------
> First I use a boot.img image that from within my own Linux /boot/grub/
> directory.
> Following this, I generate my core.img image using the following command:
> sudo grub-mkimage -v --format=i386-pc -o core.img
> -p\(hd0,msdos1\)/boot/grub ls ext2 part_msdos

You should always be using grub-install unless you need to work around
missing functionality (in which case you need to explain why you had
to resort to low level tools so that grub-install can be fixed).

In your case you did not include any disk driver.

> And to install them onto the final disk image, I use the following commands:
>  - sudo dd if=boot.img of=/dev/loop0 bs=446 count=1

boot.img needs to include information about core.img location;
grub-install adds it. You are lucky it worked this way.

reply via email to

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