#234 Issue closed
: running mkrescue after initrd changes¶
Labels: enhancement
goldzahn opened issue at 2013-06-07 09:18:¶
Hi,
at the moment rear only runs "rear mkrescue" if the disklayout has
changed. This could lead
to problems after some kernel updates, so that the recreated initrd
would no longer fit to
a recoverd kernel. Please implement a mechanism that takes changes in
initrd configs into account.
Thanks
Best regards
Tim
dagwieers commented at 2013-06-07 16:44:¶
Rear itself does not run rear mkrescue
upon changes, however there is
a cron-job you can schedule for doing exactly this. Depending on the
return code of the rear checklayout
command you can learn of something
is different (and possibly requires a new initrd). But this check does
more than just check the layout.
If you look at usr/share/rear/layout/compare/default/51_compare_files.sh you can see that it checks all files/paths in CHECK_CONFIG_FILES for changes, and by default (according to usr/share/rear/conf/default.conf) this happens for:
CHECK_CONFIG_FILES=( '/etc/drbd/' '/etc/drbd.conf' '/etc/lvm/lvm.conf' '/etc/multipath.conf' '/etc/rear/' '/etc/udev/udev.conf' )
You can customize this environment variable, or contribute improvements that are more widely useful. We are happy to learn what can be improved in this regard.
goldzahn commented at 2013-06-10 11:05:¶
Hi,
good hint! I have now CHECK_CONFIG_FILES=(
${CHECK_CONFIG_FILES[@]} '/etc/grub.conf' ) and it works.
I am not sure if /etc/grub.conf or better /boot/grub/grub.conf exist in
every distro out there. If so, it might be a good idea to add it to the
CHECK_CONFIG_FILES= in default.conf
best regards
Tim
dagwieers commented at 2013-06-10 16:14:¶
@goldzahn: You are right, however I wonder if the bootloader configuration should be made conditional to the bootloader used on the system. So maybe we should put some logic into layout/compare/default/, e.g. 20_include_bootloader_config.sh.
gdha commented at 2013-10-02 11:51:¶
@dagwieers Think it would be better to have the script under
./layout/save/default/
directory so we cover both savelayout
and
compare
work-flows.
alxgu commented at 2014-01-22 11:57:¶
Hi, another case are changes in network configuration. If the backup IP or routing has changed and you don't create manually a new rear iso you got a problem to interact with your TSM server and suchlike.
So what would you suggest:
- extend CHECK_CONFIG_FILES for /etc/network/interfaces respectively /etc/sysconfig/network/ifcfg-*
or
- extend some logic in ./layout/save/default/
so that rear checklayout returns != 0.
gdha commented at 2014-04-11 14:28:¶
@alxgu could you check if latest changes are working for you?
alxgu commented at 2014-04-14 07:43:¶
Hi gdha,
it works fine. Thank you for your work.
[Export of Github issue for rear/rear.]