diff options
author | 2011-06-04 04:47:29 +0100 | |
---|---|---|
committer | 2011-06-04 04:47:29 +0100 | |
commit | d46419cab28b97d2a0fcba912c25c142c9d7d923 (patch) | |
tree | a2e3953960dc065953752f510d399777b2111bd1 | |
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
-rwxr-xr-x | create_image.sh | 13 | ||||
-rw-r--r-- | extlinux.conf (renamed from syslinux.conf) | 0 | ||||
-rw-r--r-- | fstab | 27 |
3 files changed, 35 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 diff --git a/syslinux.conf b/extlinux.conf index 663af96..663af96 100644 --- a/syslinux.conf +++ b/extlinux.conf @@ -0,0 +1,27 @@ +# /etc/fstab: static file system information. +# +# noatime turns off atimes for increased performance (atimes normally aren't +# needed; notail increases performance of ReiserFS (at the expense of storage +# efficiency). It's safe to drop the noatime options if you want and to +# switch between notail / tail freely. +# +# The root filesystem should have a pass number of either 0 or 1. +# All other filesystems should have a pass number of 0 or greater than 1. +# +# See the manpage fstab(5) for more information. +# + +# <fs> <mountpoint> <type> <opts> <dump/pass> + +# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. +/dev/sda1 /boot ext2 noauto,noatime 1 2 +/dev/sda3 / ext3 noatime 0 1 +/dev/sda2 none swap sw 0 0 +/dev/cdrom /mnt/cdrom auto noauto,ro 0 0 +#/dev/fd0 /mnt/floppy auto noauto 0 0 + +# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for +# POSIX shared memory (shm_open, shm_unlink). +# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will +# use almost no memory if not populated with files) +shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 |