I'm instlling Ubuntu 12.04 LTS on VMware servers. I use preseed to automate the installation. The problem I have is that once the CD-ROM image is attached to the virtual machine, and the BIOS is configured to pick it first, the machine will always reboot from the CD-ROM even after the previous installation succeeded. I tried to run "eject" as a preseed/late_command like this:
d-i preseed/late_command string in-target /media/cdrom/preseed/postinstall.sh; eject
I'm doing it from the late_command line in hope that doing so will mean that the CD-ROM is not kept busy by the postinstall.sh script. But this fails with "illegal IOCTL" and "I/O error" (found this by re-trying the eject from a secondary virtual console after the failure). The CD-ROM is not mounted at this point but still the machine will reboot from the CD-ROM in the next reboot.
I also tried to set:
d-i cdrom-detect/eject boolean true
but this doesn't change anything either.
Is there an automatic way to tell VMware to behave as if the CD-ROM was ejected for the next reboot?
Right now I'm forced to wait for the reboot and detach the CD-ROM manually at the right moment.