grub-devel
[Top][All Lists]
Advanced

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

Trying to build Rescue image for three different target and platform


From: adrian15
Subject: Trying to build Rescue image for three different target and platform
Date: Sun, 09 Mar 2014 17:14:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.3.0

Basically what I want to do is to use grub-mkrescue to generate a grub2 rescue disk with some custom files (The Super Grub2 Disk stuff).

However I want to build different files depending on target+platform combination.

My four combinations are:

    * (Hybrid) x86_64+efi and i386+pc
    * i386 - pc
    * x86_64 - efi
    * i386 - efi

More about this setup.

1) As an initial setup I work with a Debian Unstable Sid Chroot amd64 as described in:
http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot#Introduction
2) I use Debian's Grub2 source code so that I do not have to deal manually with dependencies. That's explained here: http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot_Grub2_Build_And_Installation (just before Hybrid build section).

3) x86_64_efi build is working. Basically what I run in the src dir is:

  sudo rm -rf /usr/local/share/grub
  sudo rm -rf /usr/local/lib/grub
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
./configure --target=i386 --with-platform=efi && make && sudo make uninstall
  make clean
  make distclean
./configure --target=i386 --with-platform=pc && make && sudo make uninstall
  make clean
  make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make uninstall
  make clean
  make distclean
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
./configure --target=x86_64 --with-platform=efi && make && sudo make install

And what I do for generating the file image is:

grub-mkrescue --output=super_grub2_disk_x86_64_efi_2.00s1-beta6.iso $(mktemp -d)

4) i386_pc build is not working. Basically what I run in the src dir is:

  sudo rm -rf /usr/local/share/grub
  sudo rm -rf /usr/local/lib/grub
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
./configure --target=i386 --with-platform=efi && make && sudo make uninstall
  make clean
  make distclean
./configure --target=i386 --with-platform=pc && make && sudo make uninstall
  make clean
  make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make uninstall
  make clean
  make distclean
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
  ./configure --target=i386 --with-platform=pc && make && sudo make install


And what I do for generating the file image is:

grub-mkrescue --output=super_grub2_disk_i386_pc_2.00s1-beta6.iso $(mktemp -d)

5) I attach the current helper scripts that I use.

supergrub-mkrescue : This is a very simple wrapper around: grub-mkrescue. You do not need to take care about it.

supergrub-meta-mkrescue : This is what I have explained above. This script assumes that you have setup your grub2 source code in:
/home/adrian/gnu/sgd/debian_grub2/grub2-2.00
and that supergrub-mkrescue script is found in the same folder as supergrub-meta-mkrescue.

Currently supergrub-meta-mkrescue has been modified so that it ends (Check the return 0 ; line) after building:

* x86_64_efi
and
* i386 - pc
.

6) When I build i386 - pc I get this error:

xorriso : FAILURE : Given path does not exist on disk: -boot_image system_area='/usr/local/lib/grub/i386-pc/boot_hybrid.img'

Why is it failing to create /usr/local/lib/grub/i386-pc/boot_hybrid.img file?

7) Is it useful that I insist on building an i386+efi release? Any machine system that uses it? Some old Mac-something hardware perhaps?

8) What's the best way to build and install an hybrid system that includes both: x86_64_efi and i386 - pc stuff?

Current code is:

  ./configure --target=i386 --with-platform=pc && make && sudo make install
  make clean
  make distclean
./configure --target=x86_64 --with-platform=efi && make && sudo make install

9) A) What's the best way to remove grub configuration files installed on the system so that I can start from scratch so that already built target+platform grub binaries or configurations are ignored?

B) That's what I try to do in clean_every_build function in supergrub-meta-mkrescue script but I do not think its an efficient way of doing it.

C) You know I would like to remove the rm -rf /usr/local/share/grub and rm -rf /usr/local/lib/grub lines (too weird) and just use the:

./configure ; make ; make uninstall part.

D) Which I do not know if could be re-written as:

./configure ; make uninstall

(Notice that there is not a make step).

Does removing the make default target call (make) breaks "make uninstall" functionality?

10) As a summary I basically want to build and install from upstream source code and then make one rescue disk for each one of these four combinations. (And make theses rescue diks in a row)

    * (Hybrid) x86_64+efi and i386+pc
    * i386 - pc
    * x86_64 - efi
    * i386 - efi

So... any help on this build automation process?

Thank you very much!


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

Attachment: supergrub-mkrescue
Description: Text document

Attachment: supergrub-meta-mkrescue
Description: Text document


reply via email to

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