diff options
Diffstat (limited to 'pbuilder-user-mode-linux')
-rwxr-xr-x | pbuilder-user-mode-linux | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 616ab85..5e80149 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -60,7 +60,10 @@ ${UML_DEBUGMODE} mount -t proc /proc /proc mount -t tmpfs /tmp /tmp -mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT} +if ! mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT}; then + echo "E: Cannot mount /dev/ubd/1, is UML root image accessible as current user?" + exit 1 +fi export LOGNAME="${LOGNAME}" export HOME="${HOME}" hostname "${UML_HOSTNAME}" @@ -121,6 +124,10 @@ EOF chmod a+x ${INSIDE_PBUILDER} + if [ $( id -u ) = 0 ]; then + echo "W: You are uid=0. Don't run UML as uid=0, it's not supported." + fi + echo Invoking: "linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ubd1=${PBUILDER_COW}${PBUILDER_UML_IMAGE} devfs=mount init=${INSIDE_PBUILDER} rw" if linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ubd1="${PBUILDER_COW}${PBUILDER_UML_IMAGE}" devfs=mount init=${INSIDE_PBUILDER} rw ; then UML_EXITCODE=$? |