linuxmint / mint20-beta

BETA Bug Squah Rush
20 stars 8 forks source link

isolinux: Add txt.cfg to automate VM installs #1

Closed acotty closed 4 years ago

acotty commented 4 years ago

When trying to use the Linux Mint 20 beta ISO file to install in Virtualbox on Windows using the unattended install feature it fails as LM20 does not include /isolinux/txt.cfg in the ISO. XUbuntu 20.04 includes the file and I can use the unattended install.

The Windows batch file I use to try and create the VB LM20 image is: @rem https://kifarunix.com/how-to-automate-virtual-machine-installation-on-virtualbox/

set VM_Directory=C:\VirtualBox set VM_Name=LM-20-BETA set VBoxManageExe="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" set UserName=mint set UserPassword=mint

set ISO_IMAGE="D:\Downloads\Linux\ISO_Files\linuxmint-20-xfce-64bit-beta.iso"

@rem goto end @rem goto OS_Install

%VBoxManageExe% createvm --name %VM_Name% --ostype Ubuntu_64 --register --basefolder "C:\VirtualBox" %VBoxManageExe% createmedium --filename "%VM_Directory%\%VM_Name%\%VM_Name%.vdi" --format VDI --size 102200

%VBoxManageExe% storagectl %VM_Name% --name SATA --add SATA --controller IntelAhci %VBoxManageExe% storageattach %VM_Name% --storagectl SATA --port 0 --device 0 --type hdd --medium "%VM_Directory%\%VM_Name%\%VM_Name%.vdi"

%VBoxManageExe% storagectl %VM_Name% --name IDE --add IDE --controller PIIX4 @rem %VBoxManageExe% storageattach %VM_Name% --storagectl IDE --port 0 --device 0 --type dvddrive --medium "none"

%VBoxManageExe% modifyvm %VM_Name% --clipboard-mode bidirectional --draganddrop bidirectional %VBoxManageExe% modifyvm %VM_Name% --memory 8192 --vram 128 %VBoxManageExe% modifyvm %VM_Name% --graphicscontroller vmsvga --monitorcount 2 --accelerate3d on %VBoxManageExe% modifyvm %VM_Name% --ioapic on %VBoxManageExe% modifyvm %VM_Name% --boot1 dvd --boot2 disk --boot3 none --boot4 none %VBoxManageExe% modifyvm %VM_Name% --cpus 4 %VBoxManageExe% modifyvm %VM_Name% --audio dsound --audiocontroller hda --audioin off --audioout on

%VBoxManageExe% modifyvm %VM_Name% --usb off %VBoxManageExe% modifyvm %VM_Name% --usbohci off %VBoxManageExe% modifyvm %VM_Name% --usbehci off %VBoxManageExe% modifyvm %VM_Name% --usbxhci off

%VBoxManageExe% modifyvm %VM_Name% --nic1 nat --nictype1 82540EM --cableconnected1 on --natpf1 ["EGM Simulator"],tcp,[0.0.0.0],3321,[0.0.0.0],3321

%VBoxManageExe% modifyvm %VM_Name% --nic2 none %VBoxManageExe% modifyvm %VM_Name% --nic3 none %VBoxManageExe% modifyvm %VM_Name% --nic4 none

%VBoxManageExe% modifyvm %VM_Name% --uart1 0x3f8 4 --uartmode1 COM1 %VBoxManageExe% modifyvm %VM_Name% --uart2 off %VBoxManageExe% modifyvm %VM_Name% --uart3 0x3e8 4 --uartmode3 COM3 %VBoxManageExe% modifyvm %VM_Name% --uart4 0x2e8 3 --uartmode4 COM4

%VBoxManageExe% sharedfolder add %VM_Name% --name "VirtualBoxTransfer" --hostPath "D:\VB_Transfer" --writable "true" --autoMount "true" --autoMountPoint "/home/%UserName%/Transfer"

:OS_Install %VBoxManageExe% unattended install "%VM_Name%" --user=%UserName% --password=%UserPassword% --country=AU --time-zone="Australia/Sydney" --hostname="%VM_Name%".myguest.virtualbox.org --iso=%ISO_IMAGE% --start-vm=gui --install-additions @rem --additionsIsoPath = C:\Program Files\Oracle\VirtualBox\ VBoxGuestAdditions.iso goto end

:end

The txt.cfg file from XUbuntu ISO is: default live label live menu label ^Try Xubuntu without installing kernel /casper/vmlinuz append file=/cdrom/preseed/xubuntu.seed initrd=/casper/initrd quiet splash --- label live-nomodeset menu label ^Try Xubuntu without installing (safe graphics) kernel /casper/vmlinuz append file=/cdrom/preseed/xubuntu.seed initrd=/casper/initrd quiet splash nomodeset --- label live-install menu label ^Install Xubuntu kernel /casper/vmlinuz append file=/cdrom/preseed/xubuntu.seed only-ubiquity initrd=/casper/initrd quiet splash --- label live-install-nomodeset menu label ^Install Xubuntu (safe graphics) kernel /casper/vmlinuz append file=/cdrom/preseed/xubuntu.seed only-ubiquity initrd=/casper/initrd quiet splash nomodeset --- label memtest menu label Test ^memory kernel /install/mt86plus label hd menu label ^Boot from first hard disk localboot 0x80

clefebvre commented 4 years ago

So all you need is an isolinux/txt.cfg file which defaults to the live label?

acotty commented 4 years ago

I do not know what is needed. I found the file was missing as I grabbed the Virtualbox sources and tracked the problem down to the missing file based on the error message as I thought it may be a problem with my batch with LM20. I only found out that VirtualBox had an unattended install feature about 4 weeks ago, so am a newbie with this.

clefebvre commented 4 years ago

OK, we'll investigate during the next dev cycle.