From: "Liam McLoughlin" <hexxeh@hexxeh.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoaster:master commit in: /
Date: Sun, 5 Jun 2011 23:32:11 +0000 (UTC) [thread overview]
Message-ID: <c9ff63e4a36d2eb2e2ed783787d2e572cfcdaa68.hexxeh@gentoo> (raw)
commit: c9ff63e4a36d2eb2e2ed783787d2e572cfcdaa68
Author: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sat Jun 4 17:43:54 2011 +0000
Commit: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sat Jun 4 17:43:54 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=c9ff63e4
Fixed mounting! We're now booting to a login prompt
---
create_image.sh | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/create_image.sh b/create_image.sh
index 61ab9e7..69cc84e 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -3,9 +3,10 @@
IMAGE_BASENAME="${1}"
IMAGE_NAME="${IMAGE_BASENAME}.image"
IMAGE_OUT="${IMAGE_BASENAME}.vdi"
+IMAGE_MEGABYTES="${2}"
BOOT_MEGABYTES=64
SWAP_MEGABYTES=128
-IMAGE_MEGABYTES="${2}"
+ROOT_MEGABYTES=$(( ${IMAGE_MEGABYTES} - ( ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} + 1 ) ))
IMAGE_BYTES=$(( ${IMAGE_MEGABYTES} * 1024 * 1024 ))
TIMEZONE="Europe/London"
HOSTNAME="gentoo"
@@ -46,7 +47,7 @@ losetup ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE}
sfdisk ${LOOP_DEV_IMAGE} -H64 -S32 &>> ${LOG_FILE} << EOF
1,${BOOT_MEGABYTES},83,*
$(( 1+ ${BOOT_MEGABYTES} )),${SWAP_MEGABYTES},82,-
-$(( 1+ ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} )),,83,-
+$(( 1+ ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} )),${ROOT_MEGABYTES},83,-
EOF
sleep 2
losetup -d ${LOOP_DEV_IMAGE}
@@ -55,19 +56,19 @@ losetup -d ${LOOP_DEV_IMAGE}
echo "Creating filesystems"
LOOP_DEV_BOOT=`losetup -f`
-losetup -o $(( 512 * 2048 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME}
+losetup -o $(( 512 * 2048 )) --sizelimit $(( ${BOOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME}
mkfs -t ext2 ${LOOP_DEV_BOOT} &>> ${LOG_FILE}
sleep 2
losetup -d ${LOOP_DEV_BOOT}
LOOP_DEV_ROOT=`losetup -f`
-losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
+losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${ROOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
mkfs -t ext3 ${LOOP_DEV_ROOT} &>> ${LOG_FILE}
-#sleep 2
-#losetup -d ${LOOP_DEV_ROOT}
+sleep 2
+losetup -d ${LOOP_DEV_ROOT}
LOOP_DEV_SWAP=`losetup -f`
-losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_SWAP} ${IMAGE_NAME}
+losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${SWAP_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_SWAP} ${IMAGE_NAME}
mkswap ${LOOP_DEV_SWAP} &>> ${LOG_FILE}
sleep 2
losetup -d ${LOOP_DEV_SWAP}
next reply other threads:[~2011-06-05 23:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-05 23:32 Liam McLoughlin [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-23 21:29 [gentoo-commits] proj/gentoaster:master commit in: / Liam McLoughlin
2011-08-19 13:09 Liam McLoughlin
2011-08-15 2:24 Liam McLoughlin
2011-08-15 2:00 Liam McLoughlin
2011-08-15 1:54 Liam McLoughlin
2011-08-14 15:46 Liam McLoughlin
2011-08-12 23:18 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-11 20:31 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:18 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-15 20:41 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-11 14:00 Liam McLoughlin
2011-07-10 23:53 Liam McLoughlin
2011-07-08 22:41 Liam McLoughlin
2011-07-08 18:47 Liam McLoughlin
2011-07-08 18:35 Liam McLoughlin
2011-07-08 18:27 Liam McLoughlin
2011-07-08 17:27 Liam McLoughlin
2011-07-08 2:45 Liam McLoughlin
2011-06-16 1:01 Liam McLoughlin
2011-06-16 1:01 Liam McLoughlin
2011-06-14 21:28 Liam McLoughlin
2011-06-14 21:03 Liam McLoughlin
2011-06-14 20:44 Liam McLoughlin
2011-06-08 0:06 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-04 3:47 Liam McLoughlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9ff63e4a36d2eb2e2ed783787d2e572cfcdaa68.hexxeh@gentoo \
--to=hexxeh@hexxeh.net \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox