On 23 March 2013 07:37, Thierry Vignaud <thierry.vignaud@gmail.com> wrote:
On 22 March 2013 12:20, Glen Ogilvie <nelg@linuxsolutions.co.nz> wrote:
> I've been trying to test the installer change below before RC4, thinking
> that it might be quite helpful.
>
> I am having a little bit of trouble however.  Could someone point me in the
> right direction on a couple
> of things.
>
> 1. How does the src tar.xz file for drakx-installer-stage2 get created?   I
> assume it comes from a
> build of svn://svn.mageia.org/svn/soft/drakx/trunk, but can't find how it
> ends up as a tar.xz
>
> 2. When I've built a new stage2, any tricks on getting it into an ISO?
>
> I tried building an ISO based on beta3, with the new stage2, using something
> like:
>   mkisofs -o
> ~nelg/Mageia-3-beta3-x86_64-DVD/Mageia-3-beta3-x86_64-DVD-stage2.iso -b
> x86_64/isolinux/isolinux.bin -c boot.catalog  -no-emul-boot -boot-load-size
> 4 -iso-level 4 -J -R /tmp/tt/
>
> This is clearly not right.  Is the a documented method I should use to build
> a new ISO with a modified stage2?
> In the docs I have read:
> https://wiki.mageia.org/en/Drakx-installer_tips_and_tricks#rebuild_the_stage_2
> and svn://svn.mageia.org/svn/soft/drakx/trunk/docs/README, I have not been
> able to find instructions on actually putting together an ISO.
>
> Is:
> http://wiki.mandriva.com/en/How_to_remaster_a_personal_Mandriva-based_ISO
> relevant for Mageia?  I guess not, as mkcd does not seem to exist in Mageia.
>
> So, a quick howto, or pointing me to the right documentation would be great
> :)

stage2 != ISO

ISO is basically the stage1.
stage1 is build by drakx-installer-images from:
- some packages listed as BR, mainly the kernel drivers & firmwares
- drakx-installer-binaries that provide the actual stage1 binary

=> generates what is copied in isolinux/alt0 & in install/images/
(*.img + *.iso)

stage2 is build by drakx-installer-stage2

=> generates what is in install/stage2: mdkinst.sqfs (a squashfs image)
there's also rescue.sqfs there that is an alternate stage2 used when
using the rescue.


stage1 is basically a special initrd that loads the appropriate
modules according to detected
hardware and to what is specified on command line (eg: the DVD tells
it to directly load
stage2 from the DVD image).
if not instructed to do sg, it displays the text menu asking from
where to install (dvd, hard disk,
network: http/ftp/nfs).
It's a small statically linked program + init + a dhcp client +
rescue-gui for the rescue menu

it then loads stage2 (install/stage2/mdkinst.sqf or rescue.sqfs) from the URL

stage2 is real system, with dynamic libraries, that starts:
- an X11 server (if supported and if not asked for text mode)
- udev
and then go the install steps (language, license, partitionning,
installing, summary, updates, ...)

Hi Thierry,

I appreciate you taking time to reply and let me know these details. It confirms
my understanding.  What I would like to know is how to create / master the DVD
installer ISO, and make that  master contain a stage2 that I have built.

I have been able to build a stage1 boot.iso, but what I would like is build a
DVD image, based on Mageia-3-beta3-x86_64-DVD.iso, with just a different
 stage2, and maybe a rebuilt stage1 if needed.

I guess someone must know how Mageia-3-beta3-x86_64-DVD.iso, and the
other images get created.  I don't want to rebuild all the packages that go in
them, just assemble one with the same packages as
Mageia-3-beta3-x86_64-DVD.iso, and a updated install/stage2/mdkinst.sqf file.

Once this is figured out, I will happly update the Mageia wiki with details, which
I think will be helpful for anyone wanting to make customised Mageia DVDs.

Regards
Glen Ogilvie