#1313 PR merged: Rebuild initramfs after for SLES ppc64le (Sles12) migration.

Labels: enhancement, fixed / solved / done

schabrolles opened issue at 2017-04-17 14:06:

Here is a first proposal of a 500_rebuild_initramfs.sh script for SUSE12 (based on dracut).

To avoid any side effect, I put it in finalize/SUSE_LINUX/ppc64le.

Same question as (#1311):
We will have a lot of duplicates soon as we may need the same kind of file for ppc64, x86_64 and other...
I think the way to manage the rebuilding of initramfs could be the same per distro... what do you think ?

gdha commented at 2017-04-19 11:41:

@schabrolles what was the problem with the original one?

schabrolles commented at 2017-04-19 11:56:

There is no original one for ppc64le .... just for ppc64...
SLE12 is ppc64le only

jsmeix commented at 2017-04-20 10:34:

@schabrolles
by plain looking at the code it seems your
usr/share/rear/finalize/SUSE_LINUX/ppc64le/500_rebuild_initramfs.sh
has same content as
usr/share/rear/finalize/SUSE_LINUX/ppc64/500_rebuild_initramfs.sh

Are both really same?
(I don't know how to easily diff a file in a pull request with
an existing file in the master branch).

In general for same files use symbolic links.

E.g.
usr/share/rear/finalize/SUSE_LINUX/ppc64/500_rebuild_initramfs.sh
is already a symbolic link that points to
usr/share/rear/finalize/SUSE_LINUX/i386/170_rebuild_initramfs.sh

schlomo commented at 2017-04-20 10:37:

@schabrolles if anyhow possible, could you please use the same number for the same script? E.g. let rebuild_initramfs always be number 170 (or maybe change it everywhere if you really need to).

It helps a lot to find our way in the code.

jsmeix commented at 2017-04-20 11:10:

I think the example in
https://github.com/rear/rear/issues/1320#issue-223010442
explains why for special cases the script number
may have to be different.

schabrolles commented at 2017-04-20 11:15:

@jsmeix You are right, they are the same, so we can link them...

@schlomo, I would prefer to generate initrd close to the end of the recovery process... when we are sure
that most of the migration oriented process have finished their job.

Correct me if I'm wrong, 170_rebuild_initramfs will run before network MAC address migration (udev rules) and udev rules are part of the ramdisk.

Source finalize/GNU/Linux/300_create_mac_mapping.sh
Source finalize/GNU/Linux/410_migrate_udev_rules.sh
Source finalize/GNU/Linux/420_migrate_network_configuration_files.sh

schlomo commented at 2017-04-20 11:16:

Then I would suggest to move rebuild_initramfs to a higher number for everybody.

schabrolles commented at 2017-04-20 11:23:

@schlomo OK, then I will move i386/170_rebuild_initramfs.sh to i386/500_rebuild_initramfs.sh.
Then I will create links for ppc64 and ppc64le.
Ok ?

schabrolles commented at 2017-04-20 13:03:

No, unfortunately, I have different kind of POWER machine available, but no x86 ;-p

jsmeix commented at 2017-04-20 13:25:

For me on SLES12 on x86_64 it works well with
finalize/SUSE_LINUX/i386/500_rebuild_initramfs.sh

jsmeix commented at 2017-04-20 13:33:

@schabrolles
many thanks for your valuable contributions to ReaR!


[Export of Github issue for rear/rear.]