From 2ef6b6dfc8a89a1a790603c088cdacb864054a4f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 12 Nov 2008 10:21:13 +0000 Subject: allow to rebuild initrd --- rescue/restore-image.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 8eb564284..bf7a04215 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -191,6 +191,13 @@ function expand_fs() if [ -d "$grub_dir" ]; then echo "(hd0) $disk" > "$grub_dir/device.map" fi + if [ -n "$MKINITRD" ]; then + mount -t sysfs none "$mnt_dir/sys" + mount -t proc none "$mnt_dir/proc" + chroot $mnt_dir bootloader-config --action rebuild-initrds + umount "$mnt_dir/sys" + umount "$mnt_dir/proc" + fi umount $mnt_dir fi } -- cgit v1.2.1