diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-03-28 16:03:40 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-03-28 16:03:40 +0200 |
commit | 3998a0095cacfdd044b7f1bae90450e96aa04af8 (patch) | |
tree | 51c0a6674d823b73bed9e4240ac57fe2c775cb47 /bootstrap | |
parent | 9a734661e3829fdcd89fa3cef32419d5e56b5393 (diff) |
Add support for persistent state, SSH
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -149,6 +149,7 @@ if [ "$stage" -eq "1" ]; then pkgs+=",net-tools,iproute2,iptables,isc-dhcp-client" pkgs+=",ifupdown,bridge-utils,dnsmasq,ntp,postfix" pkgs+=",iputils-ping,wget,curl" + pkgs+=",openssh-client,openssh-server" pkgs+=",less" @@ -293,8 +294,8 @@ apt-get clean # Clean up /bootstrap. # -rm /usr/lib/systemd/system/default.target.wants/setup.service -rm /usr/lib/systemd/system/setup.service +rm /usr/lib/systemd/system/default.target.wants/buildos-setup.service +rm /usr/lib/systemd/system/buildos-setup.service rm -r /bootstrap # Shutdown the container from within. @@ -408,8 +409,12 @@ fi # Test. # -if [ ! -e /tmp/buildos-disk ]; then - qemu-img create -f raw /tmp/buildos-disk 100M +if [ ! -e /tmp/buildos-state ]; then + qemu-img create -f raw /tmp/buildos-state 20M +fi + +if [ ! -e /tmp/buildos-machines ]; then + qemu-img create -f raw /tmp/buildos-machines 100M fi # To test PXE boot, replace -kernel/-initrd/-append with '-boot n'. @@ -420,7 +425,9 @@ sudo kvm \ -netdev "tap,id=net0,script=./qemu-ifup" \ -device "virtio-scsi-pci,id=scsi" \ -device "scsi-hd,drive=disk1" \ - -drive "if=none,id=disk1,file=/tmp/buildos-disk,format=raw" \ + -drive "if=none,id=disk1,file=/tmp/buildos-state,format=raw" \ + -device "scsi-hd,drive=disk2" \ + -drive "if=none,id=disk2,file=/tmp/buildos-machines,format=raw" \ -boot n # -kernel buildos-image -initrd buildos-initrd \ |