diff --git a/files_to_serve/files_to_serve b/files_to_serve/files_to_serve new file mode 120000 index 0000000..2dfe3f8 --- /dev/null +++ b/files_to_serve/files_to_serve @@ -0,0 +1 @@ +/home/mbess/workspace/debian-vm-auto-setup/files_to_serve/ \ No newline at end of file diff --git a/setup_workspace.sh b/setup_workspace.sh index 6e79ebf..3def85c 100755 --- a/setup_workspace.sh +++ b/setup_workspace.sh @@ -2,23 +2,23 @@ # Download and extract netboot image -mkdir -p machines/machine01.local +mkdir -p machines/$1 -ln -f -s $(pwd)/files_to_serve/ ./machines/machine01.local/files_to_serve +ln -f -s $(pwd)/files_to_serve/ ./machines/$1/files_to_serve -mkdir machines/machine01.local/tftp_container +mkdir machines/$1/tftp_container wget \ - -O ./machines/machine01.local/tftp_container/netboot.tar.gz \ - https://deb.debian.org/debian/dists/bookworm/main/installer-amd64/20230607/images/netboot/netboot.tar.gz + -O ./machines/$1/tftp_container/netboot.tar.gz \ + https://deb.debian.org/debian/dists/bookworm/main/installer-amd64/current/images/netboot/netboot.tar.gz -tar -xzvf ./machines/machine01.local/tftp_container/netboot.tar.gz -C ./machines/machine01.local/tftp_container/ +tar -xzvf ./machines/$1/tftp_container/netboot.tar.gz -C ./machines/$1/tftp_container/ # create base image -qemu-img create -f qcow2 ./machines/machine01.local/main.qcow 5G +qemu-img create -f qcow2 ./machines/$1/main.qcow 5G -cp ./install_machine.sh ./machines/machine01.local/ +cp ./install_machine.sh ./machines/$1/ -cp ./run_usernet.sh ./machines/machine01.local/run.sh +cp ./run_usernet.sh ./machines/$1/run.sh -cp ./debian_install_config_default ./machines/machine01.local/tftp_container/debian-installer/amd64/pxelinux.cfg/default +cp ./debian_install_config_default ./machines/$1/tftp_container/debian-installer/amd64/pxelinux.cfg/default