From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HuXnW-0007tP-PI for mharc-grub-devel@gnu.org; Sat, 02 Jun 2007 13:53:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HuXnT-0007tH-NJ for grub-devel@gnu.org; Sat, 02 Jun 2007 13:53:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HuXnT-0007t5-35 for grub-devel@gnu.org; Sat, 02 Jun 2007 13:53:51 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HuXnS-0007t2-SE for grub-devel@gnu.org; Sat, 02 Jun 2007 13:53:50 -0400 Received: from 245.red-80-24-127.staticip.rima-tde.net ([80.24.127.245] helo=manazas.ensanjose.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HuXnS-0003Oh-0s for grub-devel@gnu.org; Sat, 02 Jun 2007 13:53:50 -0400 Received: from localhost (manazas.ensanjose.net [127.0.0.1]) by manazas.ensanjose.net (Postfix) with ESMTP id 73764D444D for ; Sat, 2 Jun 2007 19:53:44 +0200 (CEST) Received: from manazas.ensanjose.net ([127.0.0.1]) by localhost (manazas.ensanjose.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09197-01 for ; Sat, 2 Jun 2007 19:53:44 +0200 (CEST) Received: from [192.168.1.5] (70.Red-81-35-214.dynamicIP.rima-tde.net [81.35.214.70]) by manazas.ensanjose.net (Postfix) with ESMTP id 0EBB5D32AE for ; Sat, 2 Jun 2007 19:53:43 +0200 (CEST) Message-ID: <46676529.1030806@raulete.net> Date: Thu, 07 Jun 2007 03:53:45 +0200 From: adrian15 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-kernel: Linux 2.4-2.6 Subject: how to build a grub2 floppy with fs adventure X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jun 2007 17:53:52 -0000 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