From: Sascha Wildner Date: Tue, 3 Mar 2015 20:19:09 +0000 (+0100) Subject: nrelease: Solve the initial initrd creation better. X-Git-Tag: v4.2.0rc~670 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/80357c7e4165aabb38f6f59acda9adc94b47554a nrelease: Solve the initial initrd creation better. Hard links in cd9660, while not taking up more space in the ISO or on the CD, all have distinct inode numbers, which causes them to be treated like individual files when copying them somewhere. This caused the initrd to overflow when we built it from the installer after booting from the ISO. This commit puts initrd creation into the nrelease process instead, making use of mkinitrd(8)'s -c option which allows us to override the contents directory to the ${ISOROOT}'s /usr/share/initrd. Reported-by: opvalues Dragonfly-bug: --- diff --git a/nrelease/Makefile b/nrelease/Makefile index 7374f67b18..551f02c8c7 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -205,6 +205,12 @@ buildiso: done rm -rf ${ISOROOT}/boot/kernel.old ln -sf kernel ${ISOROOT}/boot/kernel/kernel.BOOTP + # This next mkinitrd has to be the INSTALLED version because else we + # can't rely on the -c option being present, but it needs to be run + # OUTSIDE of the chroot because it might want to load vn(4) and can't + # do so from inside of it. + # + ${ISOROOT}/sbin/mkinitrd -c ${ISOROOT}/usr/share/initrd -b ${ISOROOT}/boot mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.local.dist -p ${ISOROOT}/usr/local/ mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist -p ${ISOROOT}/var dev_mkdb -f ${ISOROOT}/var/run/dev.db ${ISOROOT}/dev