From 8601590ac09ed797345cf148b6790014f109b213 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 30 Jul 2008 07:21:20 +0200 Subject: [PATCH] add scripts to mount / umlstart and umount losetup files Signed-off-by: Nico Schottelius --- lo-jfs-mount.sh | 8 ++++++++ lo-uml-start.sh | 9 +++++++++ lo-umount.sh | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100755 lo-jfs-mount.sh create mode 100755 lo-uml-start.sh create mode 100755 lo-umount.sh diff --git a/lo-jfs-mount.sh b/lo-jfs-mount.sh new file mode 100755 index 0000000..4c336bf --- /dev/null +++ b/lo-jfs-mount.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +hier=$(dirname $0) +hierabs=$(cd "$hier" && pwd -P) + +sudo losetup -o 32256 /dev/loop0 "$hierabs/debian-hd.img" +sudo fsck.jfs /dev/loop0 +sudo mount /dev/loop0 $(dirname $0)/dst diff --git a/lo-uml-start.sh b/lo-uml-start.sh new file mode 100755 index 0000000..7703812 --- /dev/null +++ b/lo-uml-start.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +hier=$(dirname $0) +hierabs=$(cd "$hier" && pwd -P) + +sudo losetup -o 32256 /dev/loop0 "$hierabs/debian-hd.img" +linux ubd0=/dev/loop0 init=/sbin/cinit "$@" +sudo losetup -d /dev/loop0 + diff --git a/lo-umount.sh b/lo-umount.sh new file mode 100755 index 0000000..35cfb44 --- /dev/null +++ b/lo-umount.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +hier=$(dirname $0) +hierabs=$(cd "$hier" && pwd -P) + +sudo umount $(dirname $0)/dst +sudo losetup -d /dev/loop0