| 1 | = Boot parameters = |
| 2 | |
| 3 | The file README.bootparam of the mindi package provides all the parameters one can use at boot time during a MondoRescue restoration. |
| 4 | |
| 5 | == pre and post parameters == |
| 6 | |
| 7 | In 2.2.9, mindi introduced 2 new parameters at boot prompt, pre and post. |
| 8 | They are used to respectively launch a script just before launching mondorestore, and after its execution. |
| 9 | |
| 10 | The main goal is to allow for the pre option to configure for example the HDD layout differently, and to re-configure the systems (static IP address e.g.) for the post option. |
| 11 | |
| 12 | If the mastering of the target systems is regular, you can even create a /etc/mindi/mindi.conf configuration file on the master, which could redefine the MINDI_ADDITIONAL_BOOT_PARAMS variable of mindi like this: |
| 13 | {{{ |
| 14 | cat >> /etc/mindi/mindi.conf << EOF |
| 15 | MINDI_ADDITIONAL_BOOT_PARAMS="devfs=nomount noresume selinux=0 barrier=off udevtimeout=10 pre=/tmp/isodir/pre.sh post=/mnt/RESTORING/tmp/post.sh" |
| 16 | EOF |
| 17 | }}} |
| 18 | Of course, these params can be passed at the boot prompt. |
| 19 | |
| 20 | And the scripts could contain as an example: |
| 21 | {{{ |
| 22 | cat > /path/to/nfs/pre.sh << EOF |
| 23 | sed -i -e "/vg02/ d" /tmp/mountlist.txt |
| 24 | sed -i -e "/vg03/ d" /tmp/mountlist.txt |
| 25 | EOF |
| 26 | cat > /tmp/post.sh << EOF |
| 27 | mount /proc |
| 28 | mount /sys |
| 29 | vgcfgrestore vg02 |
| 30 | vgcfgrestore vg03 |
| 31 | sed -i -e "s/IPADDR=.*/IPADDR=x.y.z.t/" /mnt/RESTORING/etc/sysconfig/network-scripts/ifcfg-eth0 |
| 32 | EOF |
| 33 | }}} |
| 34 | |
| 35 | Of course, those scripts couls makemore dynamic requests to improve the resulting deployment. |