How to create Preload ISOs like in Studio?

Hello.

I realize I’m probably very late to the party on this question, but searching forums, google and mailinglists unfortunately does not turn up anything useful for me.

** What I want to achieve:**
I want to create a SLES12 preload ISO with a custom boot logo. Booting that ISO should automatically partition the harddisk according to some configuration parameters, extract a handful of additional files I provide and ideally run a custom script.

** How I used to do that:**
I used to do that with suse studio and the preload iso target. I have exported the kiwi configuration from there.

** How I’m trying to do that now:**
Using Open Build Services I managed to get my kiwi target built. I got a .raw.xz file from it that I don’t know what to do with. I’m pretty much lost at this point…

On Fri 08 Jun 2018 08:56:02 AM CDT, blindcoder wrote:

Hello.

I realize I’m probably very late to the party on this question, but
searching forums, google and mailinglists unfortunately does not turn up
anything useful for me.

  • What I want to achieve:*
    I want to create a SLES12 preload ISO with a custom boot logo. Booting
    that ISO should automatically partition the harddisk according to some
    configuration parameters, extract a handful of additional files I
    provide and ideally run a custom script.
  • How I used to do that:*
    I used to do that with suse studio and the preload iso target. I have
    exported the kiwi configuration from there.
  • How I’m trying to do that now:*
    Using Open Build Services I managed to get my kiwi target built. I got a
    …raw.xz file from it that I don’t know what to do with. I’m pretty much
    lost at this point…

Hi and welcome to the Forum :slight_smile:
You can use xzcat and dd to lay down the image onto your install medium;


xzcat [image].raw.xz | dd bs=4M of=/dev/sdX iflag=fullblock oflag=direct; sync

Boot your install system and see how it goes.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-23-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I’m not quite sure what putting a hardisk image onto a harddisk is going to achieve in terms of creating an installable iso file.

Nevertheless, to answer my own question:

<type checkprebuilt='true' boot='oemboot/suse-SLES12' fsnocheck='true' filesystem='ext3' bootloader='grub2' kernelcmdline='quiet' fsmountoptions='acl' image='oem' installboot='install' installiso='true'>

Appending the “installboot=‘install’ installiso=‘true’” parameters started creating .iso files for me.

Thanks for your time!

On Fri 08 Jun 2018 01:16:03 PM CDT, blindcoder wrote:

I’m not quite sure what putting a hardisk image onto a harddisk is going
to achieve in terms of creating an installable iso file.

Nevertheless, to answer my own question:

<type checkprebuilt=‘true’ boot=‘oemboot/suse-SLES12’
fsnocheck=‘true’ filesystem=‘ext3’ bootloader=‘grub2’
kernelcmdline=‘quiet’ fsmountoptions=‘acl’ image=‘oem’
installboot=‘install’ installiso=‘true’>

Appending the “installboot=‘install’ installiso=‘true’” parameters
started creating .iso files for me.

Thanks for your time!

Hi
It was intended to put on a USB device, plug that in and boot… :wink: no
need for the additional step of an iso image (are they still used :wink: )

Not sure if you have seen this;
https://github.com/agraf/kiwi-tutorial


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-23-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

It was intended to put on a USB device, plug that in and boot… :wink: no
need for the additional step of an iso image (are they still used :wink: )

Well, for one thing, you can’t attach a .raw file to a VMWare Workstation 12 or ESXi server, but you can attach an ISO.

IMO
You should break down your project into discrete parts and clearly define what is in each part, eg

ISO - It’s actually just a “container” for the content you want to execute. There are plenty of guides and tools for creating “autorun” ISOs. And, there are alternatives for deploying alternative “containers” like the floppy format or creating bootable USB images like what Malcolm suggested (nowadays people often look for ways to take an ISO image and deploy to USB and USB sticks can be formatted to support either ISO or random access images more typical of HDD)

Content - Administrators have used a variety of tools to create the <content> which in your case appears to be the various commands necessary to prepare a system for installation. Kickstart is a popular choice. In openSUSE, we have AutoYaST and a few other tools. I personally prefer to just string together well known commands typically run in a BASH console. Enterprise solutions include Puppet and Chef. And there are many more choices, far beyond what can be listed here. What suits you will depend on the size and complexity of what you want to automate, particularly if you want to create and configure Users with different security, install applications specific to groups of Users, support different types of machines and hardware, more.

Supported Deployment Scenarios - You yourself mentioned that you may wish to support installation into virtual machines which might not support bootable USB devices (or might, all depends). Besides CDROM images, you might also consider PXE and similar network boot images. If you’re deploying in a very large virtual infrastructure like OpenStack (or maybe even much smaller and less complicated), you may prefer to use a strategy based on the “Golden Image.” And, with P2V and V2P utilities, these mainly virtualization strategies might even support physical deployments.

Each of what I mentioned can be found, eg there is official AutoYaST documentation by SUSE/openSUSE, Kickstart is its own community project, etc. but if you can’t find anything related to what was mentioned, you just need to ask.

Based on what you say you’ve already accomplished in your first post, I’d maybe consider a PXE approach as most promising.

IMO,
TSU

Hey Tsu2, thanks for your exhaustive answer!
I’ll need to re-read it a few times to completely grasp it, but from a first read I feel like autoyast may be the way to go for me.

What I need to achieve:
We have an “appliance” type of installation that we take to customers, plug into whatever environment they have, and ideally it installs all the way through without interaction. Only requirement is that the disk has at least 40 GiB and 10 GiB are on a seperate filesystem mounted on /var. Addidtionally, a custom bootsplash screen is to be added.
After the first login, a custom script starts that does the actual installation of the software and some system configuration and cleanup. I have a small local environment that adds all of this locally as I’m not allowed to upload it publicly.
Now what I used to do was use suse studio to create that iso file that does the installation. To have the correct partitioning, I put the following into config.kiwi:

      <systemdisk name="systemVG">
        <volume name="var" size="10240M" />
      </systemdisk>

Unfortunately, that breaks the build on OBS now.

What we really do NOT want is add this system into any kind of management environment like puppet or chef as the software is pretty finicky about versions and we do not want people screwing around with it or the server.
To clarify, the software itself is publicly available (for a price) and we make our money by providing services around it, so we REALLY don’t want calls along the lines “I updated your appliance to a new major release of SuSE and now nothing works anymore!” :slight_smile: