Date: Mon, 27 Feb 2012 11:22:25 +0100 From: egoitz@ramattack.net To: <freebsd-hackers@freebsd.org> Subject: About building release for using sysinstall Message-ID: <c88b6cb1117daf221f09558e9621ccde@ramattack.net>
next in thread | raw e-mail | index | archive | help
Good morning, I have launched : cd /usr/src make -j3 buildworld (I'm in testing env, I say because -j3) cd /usr/src/release make -f Makefile.sysinstall release CHROOTDIR=/expert/RELENG90RELEASE CVSROOT=/expert/ncvs RELEASETAG=RELENG_9_0 MAKE_ISOS=1 does not work out of the box directly. It gives some errors in the iso generation part, and some warning because the own Makefile.sysinstall does not find install.cfg. Using the mkisoimages.sh file from RELENG_9_0 have seen that (unless using Makefile.sysinstall with make) make release crashes because mkisoimages.sh script tries to create an fstab file inside an /etc dir which should be inside {$CHROOTDIR}/R/cdrom/discX/ but which is not out of the box (as a consequence of the make release I mean unless with as I said Makefile.sysinstall)... so in a previous instance... I modified this script (mkisoimages.sh) for generating this etc dir in required location and before generating fstab by this script. Release finished this way building but CD Disc1 was not able to boot because crashed (can't see exactly the error, it's pretty fast when appears although I know it's in mounting root phase, and I'm not using kernel debugging config, and the machine reboots instantly) but was solved removing this /etc dir from {$CHROOTDIR}/R/cdrom/discX/ and regenerating the iso file again... and makes lots of sense... because in loader.conf you are telling to boot and use as root an mfsroot not the own cd9660 image which is what you're specifying in /etc/fstab in the iso image. So finally this is what has worked to me for generating the iso images of the new release : I have no need of packages cd... so I removed it... and same for DVD 1... because I just need Disc1 and livefs (althought I have created too the bootonly image...)... have seen too that doc distribution is copied now to cd1 and dvd1... Like have a local copy of FreeBSD cvs have made a couple of commits which have allowed me building the release and ISOS to work properly for later being able to use for our unattended installation system. I paste out here the cvs diffs : generarelease90# cvs diff -r 1.5.2.1.2.2 -r 1.5.2.1.2.5 Makefile.sysinstall Index: Makefile.sysinstall =================================================================== RCS file: /expert/ncvs/src/release/Attic/Makefile.sysinstall,v retrieving revision 1.5.2.1.2.2 retrieving revision 1.5.2.1.2.5 diff -r1.5.2.1.2.2 -r1.5.2.1.2.5 1c1 < # $FreeBSD: src/release/Makefile.sysinstall,v 1.5.2.1.2.2 2012/01/02 04:11:22 kensmith Exp $ --- > # $FreeBSD: src/release/Makefile.sysinstall,v 1.5.2.1.2.5 2012/02/26 > 11:51:25 portero Exp $ 525c525 < -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release --- > -test -f /usr/src/usr.sbin/sysinstall/install.cfg && cp > /usr/src/usr.sbin/sysinstall/install.cfg ${CHROOTDIR}/usr/src/release 838,839c838,839 < -test -f ${.CURDIR}/install.cfg \ < && cp ${.CURDIR}/install.cfg ${RD}/mfsfd --- > -test -f /usr/src/usr.sbin/sysinstall/install.cfg \ > && /usr/src/usr.sbin/sysinstall/install.cfg ${RD}/mfsfd 1152,1155d1151 < @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \ < FreeBSD_Packages \ < ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} \ < ${CD_DISC2_PKGS} 1157,1160c1153 < @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ < FreeBSD_Install \ < ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \ < ${CD_DVD1_PKGS} --- > @echo "Do not need DVD fine with cd1 and livefs..." 1163,1166c1156 < @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \ < FreeBSD_Documentation \ < ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc3.iso ${CD_DOCS} \ < ${CD_DOCS_PKGS} --- > @echo "Docs are now copied to cd1 and DVD" generarelease90# generarelease90# cvs diff -r 1.14.2.1.2.1 -r 1.14.2.1.2.3 mkisoimages.sh Index: mkisoimages.sh =================================================================== RCS file: /expert/ncvs/src/release/amd64/mkisoimages.sh,v retrieving revision 1.14.2.1.2.1 retrieving revision 1.14.2.1.2.3 diff -r1.14.2.1.2.1 -r1.14.2.1.2.3 7c7 < # $FreeBSD: src/release/amd64/mkisoimages.sh,v 1.14.2.1.2.1 2011/11/11 04:20:22 kensmith Exp $ --- > # $FreeBSD: src/release/amd64/mkisoimages.sh,v 1.14.2.1.2.3 > 2012/02/27 07:58:26 portero Exp $ 42d41 < echo "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $1/etc/fstab 44d42 < rm $1/etc/fstab If you see no problems on this changes... perhaps would be nice to apply something like this to RELENG_9_0 in some way it does not break make release with bsdinstall (so default Makefile) but in the way it works for generating release and iso images for being able to use with sysinstall (unless for having some time to change machine provisioning systems).... What do you think about all this?. Thanks a lot for you're time, Best regards.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c88b6cb1117daf221f09558e9621ccde>