Hi Alvaro, I’ll give it a try with your preseed.cfg. Something strange is happening here. I changed up the pre-seed file with this one (notice the red text):
``` # Some inspiration: # * https://github.com/chrisroberts/vagrant-boxes/blob/master/definitions/precise-64/preseed.cfg # * https://github.com/cal/vagrant-ubuntu-precise-64/blob/master/preseed.cfg # English plx d-i debian-installer/language string en d-i debian-installer/locale string en_US.UTF-8 d-i localechooser/preferred-locale string en_US.UTF-8 d-i localechooser/supported-locales en_US.UTF-8 # Including keyboards d-i console-setup/ask_detect boolean false d-i keyboard-configuration/layout select USA d-i keyboard-configuration/variant select USA d-i keyboard-configuration/modelcode string pc105 # Just roll with it d-i netcfg/get_hostname string this-host d-i netcfg/get_domain string this-host d-i time/zone string UTC d-i clock-setup/utc-auto boolean true d-i clock-setup/utc boolean true # Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive d-i debconf debconf/frontend select Noninteractive d-i pkgsel/install-language-support boolean false tasksel tasksel/first multiselect standard, openssh-server pkgsel pkgsel/include/install-recommends boolean false # Needed for VBox guest additions pkgsel pkgsel/include string make gcc #For the update d-i pkgsel/update-policy select none # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade d-i pkgsel/upgrade select safe-upgrade # Stuck between a rock and a HDD place # Use LVM for partitioning d-i partman-auto/method string lvm d-i partman-auto-lvm/guided_size string max # If one of the disks that are going to be automatically partitioned # contains an old LVM configuration, the user will normally receive a # warning. Preseed this away d-i partman-lvm/device_remove_lvm boolean true # And the same goes for the confirmation to write the lvm partitions. d-i partman-lvm/confirm boolean true # Really, please don't prompt me! d-i partman-lvm/confirm_nooverwrite boolean true # partitioning # Physical partitions: # 1. BIOS boot partition: 1 MB See https://wiki.archlinux.org/index.php/GRUB2#GUID_Partition_Table_.28GPT.29_specific_instructions # 2. Boot partition: 250 MB # 2. LVM, with the following logical volumes # - Root partition: 250 GB (256000 MB), ext4. # - Swap: 100% of RAM # - Data partition: remaining space, XFS d-i partman-auto/expert_recipe string \ boot-root :: \ 1 1 1 free method{ biosgrub } . \ 250 250 250 ext2 \ $primary{ } $bootable{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext2 } \ mountpoint{ /boot } \ . \ 100% 2048 100% linux-swap \ lv_name{ swap } \ method{ swap } format{ } \ $lvmok{ } \ . \ 20000 40000 40000 ext4 \ lv_name{ root } \ method{ lvm } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ $lvmok{ } \ . # This makes partman automatically partition without confirmation, provided # that you told it what to do using one of the methods above. d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true d-i grub-installer/only_debian boolean true d-i grub-installer/with_other_os boolean true d-i mirror/country string manual d-i mirror/http/hostname string archive.ubuntu.com d-i mirror/http/directory string /ubuntu # No proxy, plx d-i mirror/http/proxy string d-i apt-setup/services-select multiselect security d-i apt-setup/security_host string security.ubuntu.com d-i apt-setup/security_path string /ubuntu # Default user, change d-i passwd/root-login boolean false d-i passwd/user-fullname string ubuntu d-i passwd/username string ubuntu d-i passwd/user-password password meowthis!!! d-i passwd/user-password-again password meowthis!!! # sudo without password d-i passwd/user-default-groups sudo d-i user-setup/encrypt-home boolean false d-i user-setup/allow-password-weak boolean true d-i preseed/late_command string echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" >> /target/etc/sudoers;sync # Go grub, go! d-i grub-installer/only_debian boolean true d-i finish-install/reboot_in_progress note ``` Once the base ova file was built, I `packer build my-allinone.json`, which contains: ``` { "variables": { "base-image": "output-virtualbox-iso/base-ubuntu-1404.ova" }, "builders": [ { "type": "virtualbox-ovf", "source_path": "{{user `base-image`}}", "ssh_username": "ubuntu", "ssh_password": "meowthis!!!", "ssh_wait_timeout": "30s", "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "vboxmanage": [ ["modifyvm", "{{.Name}}", "--memory", "2048"], ["modifyvm", "{{.Name}}", "--cpus", "4"], ["modifyvm", "{{.Name}}", "--natdnshostresolver1", "on"], ["modifyvm", "{{.Name}}", "--natdnsproxy1", "on"] ], "headless": true, "guest_additions_mode": "disable" } ], "provisioners": [ { "type": "shell", "script": "scripts/base-packages.sh" }, { "type": "ansible-local", "inventory_file": "inventory/allinone", "command": "ansible-playbook", "playbook_file": "../playbooks/bootstrap.yml", "playbook_dir": "../playbooks", "role_paths": [ "../roles/yaegashi.blockinfile", "../roles/ANXS.nodejs", "../roles/ANXS.build-essential", "../roles/vagrant", "../roles/mysql", "../roles/Stouts.source", "../roles/zenoamaro.postgresql", "../roles/postgresql", "../roles/DavidWittman.redis", "../roles/my.application", "../roles/ruby_install", "../roles/zzet.rbenv" ] }, { "type": "shell", "scripts": [ "scripts/allinone_cleanup.sh"] } ], "post-processors": [ { "type": "vagrant", "output": “my-allinone-{{.Provider}}.box" } ] } ``` The scripts that I use in the `my-allinone.json` file do not contain anything other than some `apt-get install` and `apt-clean` commands. Once this creates the VirtualBox `.box` file I run `vagrant up` and my machine is built. Here is the output with the new pressed.cfg listed above: ``` ubuntu@vagrant:~$ df -h Filesystem Size Used Avail Use% Mounted on dev 2.0G 4.0K 2.0G 1% /dev tmpfs 396M 432K 395M 1% /run /dev/dm-0 5.6G 4.5G 822M 85% / none 4.0K 0 4.0K 0% /sys/fs/cgroup none 5.0M 0 5.0M 0% /run/lock none 2.0G 4.0K 2.0G 1% /run/shm none 100M 0 100M 0% /run/user /dev/sda1 236M 36M 188M 17% /boot 172.28.128.1:/Users/gonzofernandez/shared 233G 77G 157G 33% /opt/nfs_share vagrant 233G 77G 157G 33% /vagrant ``` As you can see, it doesn’t seem to be listening to my preseed file as it partitions whatever it likes. Alvaro, I’ll try your preseed file and see if that works. I’ll update soon. Thanks for your help! > On Oct 11, 2016, at 3:58 AM, Alvaro Miranda Aguilera <[email protected]> > wrote: > > > On Mon, Oct 10, 2016 at 7:48 PM, Gonzo Fernandez <[email protected] > <mailto:[email protected]>> wrote: > d-i partman-lvm/device_remove_lvm boolean true > d-i partman-auto/choose_recipe select atomic > > no sure whats different > > but can you try once with this preseed? > > https://github.com/cbednarski/packer-ubuntu/blob/master/http/preseed.cfg > <https://github.com/cbednarski/packer-ubuntu/blob/master/http/preseed.cfg> > > Packer just create the VM disk, but from there is the OS that is doing the > partition layout and sizes. > > > Alvaro. > > > -- > Alvaro > > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html > <https://www.hashicorp.com/community-guidelines.html>. Behavior in violation > of those guidelines may result in your removal from this mailing list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > <https://github.com/mitchellh/packer/issues> > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to a topic in the Google > Groups "Packer" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/packer-tool/eeDUhiKEDto/unsubscribe > <https://groups.google.com/d/topic/packer-tool/eeDUhiKEDto/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/CAHqq0ex1hG-bwjVDy0gEXM2x4WpBRyOGg6zHRvJofQ-0XPP_0g%40mail.gmail.com > > <https://groups.google.com/d/msgid/packer-tool/CAHqq0ex1hG-bwjVDy0gEXM2x4WpBRyOGg6zHRvJofQ-0XPP_0g%40mail.gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/F6224143-1A6A-4F5A-8C0B-0A13CC8557B3%40gmail.com. For more options, visit https://groups.google.com/d/optout.
