From bbe87f448f78bf47b2e07c62c05b18ac5e0aaa23 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 13 Dec 2012 15:40:31 -0600 Subject: [PATCH] TESTING: ubuntu: quantal: auto fill partitions Signed-off-by: Robert Nelson --- mk_mmc.sh | 29 ++++++++++++++++++++++++++--- scripts/quantal-preseed.cfg | 18 ++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 4d0a2cc..50ee2d0 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1021,7 +1021,11 @@ function flash_kernel_base_installer { rm -f /target/mounts || true umount /target/sys - cp /etc/hwpack/${fki_vmlinuz} /target/boot/${fki_vmlinuz} + if [ -f /target/boot/uboot/${fki_vmlinuz} ] ; then + cp /target/boot/uboot/${fki_vmlinuz} /target/boot/${fki_vmlinuz} + else + cp /etc/hwpack/${fki_vmlinuz} /target/boot/${fki_vmlinuz} + fi cp /target/boot/initrd.img-\$(uname -r) /target/boot/${fki_initrd} sync umount /target/boot/uboot @@ -1075,6 +1079,23 @@ function finish_installing_device { chmod a+x ${TEMPDIR}/initrd-tree/usr/lib/finish-install.d/08rcn-ee-finish-installing-device } +setup_parition_recipe () { + #This (so far) has been leaving the first Partition Alone... + cat > ${TEMPDIR}/initrd-tree/partition_recipe <<-__EOF__ + 500 10000 -1 ext4 + method{ format } + format{ } + use_filesystem{ } + filesystem{ ext4 } + mountpoint{ / } . + + 128 64 512 300% linux-swap + method{ swap } + format{ } . + + __EOF__ +} + function initrd_preseed_settings { echo "NetInstall: Adding Distro Tweaks and Preseed Configuration" cd ${TEMPDIR}/initrd-tree/ @@ -1090,6 +1111,7 @@ function initrd_preseed_settings { esac finish_installing_device + setup_parition_recipe cp -v "${DIR}/scripts/${DIST}-preseed.cfg" ${TEMPDIR}/initrd-tree/preseed.cfg if [ "${SERIAL_MODE}" ] ; then @@ -1225,7 +1247,7 @@ function fatfs_boot { p 1 - +64M + +${boot_partition_size}M t e p @@ -1353,6 +1375,7 @@ function populate_boot { else echo "Copying Kernel image:" cp -v ${TEMPDIR}/kernel/boot/vmlinuz-* ${TEMPDIR}/disk/zImage.net + cp -v ${TEMPDIR}/kernel/boot/vmlinuz-* ${TEMPDIR}/disk/${fki_vmlinuz} echo "-----------------------------" fi fi @@ -1584,7 +1607,7 @@ function check_uboot_type { unset boot_scr_wrapper unset usbnet_mem - boot_partition_size="50" + boot_partition_size="64" case "${UBOOT_TYPE}" in beagle_bx) diff --git a/scripts/quantal-preseed.cfg b/scripts/quantal-preseed.cfg index 14c8748..fadbaf9 100644 --- a/scripts/quantal-preseed.cfg +++ b/scripts/quantal-preseed.cfg @@ -27,6 +27,24 @@ d-i clock-setup/ntp boolean true # NTP server to use. The default is almost always fine here. d-i clock-setup/ntp-server string pool.ntp.org +### Partitioning +## Partitioning example +# If the system has free space you can choose to only partition that space. +# This is only honoured if partman-auto/method (below) is not set. +d-i partman-auto/init_automatically_partition select biggest_free + +# Alternatively, you may specify a disk to partition. If the system has only +# one disk the installer will default to using that, but otherwise the device +# name must be given in traditional, non-devfs format (so e.g. /dev/hda or +# /dev/sda, and not e.g. /dev/discs/disc0/disc). +# For example, to use the first SCSI/SATA hard disk: +d-i partman-auto/disk string /dev/mmcblk0 + +# Or provide a recipe of your own... +# If you have a way to get a recipe file into the d-i environment, you can +# just point at it. +d-i partman-auto/expert_recipe_file string /partition_recipe + # Individual additional packages to install d-i pkgsel/include string u-boot-tools pastebinit initramfs-tools wget linux-firmware linux-firmware-nonfree ntpdate bash devmem2 fbset dosfstools