Posts Tagged ‘Linux’

Creating a Mageia armv7hl docker image for Raspberry 3


Santa Claus has brought a shiny new Raspberry 3B+ to my son for Christmas ! While it came with raspian by default, I didn’t want to change it to Mageia directly even if it’s now available. We wanted to use it as a prod environment for his docker based setup on his laptop. Which is using Mageia 6 and also Mageia containers. So that’s where the fun begins because there is no mageia docker image for armv7hl available and usable on Raspberry. Well, now at least I have one, locally and can document here the way to do it, if you want to reproduce, or you can use mine as well, thanks to the docker hub !

So here are the steps of what I did to obtain mine:

  1. Download the arm reference image for raspberry and uncompress it
  2. Mount it as a loopback mount to access its content
  3. Use the content and QEMU magic to run armv7hl binaries on your x86_64 machine and prepare your environment
  4. Build a chroot on this point containing the minimal set of packages for a Mageia distribution
  5. Create the Docker image out of that file and enjoy using it !

Which means wrt commands:
$ #1

$ cd $HOME/tmp

$ wget

$ xz -d 181217_mga7arm_rpi.img.xz

$ #2

$ sudo kpartx -a 181217_mga7arm_rpi.img

$ sudo mkdir -p /mnt

$ sudo mount /dev/mapper/loop1p2 /mnt

$ #3

$ sudo urpmi qemu-user-static qemu-system-arm

$ sudo systemctl start systemd-binfmt

$ sudo chroot /mnt

# arch     # isn't it magic !!

# urpmi.update -a

$ #4

# cd /home/pi

# export TARGETDIR=../tmp

# mkdir -p $TARGETDIR

# export MGAARCH=armv7hl

# export MGAVER=6

# /usr/sbin/urpmi.addmedia --distrib --urpmi-root "$TARGETDIR"$MGAVER/$MGAARCH

# LANG=C LANGUAGE=C /usr/sbin/urpmi --auto --no-recommends --download-all --allow-force --force --force-key --urpmi-root "$TARGETDIR" basesystem urpmi

# export TMPDM=/tmp

# echo 'NETWORKING=yes' > $TMPDM/network

# install -m 0644 $TMPDM/network "$TARGETDIR"/etc/sysconfig/network

# rm -f $TMPDM/network

# rm -rf "$TARGETDIR/dev" "$TARGETDIR/proc"

# install -m 0755 -d "$TARGETDIR/dev" "$TARGETDIR/proc"

# cat > $TMPDM/resolv.conf << EOF

# install -m 0644 $TMPDM/resolv.conf "$TARGETDIR/etc/resolv.conf"

# rm -f $TMPDM/resolv.conf

# export DATE=2019-01-05

# cat > Dockerfile << EOF
FROM scratch
ADD mageia-$MGAVER-$MGAARCH-$DATE.tar.xz /
LABEL name="Mageia $MGAVER Base Image Arch: $MGAARCH" \
vendor="Mageia" \
license="GPLv2" \
CMD /bin/bash

# tar -C $TARGETDIR -cJf mageia-$MGAVER-$MGAARCH-$DATE.tar.xz .

# chmod 644 Dockerfile mageia-$MGAVER-$MGAARCH-$DATE.tar.xz

$ #5

$ ssh pi@raspberry mkdir docker

$ scp /mnt/home/pi/Dockerfile /mnt/home/pi/mageia-6-armv7hl-*.tar.xz pi@raspberry:docker

$ ssh pi@raspberry

pi$ sudo urpmi docker

pi$ cd docker

pi$ docker build -t mageiaofficial:6-armv7hl .

pi$ docker images
REPOSITORY    TAG            IMAGE ID             CREATED        SIZE
mageiaofficial    6-armv7hl 9b5880971b45    9 seconds ago 386 MB

pi$ docker run -ti mageiaofficial:6-armv7hl /bin/bash
[root@33a7bb3763b5 /]# urpmi tcsh
installing tcsh-6.19.00-5.mga6.armv7hl.rpm from /var/cache/urpmi/rpms
Preparing... #############################################
1/1: tcsh #############################################
[root@33a7bb3763b5 /]# exit

Voilà !!


So now on your raspberry, it’s for you as simple as:

docker pull bcornec/mageia:6-armv7hl

Will soon provide a cauldron one as well 🙂


When your CentOS 7 install fails, anaconda in CLI to the rescue


Ok, I know I’m always trying to do stuff a bit non-standard (No, running Mageia everywhere IS standard !!)

So this time, I wanted to update my CentOS 6 deployment server in Geneva to CentOS 7 and automate its setup with ansible (I already have some playbooks here to help).

The server is in a DMZ, with pretty strict security control, which normally isn’t an issue, but when eveything else fails…

Ok, so first yum update on that machine didn’t work. Lot’s of issues with that. Most of the messages you find on the net recommend to install another server in parallel. Fine, but this is not a VM, but a real machine (HPE ProLiant DL 180 Gen9) and I don’t have another one ! So I tried to update some packages manually. To make a long story short, glibc updated, but after that nothing worked as you enter in a nightmare with incorrect paths (they put everything under /usr in CentOS 7, so all /bin or /sbin binaries were not working anymore). Ok, so I had to reinstall the machine as no other method could rescue the situation, hopefully keeping my /prj FS safe.

So you use the marvelous Virtual Media feature of your server in order to mount a local ISO image on your system as a local CD of your remotely managed machine. So you download your CentOS 7 DVD latest version and try that. But it doesn’t work. Once again systemd fails to do something (logind launch in that case), and after that nothing works 😦 Did I say already I hate systemd ? And even more the people behind it who think they are always right because it just works for them 😦

After trying multiple things, I found out that CentOS 7.3 was going further on that system, so worked with that. Further meaning I was able to get a shell, but the graphical interface never wanted to launch. And using inst.vnc is not an option due to firewalling restrictions I can’t change on my end. Using inst.sshd was one way to have a working remote access. So I used that and tried to launch anaconda manually.

I used the text mode version, but it wasn’t able to reuse my existing partioning schema, as I found out. Yes, because I’m picky (I know !) on partitioning schema, and that machine had to use md RAID devices in parallel with normal partitions, and LVM on top + ext4 FS as that’s what I want (why do you want to use Linux, if the system dictates to you what to use !! then use Windows instead :-). And I wanted to keep some existing partitions safe. But launching anaconda manually didn’t take in account my existing partitioning schema (or I didn’t find how, in text mode you don’t get much help) so I lost everything on the server, without any warning concerning partitions 😦 So back to backups then.

Ok so now I really have a new install to make, but still with the same partitioning schema. So I decided to create a kickstart for the machine, which would contain that partitioning schema so anaconda could use it (and get the rest of the conf at the same time).

The partitioning shema is as follow (nothing fancy, but nos completely standard either):

part /boot/efi --fstype=efi --ondisk=sda --size=200
part /boot --fstype=ext4 --ondisk=sda --size=500
part /tmp --fstype=ext4 --ondisk=sdb --size=700
part raid.01 --ondisk=sda --grow --size=200
part raid.02 --ondisk=sdb --grow --size=200

raid pv.01 --fstype ext4 --device pv.01 --level=RAID1 raid.01 raid.02
volgroup vg_dl180 --pesize=4096 pv.01
logvol / --fstype=ext4 --name=lv_root --vgname=vg_dl180 --size=40000
logvol /var --fstype=ext4 --name=lv_var --vgname=vg_dl180 --size=10000
logvol swap --name=lv_swap --vgname=vg_dl180 --size=4000
logvol /prj --fstype=ext4 --name=lv_prj --vgname=vg_dl180 --size=520 --grow

Now I don’t want to burn a new DVD to put the ks file on it, so I thought, let’s use the network.

But the instructions which tell you that you can use an instruction to set up the network statically (I have no DHCP server as this server will become the DHCP server of this LAN !) on your system forget one point. If you use ip=IPaddr::GW:NM:… and also inst.ks=http://somewhere/x.ks then the IP is put in DHCP mode automagically :-((

Ok, so now looking at the boot logs, I see that it tries to download the ks file, but can’t because it didn’t get the IP address through DHCP which is why I wanted to pass a static IP conf to it !!!

So you can’t use the inst.ks option, if you need static IP. In fact this is written but in the ip documentation. So let’s do that. You boot again (on my ADSL connection, it’s 30′ each time you try something so we’re 2 days after the start of course) and get to a shell with the IP setup correctly, but no ks file.

And I don’t have anything on that LAN of course, to share with http or NFS. So let’s find a way. Use ! You can upload there a text file like the ks file, and get a URL so you can download it with wget in your shell ! (you need to setup the nameserver with the nameserver= option at boot time, or adapt your /etc/resolv.conf locally).

So now I have an IP conf, a local repo (seen as a CD) and the ks file !! I just now need to find a way to say to anaconda to use it. The useful doc can be found on the Fedora Wiki. Ok, not very detailed, but enough for me to try !

I needed to launch it with:
anaconda --text --kickstartfile=file.ks

I had to interactively change the source repo, as I had given a URL in the ks file, but for a reason it didn’t seem to work, so I pointed to the local CD instead (slower as the Virtual media was getting the content of CentOS through my ADSL link, and in that sense, it’s slow ! Luckily I only had 300 packages to install). I also had to setup a simple account (just in case)

And then it worked ! it took time, but worked ! It built my partition schema the way I wanted, and installed everything, including the boot loader correctly (was a UEFI conf).

So next time I’ll be stuck by anaconda not starting graphically, I know what to do, and hopefully you too 🙂

Next step is to automate its configuration, and capture that so I can present it during the upcoming HPE TSS event in Den Haag !

Jour additionnel pour FLOSSCon v0 !!


J’avais prévenu que ce serait juste côté planning, mais là ça l’est vraiment !! FLOSSITA a eu confirmation ce matin que le LOGre pouvait nous prêter une salle samedi 20 janvier pour la matinée, pour que nous puissions parler là aussi FLOSS (un grand remerciement à eux et Aimé Vareille qui a fait les démarches).

Sur cette session, nous souhaiterions couvrir les autres sujets liés au libre, que les utilisations professionnelles, donc l’éthique et la philosophie du libre, le matériel libre, l’art libre, les utilisations du libre pour le loisir…

Nous avons rouvert le CfP pour permettre à ceux qui en ont le courage de nous faire des propositions pour samedi 🙂

Il faut juste se dépécher 😁

Table Ronde sur le logiciel libre à Hewlett Packard Enterprise pour le Festival transfo


J’ai déjà mentionné le Festival Transfo sur Grenoble en janvier 2018 et le fait que notre toute nouvelle association FLOSSITA souhaitait y organiser la v0 de son événement FLOSSCon.

Indépendamment, Hewlett Packard Enterprise organise de son côté une journée complète autour de la transformation numérique. Dans ce cadre, Vincent Misson animera une table ronde sur « Les logiciels libres: qu’est-ce, pour qui, comment, avec qui ? » dans laquelle j’interviendrai comme conférencier, en compagnie d’Erwan Taloc, CEO de Combodo et de Manuel Vacelet, CTO de Enalean, deux sociétés actrices du logiciel libre sur Grenoble. Venez nous écouter le 22 janvier à 17h30 !

D’ici là, bonnes fêtes de fin d’année à tous.

AG Association FLOSSITA et FLOSSCon v0




Réunion le 19 décembre 2017 de à

Hewlett Packard Enterprise 5 Avenue Raymond Chanas, Salle Vercors, Proche Accueil B3, Eybens

Ordre du jour:

  • AG de création de l’association FLOSSITA (FLOSS in the Alps) avec la proposition de statuts et de règlement intérieur (pour les aspects variables du fonctionnement, laissant les statuts stables) qui seront soumis au vote des membres de l’association à jour de cotisation rêglée le jour même.
  • Election d’un Conseil d’Administration qui à son tour élira un bureau et un comité éditorial de l’événement FLOSSCon.
    Un PAD est disponible pour que vous indiquiez votre envie de vous investir dans l’association (au niveau du conseil d’administration, du bureau, ou pour simplement une mission genre comm, logistique, comité éditorial, …). Nous souhaiterions avoir des binômes pour chaque poste de façon à répartir la charge et faire de la HA 😉
  • Statut sur l’outillage informatique de l’Association (DNS, Mail, Mailing Lists, OSEM, …)
  • Statut sur l’avancement de l’événement FLOSSCon v0 (18-20 janvier 2018): Charte, Lieu, Logistique, Programme.

Merci de venir nombreux si vous voulez que nous fassions ensemble rayonner le Logiciel Free/Libre/Open Source dans notre région.


Compte rendu du premier Meetup FLOSS Grenoble


Merci à tous ceux qui sont venus pour le premier meetup ce soir.

Nous avons commencé ce meetup par un tour de table pour que chacun partage son expérience dans le libre et indique sa/ses distribution/s de choix. Puis Vincent, Bruno et René ont présenté rapidement les raisons ayant conduit au choix de la distributions qu’ils utilisent. Il y a eu quelques échanges ensuite sur les expériences des présents et autour d’outils.

Puis l’essentiel de la discussion a porté sur l’événement FLOSSCon que nous souhaitons organiser à Grenoble. Nous ciblons une version 0 de cet événement dans le cadre du festival transfo en Janvier prochain pour bénéficier de l’engouement qui se dégage (72 propositions reçues pour la semaine de festival, dont la nôtre). Les dates cibles pour la FLOSSCon seraient le jeudi 18 et vendredi 19 janvier 2018 pour les activités technologiques à destination d’un public professionnel/amateur averti et une demi-journée le samedi 20 janvier à destination d’un plus large public autour de l’écosystème du libre en général.

Une première liste de sessions et activités potentielles a été construite pendant le Meetup. N’hésitez pas à le compléter avec d’avantage de détails et des propositions complémentaires pour nous permettre d’établir le programme définitif ultérieurement. Nous avons aussi émis l’idée de regrouper les participants pour une soirée décontractée le jeudi soir (“genre bowling 🙂 et pour une soirée “cuisine” le vendredi soir (hack entre les participants qui le souhaitent en vue de faire une contribution dans un projet upstream).

Une charte de la FLOSSCon est également proposée à vos avis pour que nous soyons d’accord sur les grandes lignes de fonctionnement de l’événement. Nous avons aussi parlé des synergies possibles avec les autres grands événements sur l’agglo ayant des liens avec le libre (GreHack, Eclipse IoT, SnowCamp) et d’avoir à l’avenir des collaborations, sans phagocyter les audiences ou les sponsors de ces événements existants.

Thomas Grenet et Stéphane Ribas ont proposé de servir d’intermédiaire pour faciliter l’organisation de la FLOSSCon en aidant à trouver un lieu d’accueil (l’ENSIMAG ou l’INRIA). Des solutions de repli ont également été évoquées (Polytech, Orange Lab si ces pistes privilégiées n’aboutissaient pas.

Pour organiser l’événement, nous avons besoin d’une structure logistique et juridique. Une association loi de 1901 s’y prêtant bien, nous vous proposons de créer l’association FLOSSITA (FLOSS in the Alps) dont une première version de statuts et d’un règlement intérieur (pour les aspects variables du fonctionnement, laissant les statuts stables) sont soumis à votre examen (base AFUL). Plus nous serons nombreux autour, moins la charge de chacun sera importante, et pour ce faire, un dernier PAD est disponible pour que vous indiquiez votre envie de vous investir dans l’association (au niveau du conseil d’administration, du bureau, ou pour simplement une mission genre comm, logistique, comité éditorial, …)

Vincent et Christophe ont proposé de regarder des logiciels de gestion d’événement comme OSEM et INDICO. Nous disposons des noms de domaine et

Nous avons convenu de nous retrouver bientôt pour le vote sur les statuts et le CA de l’association lors d’une première AG, de façon à lancer la structure au plus vite.

A bientôt donc !

Meet during the Open Source Summit in Prague


Getting approval for my participation at that conference was the toughest I ever had in the past, but I’ll be there again after having spoken in all the previous editions.

This time, this presentation will be made by a duo, as I’ve worked since the last LinuxCon EMEA with the FOSSology project to help them adopt a Continuous Packaging approach and Michael Jaeger from Siemens who leads the project will be with me to cover the topic. On my side, I’ll explain how was used, the setup done with Vagrant and containers to generate packages for 7 different Linux distributions (ongoing effort as we speak ;-), automating fully the production of packages as part of the LinuxFoundation build infrastructure for FOSSology. And of course the changes I had to make to the code to better support the project needs !

So I’ll be back in Prague (no problem as I love that city !) next week, to celebrate also the 10 years of, just after my week at DockerCon which is really starting today !

10 years of Project-Builder !


Well, I think it’s worth to celebrate that milestone ! I’m now publishing officially the version 0.14.6 of for its 10th anniversary.

Everything started to solve an issue I had when I took over the maintenance of the MondoRescue project. It was very difficult in 2005 to consume the project. People had to download a tar file, follow a very succint recipe to build and install it and then being finally able to use it. The tool was supporting a lot of Linux distributions, but was difficult to use by these same distributions. So I started to build some shell scripts to help me deliver Linux distributions packages to solve that. I realized that I was duplicating stuff to address Fedora and RHEL, SuSE and SLES, Mandrake and Mandriva, … Even when building for other types such as Debian and Ubuntu or Gentoo. Typically all these distributions want a summary, a description, dependencies, changelog, … And I hate duplicating stuff. Also I realized I wasn’t the only one in need of this type of support. LinuxCOE, a peer project at HP was also in need of this, as well as many others.

So in 2007, I decided to rewrite my scripts in a more powerful language, perl (thanks Larry Wall ! and BTW I continue to find it way superior to a lot of younger ones, calling themselves more modern :-)). And version 0.5 was soon published as I used my vacation that year to code a lot for it.

It was way before I started to blog, and blog about it was among the first articles I decided to write. Of course, along the years, features have been developed, capabilities extended. I’m now able to generate it self and MondoRescue for 130 tuples of distributions. THat’s a proof this is possible, and that a tool like that can help achieving it.

10 years ago, I had to invent a configuration file format to support my needs. I wanted to have the least possible number of hard coded elements in I created my own format, pretty simple mimicing the perl hash being: keyword param = value[,value]. At that time, YAML and JSON weren’t that popular, and I wasn’t aware of perl modules to support these, despite the fact they were existing, and my knowledge of CPAN wasn’t that accurate.
But at least I had inheritance mechanisms, and fucntions to deal with it, whch proved to be extremely useful to migrate.

So It’s now time, for the next 10 years to adopt a format, nearly as simple as mine, as easy to map to perl hashes as mine, and I chose YAML, benig lazy and finding it easier to manage manually (like mine was). Of course, this will have some consequences, as some old build environment don’t provide it so I may drop support for some very old distributions. If needed BTW something can be done as we have the source !! Version 0.15.1 is already in progress, and is now able to build itself, including in VMs or Docker containers for other distributions using that new format. And due to the mechanisms in place, I’ve kept easily all the features, just moving to a new format. I’ll start to work soon on migrating the conf files of MondoRescue to have another project working with that version. I’m also working in HPE with another team that is starting to use it as well, and I chose to adopt for them the new version to benefit from the way forward.

Finally, as I mentioned previously, the tool is now in use by the FOSSology project as well in the Linux Foundation build infrastructure. With the latest version 0.14.6, now FOSSology builds at least native packages for CentOS 7 on a CentOS 7 platform. Now we’ll work on the generation of packages for the other distributions the project want to support (which will be pretty easy now the infra is in place), in order to cover the topic during the Open Source Summit in Prague in October, providing I get approval to travel there (as I’m traveling quite a lot these days).

So happy birthday to and let’s start working on the next YAML based version, and help more projects adopt it !

Meet at SUSECon 2017, Prague


As the sessions I proposed for the event weren’t accepted, I considered I had no chance to attend this year SUSECon. But it turned out that there was a need for HPE to have someone able to talk about Helion OpenStack on the booth, and I have been chosen to do it, so I’ll be around this year, for the first time, from the 25th to the 29th of September, in the beautiful city of Prague (will be my 4th time there !).

I’ll look forward meeting with some of my SUSE friends over there, and discover a new event.

Of course, as usual feel free to come and talk to me (I should be on the HPE booth when it’s open) of OpenStack, SUSE CaaS (as we’re working on a Reference Architecture on Synergy) and of course Open Source in general, and early music in particular 😉

Meet at the Open Source Summit NA 2017


Despite difficult times for HPE, I’m still supported by my management to continue to represent HPE during tier 1 Open Source events such as the Open Source Summit North America, held in Los Angeles from the 11th to the 14th of September. Well, of course, because I was accepted as a speaker again !

I’ll lead a round table to cover with panelists whether “Containers are the future of IaaS ?

So as usual, if you are around, I’ll happy to discuss with you around Open Source in general, and the projects I’m involved with in particular such as MondoRescue (yes, there will be a new version soon, now remains to see the definition of soon), (same thing), Redfish, containers, early music or more.