All of lore.kernel.org
 help / color / mirror / Atom feed
From: adrian15 <adrian15@raulete.net>
To: grub-devel@gnu.org
Subject: how to build a grub2 floppy with fs adventure
Date: Thu, 07 Jun 2007 03:53:45 +0200	[thread overview]
Message-ID: <46676529.1030806@raulete.net> (raw)

	You can advice me to run easier commands.
Here is my experience.

I do not want to install grub2 in my production environment so I plan to
install into a floppy. The cat and dd way of install grub ( cat boot.img
core.img | dd of=foo.img seek=0 conv=notrunc  ) does not convince me
because I want to be able to read a filesystem from my grub2, i.e., the
floppy filesystem.

	I've finally decided myself to use grub-install command from the
compiled sources directory ( In my system it is:
/home/adrian/Desktop/gnu/grub2/grub2_2007_05_31


1st problem: no core.img
==========================
	The first problem is that no core.img is available once you run 'make'.
So I build one core.img like this:

./grub-mkimage -d ./ -o core.img

Once I have the come.img, I try to use grub-install, I finally found
this to work:


./grub-install --root-directory=/media/floppy --modules=*.mod
--grub-setup=./grub-setup --grub-mkimage=./grub-mkimage
--grub-mkdevicemap=./grub-mkdevicemap --grub-probe=./grub-probe /dev/fd0

where the /media/floppy is the place where I mount my floppy and, of
course, the floppy has to be mounted!!! (I think the grub-legacy's
grub-install did mount whatever was needed automatically although I am
not very sure about that.)


2nd problem: grub-probe and partmap module
=============================================
Then the grub-probe command complained about a partmap module not being
found so I decided to comment these lines from ./grub-install :


# Then the partition map module.
#partmap_module=`$grub_probe --target=partmap --device-map=${device_map}
${grubdir}`
#if test "x$partmap_module" = x -a "x$modules" = x; then
#    echo "Auto-detection of a partition map module failed." 1>&2
#    echo "Please specify the module with the option \`--modules'
explicitly." 1>&2
#    exit 1
#fi


3rd problem: grub-install did complain about not finding:
/usr/local/lib/grub/i386-pc
===========================================================
so I created it as a link to
/home/adrian/Desktop/gnu/grub2/grub2_2007_05_31 (compiled sources dir)



4th problem:
=============
  In order to fix the  /usr/local/lib/grub/i386-pc problem I invented
myself another option for grub-install called --pkglibdir so that I
could specify the directory myself.

However I think that other grub-install subprograms such as grub-probe
or grub-mkimage also tried to find that /usr/local/lib/grub/i386-pc
folder which it is annoying.

This is why I did the link trick.

It works!
=============

Finally I unmounted the floppy and tried to run it from qemu... it worked!



adrian15




                 reply	other threads:[~2007-06-02 17:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46676529.1030806@raulete.net \
    --to=adrian15@raulete.net \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.