From 917662e5ee4841476eec4c24d2f40710ae9903cc Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 25 Aug 2014 09:51:29 -0700 Subject: [PATCH] build - separate out the rescue initrd * Multiple issues with users crashing at the end of an installworld because initrd kldloads an out-of-date vn device. * Not a good idea to update the rescue image during an installworld anyway. * Make it a manual target called 'rescue' and remind the user at the end of the installworld that the target is available, but suggest rebooting first. --- Makefile | 3 ++- Makefile.inc1 | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 14ad9a5a61..47e311db68 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ # of the system for DragonFly. ex. two compilers # most - Build user commands, no libraries or include files. # installmost - Install user commands, no libraries or include files. +# rescue - Create rescue image in /boot # backupworld - Copies /bin /sbin /usr/bin /usr/sbin /usr/lib # /usr/libexec to manual backup dir. # restoreworld - Installs binaries from manual backup dir to world. @@ -82,7 +83,7 @@ TGTS= all all-man buildkernel quickkernel nativekernel \ hierarchy install installcheck installkernel \ reinstallkernel installmost installworld libraries lint maninstall \ manlint mk most obj objlink regress rerelease tags \ - backupworld restoreworld restoreworld-auto \ + rescue backupworld restoreworld restoreworld-auto \ backup-clean backup-auto-clean \ _obj _includes _libraries _depend _worldtmp \ _bootstrap-tools _build-tools _cross-tools diff --git a/Makefile.inc1 b/Makefile.inc1 index ffa800f2ba..25de146b5c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -12,6 +12,7 @@ # installworld- install everything built by "buildworld" # backupworld - copies /bin /sbin /usr/bin /usr/sbin /usr/lib /usr/libexec # to manual backup dir +# rescue - create rescue image # restoreworld- installs binaries from manual backup dir to world # restoreworld-auto - installs binaries from auto-backup dir to world # most - build user commands, no libraries or include files @@ -488,7 +489,18 @@ installworld: installcheck cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} ${INSTALL} -o root -g wheel -m 644 ${.CURDIR}/Makefile_upgrade.inc ${DESTDIR}/etc/upgrade/ - sync; sleep 2; sync; sleep 2 + sync + @echo "installworld is done. If things work as expected after a" + @echo "full reboot, consider updating the rescue image with" + @echo "'make rescue'. Do not do it until rebooting." + +# Create a rescue image. We no longer do this automatically for several +# reasons, primarily that users have had serious issue with mismatched 'vn' +# vs the kldload image that can crash the system. But also, the rescue image +# is intended to be a rescue image, it is a bad idea to update it at the +# same time the world is installed. +# +rescue: mkinitrd -b ${DESTDIR}/boot # -- 2.41.0