2016-11-19 84 views
0

這是我build.json文件打包機Debian安裝程式沒有開始

{ 
    "builders": [{ 
     "type": "virtualbox-iso", 

     "guest_os_type": "Ubuntu_64", 
     "http_directory": "http", 
     "iso_url": "http://mirrors.evowise.com/linuxmint//stable/18/linuxmint-18-xfce-64bit.iso", 
     "iso_checksum_url": "https://ftp.heanet.ie/mirrors/linuxmint.com/stable/18/sha256sum.txt", 
     "iso_checksum_type": "sha256", 
     "ssh_username": "vagrant", 
     "ssh_password": "vagrant", 
     "boot_command": [ 
      "<esc><wait><esc><wait>", 
      "/casper/vmlinuz initrd=/casper/initrd.lz", 
      " url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 
      " boot=casper automatic-ubiquity quiet splash noprompt", 
      " -- ", 
      "<enter>" 
     ], 
     "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", 
     "hard_drive_interface": "sata", 
     "output_directory": "target", 
     "vboxmanage": [ 
      ["modifyvm", "{{.Name}}", "--memory", "2048"], 
      ["modifyvm", "{{.Name}}", "--cpus", "2"] 
     ] 
    }] 
} 

和我preseed.cfg(位於HTTP子DIR)

#Step 1 
d-i debian-installer/locale string en_US 

#Step 2 
d-i time/zone string Europe/Warsaw 

#Step 3 
d-i console-setup/layoutcode string pl 

#Step 4 
d-i partman-auto/disk string /dev/sda 
d-i partman-auto/method string regular 
d-i partman-auto/choose_recipe select atomic 
d-i partman/confirm_write_new_label boolean true 
d-i partman/choose_partition select finish 
d-i partman/confirm boolean true 

#Step 5 
d-i passwd/user-fullname string vagrant 
d-i passwd/username string vagrant 
d-i passwd/user-password password vagrant 
d-i passwd/user-password-again password vagrant 
d-i user-setup/allow-password-weak boolean true 
d-i netcfg/get_hostname string vagrant 
d-i passwd/auto-login boolean true 

# Use non-free packages 
ubiquity ubiquity/use_nonfree boolean true 

#if you want to start commands after the installation 
ubiquity ubiquity/success_command string in-target apt-get -y install openssh-server && /etc/init.d/ssh restart; 

#Step 6 
ubiquity ubiquity/summary note 
ubiquity ubiquity/reboot boolean true 

我的理解是,"http_directory": "http",通過HTTP服務器和url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg發佈應加載它。但是,這沒有發生。機器只啓動到Linux Mint,我可以通過GUI手動安裝。我錯過了什麼?

+0

什麼奇怪的,我從薄荷18 XFCE改爲薄荷17.3 XFCE,它並安裝。是否有一些錯誤? – abc

回答

1

我在嘗試預置mint 18 kde時遇到了這個問題,並發現按'esc'來獲取'boot:'提示符似乎只是啓動到活動光盤,無論我在該提示符下鍵入的內容。

但是,按下第一個菜單項上的選項卡,刪除命令,並用我自己的替換它然後啓動到無處不在。這裏是我的引導命令從我的文件打包機:

"boot_command": [ 
    "<esc><wait><tab><wait><leftCtrlOn>u<leftCtrlOff>", 
    "/casper/vmlinuz initrd=/casper/initrd.lz", 
    " url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", 
    " automatic-ubiquity debug-ubiquity boot=casper nosplash noprompt", 
    " -- ", 
    "<enter>" 
] 

這將顯示第一引導命令,並使用CTRL-U清除線路,然後鍵入我想要的命令。

+0

謝謝你的工作。 – abc