diff options
author | dancer <dancer> | 2006-09-16 08:01:38 +0000 |
---|---|---|
committer | dancer <dancer> | 2006-09-16 08:01:38 +0000 |
commit | 9e7c2b816ae4fc622cd34c1632727dd8a5780046 (patch) | |
tree | 3e3a72eece84bf42d9a4e915b8962525ae4079bf /pbuilder-user-mode-linux | |
parent | 73f1054d01da1074fcd7580c4fe7568bf59d69c6 (diff) | |
download | pbuilder-9e7c2b816ae4fc622cd34c1632727dd8a5780046.tar pbuilder-9e7c2b816ae4fc622cd34c1632727dd8a5780046.tar.gz |
user-mode-linux support
Diffstat (limited to 'pbuilder-user-mode-linux')
-rwxr-xr-x | pbuilder-user-mode-linux | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index caa74be..1085b02 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -62,13 +62,20 @@ ${UML_DEBUGMODE} mount -t proc /proc /proc mount -t tmpfs /tmp /tmp -#if ! fsck -p /dev/ubd/1; then -# echo "W: Failed to fsck /dev/ubd/1" + +# create devices +mount -t tmpfs tmpfs /dev +mknod /dev/ubdb b 98 16 +#if ! fsck -p /dev/ubdb; then +# echo "W: Failed to fsck /dev/ubdb" #fi -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?" +if ! mount -t ext2 /dev/ubdb ${UML_CHROOT_MOUNTPOINT}; then + echo "E: Cannot mount /dev/ubdb, is UML root image accessible as current user?" exit 1 fi +mount --bind ${UML_CHROOT_MOUNTPOINT}/dev /dev + + export LOGNAME="${LOGNAME}" export HOME="${HOME}" hostname "${UML_HOSTNAME}" @@ -125,6 +132,9 @@ else fi pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT[@]} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${UML_DEBUGMODE:+--debug} ${BUILDING_DSC_FILE} ${UML_EXECUTE_EXTRAOPT} echo \$? > /proc/exitcode + +umount /dev +umount ${UML_CHROOT_MOUNTPOINT} /sbin/halt -d -f EOF @@ -134,7 +144,7 @@ EOF 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" + 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} 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=$? echo " -> Successful exit from user-mode linux" |