Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Apr 20, 2017

Conversation

schabrolles
Copy link
Member

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 gdha self-assigned this Apr 19, 2017
@gdha gdha added the enhancement Adaptions and new features label Apr 19, 2017
@gdha gdha requested review from jsmeix and gdha April 19, 2017 11:40
@gdha
Copy link
Member

gdha commented Apr 19, 2017

@schabrolles what was the problem with the original one?

@schabrolles
Copy link
Member Author

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

@jsmeix
Copy link
Member

jsmeix commented Apr 20, 2017

@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
Copy link
Member

schlomo commented Apr 20, 2017

@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
Copy link
Member

jsmeix commented Apr 20, 2017

I think the example in
#1320 (comment)
explains why for special cases the script number
may have to be different.

@schabrolles
Copy link
Member Author

@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
Copy link
Member

schlomo commented Apr 20, 2017

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

@schabrolles
Copy link
Member Author

@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 ?

 - move to 500 to rebuild initramfs after all migration provess
 - make other arch like ppc64 and ppc64le point to i386/500_rebuild_initramfs
Copy link
Member

@jsmeix jsmeix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now things look good but I did not test
if it still works with the new number
for SUSE_LINUX/i386
@schabrolles
did you test that?

@schabrolles
Copy link
Member Author

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

@jsmeix
Copy link
Member

jsmeix commented Apr 20, 2017

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

Copy link
Member

@jsmeix jsmeix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works for me
on SLES12 on x86_64.

@jsmeix jsmeix merged commit 023ee87 into rear:master Apr 20, 2017
@jsmeix jsmeix added this to the ReaR v2.1 milestone Apr 20, 2017
@jsmeix
Copy link
Member

jsmeix commented Apr 20, 2017

@schabrolles
many thanks for your valuable contributions to ReaR!

@schabrolles schabrolles deleted the initramfs_sles_ppc64le branch April 24, 2017 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants