The following change can resolve the problem when upgrading the newer ubuntu-18.04:
+++ b/tools/flex-mkdistrorfs
@@ -203,11 +203,12 @@ do_distrorfs_second_stage() {
apt -y install language-pack-en-base
fi
fi
- apt -y upgrade
test -f /proc/uptime || mount -t proc proc /proc
test -f /dev/pts/ptmx || mount -t devpts devpts /dev/pts
+ apt -y upgrade
Then rebuild it as below:
$ flex-builder -i clean-rfs
$ flex-builder -i mkrfs