diff options
author | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-06-04 04:47:29 +0100 |
---|---|---|
committer | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-06-04 04:47:29 +0100 |
commit | d46419cab28b97d2a0fcba912c25c142c9d7d923 (patch) | |
tree | a2e3953960dc065953752f510d399777b2111bd1 /create_image.sh | |
parent | Super messy commit for pushing to Gentoo infra, will clean all this up once b... (diff) | |
download | gentoaster-d46419cab28b97d2a0fcba912c25c142c9d7d923.tar.gz gentoaster-d46419cab28b97d2a0fcba912c25c142c9d7d923.tar.bz2 gentoaster-d46419cab28b97d2a0fcba912c25c142c9d7d923.zip |
Adding fstab and renaming bootloader config
Diffstat (limited to 'create_image.sh')
-rwxr-xr-x | create_image.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/create_image.sh b/create_image.sh index 12f93ee..e403df9 100755 --- a/create_image.sh +++ b/create_image.sh @@ -43,8 +43,8 @@ echo -e "\x55\xaa" | dd bs=1 count=2 seek=510 of=${IMAGE_NAME} conv=notrunc &>> LOOP_DEV_IMAGE=`losetup -f` losetup ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE} -sfdisk ${LOOP_DEV_IMAGE} -D -uM &>> ${LOG_FILE} << EOF -,${BOOT_MEGABYTES},83,* +sfdisk ${LOOP_DEV_IMAGE} -uM &>> ${LOG_FILE} << EOF +1,${BOOT_MEGABYTES},83,* ,${SWAP_MEGABYTES},82,- ,,83,- EOF @@ -61,7 +61,7 @@ sleep 2 losetup -d ${LOOP_DEV_BOOT} LOOP_DEV_ROOT=`losetup -f` -losetup -o $(( 512 + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME} +losetup -o $(( 512 + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME} mkfs -t ext3 ${LOOP_DEV_ROOT} &>> ${LOG_FILE} #sleep 2 #losetup -d ${LOOP_DEV_ROOT} @@ -76,7 +76,7 @@ echo "Mounting fileystems" echo "Mount root" mkdir -p rootfs -mount -o loop,offset=$(( 512 + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs +mount -o loop,offset=$(( 512 + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs echo "Mount boot" mkdir -p rootfs/boot mount -o loop,offset=512 ${IMAGE_NAME} rootfs/boot @@ -128,6 +128,9 @@ echo "Setting hostname to ${HOSTNAME}" linux32 chroot . /bin/bash -c "echo 127.0.0.1 ${HOSTNAME}.local ${HOSTNAME} localhost > /etc/hosts" &>> ${LOG_FILE} #linux32 chroot . hostname ${HOSTNAME} &>> ${LOG_FILE} +echo "Copying new fstab" +cp ../fstab etc/fstab &>> ${LOG_FILE} + echo "Downloading/installing kernel sources" linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE} @@ -166,7 +169,7 @@ linux32 chroot . /bin/bash -c "echo '${DEFAULT_USERNAME}:${DEFAULT_PASSWORD}' | echo "Installing extlinux" extlinux --heads 255 --sectors 63 --install boot dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc - +cp ../extlinux.conf boot/ cd .. cleanup_mounts |