diff --git a/lib/configuration.sh b/lib/configuration.sh index e31aacca99..f8c14927d0 100644 --- a/lib/configuration.sh +++ b/lib/configuration.sh @@ -82,7 +82,7 @@ if [[ $CRYPTROOT_ENABLE == yes && -z $CRYPTROOT_PASSPHRASE ]]; then fi # small SD card with kernel, boot script and .dtb/.bin files -[[ $ROOTFS_TYPE == nfs ]] && FIXED_IMAGE_SIZE=64 +[[ $ROOTFS_TYPE == nfs ]] && FIXED_IMAGE_SIZE=256 # Since we are having too many options for mirror management, # then here is yet another mirror related option. diff --git a/lib/debootstrap.sh b/lib/debootstrap.sh index 66ea1018f5..c8cc788e3e 100644 --- a/lib/debootstrap.sh +++ b/lib/debootstrap.sh @@ -684,6 +684,10 @@ PREPARE_IMAGE_SIZE local rootfs="UUID=$(blkid -s UUID -o value $rootdevice)" fi echo "$rootfs / ${mkfs[$ROOTFS_TYPE]} defaults,noatime${mountopts[$ROOTFS_TYPE]} 0 1" >> $SDCARD/etc/fstab + else + # update_initramfs will fail if /lib/modules/ doesn't exist + mount --bind --make-private $SDCARD $MOUNT/ + echo "/dev/nfs / nfs defaults 0 0" >> $SDCARD/etc/fstab fi if [[ -n $bootpart ]]; then display_alert "Creating /boot" "$bootfs on ${LOOP}p${bootpart}" @@ -701,7 +705,6 @@ PREPARE_IMAGE_SIZE mount ${LOOP}p${uefipart} "${MOUNT}${UEFI_MOUNT_POINT}" echo "UUID=$(blkid -s UUID -o value ${LOOP}p${uefipart}) ${UEFI_MOUNT_POINT} vfat defaults 0 2" >>$SDCARD/etc/fstab fi - [[ $ROOTFS_TYPE == nfs ]] && echo "/dev/nfs / nfs defaults 0 0" >> $SDCARD/etc/fstab echo "tmpfs /tmp tmpfs defaults,nosuid 0 0" >> $SDCARD/etc/fstab call_extension_method "format_partitions" <<- 'FORMAT_PARTITIONS' @@ -889,7 +892,7 @@ PRE_UMOUNT_FINAL_IMAGE sync [[ $UEFISIZE != 0 ]] && umount -l "${MOUNT}${UEFI_MOUNT_POINT}" [[ $BOOTSIZE != 0 ]] && umount -l $MOUNT/boot - [[ $ROOTFS_TYPE != nfs ]] && umount -l $MOUNT + umount -l $MOUNT [[ $CRYPTROOT_ENABLE == yes ]] && cryptsetup luksClose $ROOT_MAPPER call_extension_method "post_umount_final_image" "config_post_umount_final_image" << 'POST_UMOUNT_FINAL_IMAGE'