151 |
fi |
fi |
152 |
mksquashfs ${LIVECDROOT}/network-temp ${CDISOROOT}/netboot/squashfs.img || die |
mksquashfs ${LIVECDROOT}/network-temp ${CDISOROOT}/netboot/squashfs.img || die |
153 |
|
|
154 |
# copy kernel and create initramfs to isoroot/netboot |
# copy kernel, bootloader and create initramfs to isoroot/netboot |
155 |
install -d ${CDISOROOT}/netboot || die |
install -d ${CDISOROOT}/netboot || die |
156 |
# kernel |
# kernel |
157 |
kimg="$(find ${CDCHROOTDIR}/boot -name kernel-\* -printf '%f\n')" |
kimg="$(find ${CDCHROOTDIR}/boot -name kernel-\* -printf '%f\n')" |
161 |
echo 'add_dracutmodules+=" livenet busybox"' > ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf || die |
echo 'add_dracutmodules+=" livenet busybox"' > ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf || die |
162 |
echo 'omit_dracutmodules+=" systemd plymouth mcored"' >> ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf || die |
echo 'omit_dracutmodules+=" systemd plymouth mcored"' >> ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf || die |
163 |
# install dracut-dev package to have all modules |
# install dracut-dev package to have all modules |
164 |
custom_packages install dracut-dev curl curl-dev || die |
custom_packages install "dracut-dev curl curl-dev" || die |
165 |
## mlivecdbuild function |
## mlivecdbuild function |
166 |
generate_initrd |
generate_initrd |
167 |
mv ${CDISOROOT}/isolinux/initrd.gz ${CDISOROOT}/netboot/ || die |
mv ${CDISOROOT}/isolinux/initrd.gz ${CDISOROOT}/netboot/ || die |
168 |
custom_packages uninstall dracut-dev curl curl-dev || die |
custom_packages uninstall "dracut-dev curl curl-dev" || die |
169 |
if [ -e ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf ] |
if [ -e ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf ] |
170 |
then |
then |
171 |
rm ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf |
rm ${CDCHROOTDIR}/etc/dracut.conf.d/03-netboot.conf |
172 |
fi |
fi |
173 |
|
# bootloader |
174 |
|
install -d ${CDISOROOT}/netboot/pxelinux.cfg |
175 |
|
[ -f $(get_profile netboot/pxelinux.0) ] && install -m0644 $(get_profile netboot/pxelinux.0) ${CDISOROOT}/netboot |
176 |
|
[ -f $(get_profile netboot/pxelinux.cfg/default) ] && install -m0644 $(get_profile netboot/pxelinux.cfg/default) ${CDISOROOT}/netboot/pxelinux.cfg |
177 |
|
[ -f $(get_profile netboot/pxelinux.cfg/boot.cat) ] && install -m0644 $(get_profile netboot/pxelinux.cfg/boot.cat) ${CDISOROOT}/netboot/pxelinux.cfg |
178 |
|
[ -f $(get_profile boot.lss) ] && install -m0644 $(get_profile boot.lss) ${CDISOROOT}/netboot/pxelinux.cfg |
179 |
|
[ -f $(get_profile boot.msg) ] && install -m0644 $(get_profile boot.msg) ${CDISOROOT}/netboot/pxelinux.cfg |
180 |
|
[ -f $(get_profile debug.msg) ] && install -m0644 $(get_profile debug.msg) ${CDISOROOT}/netboot/pxelinux.cfg |
181 |
|
[ -f $(get_profile help.msg) ] && install -m0644 $(get_profile help.msg) ${CDISOROOT}/netboot/pxelinux.cfg |
182 |
|
[ -f $(get_profile index.msg) ] && install -m0644 $(get_profile index.msg) ${CDISOROOT}/netboot/pxelinux.cfg |
183 |
|
|
184 |
# final cleanup |
# final cleanup |
185 |
if [[ -d ${LIVECDROOT}/network-temp ]] |
if [[ -d ${LIVECDROOT}/network-temp ]] |