On 06/25/2009 10:07 AM, Jarl Friis wrote: > I have confirmed that ifconfig actually shows that an IP address is > assigned at the time boot.sh is executed. However when I have a > boot.sh that contains > apt-get update >> /var/aptget_update.out 2>> /var/aptget_update.err > > then aptget_update.out contains: > Err http://dk.archive.ubuntu.com jaunty Release.gpg > Could not resolve 'dk.archive.ubuntu.com' > Err http://dk.archive.ubuntu.com jaunty-updates Release.gpg > Could not resolve 'dk.archive.ubuntu.com' > Err http://security.ubuntu.com jaunty-security Release.gpg > Could not resolve 'security.ubuntu.com' > Reading package lists... > > and aptget_update.err contains: > W: Failed to fetch > http://dk.archive.ubuntu.com/ubuntu/dists/jaunty/Release.gpg Could not > resolve 'dk.archive.ubuntu.com' > > W: Failed to fetch > http://dk.archive.ubuntu.com/ubuntu/dists/jaunty-updates/Release.gpg Could > not resolve 'dk.archive.ubuntu.com' > > W: Failed to fetch > http://security.ubuntu.com/ubuntu/dists/jaunty-security/Release.gpg Could > not resolve 'security.ubuntu.com' > > W: Some index files failed to download, they have been ignored, or old ones > used instead. > W: You may want to run apt-get update to correct these problems > > But If I have a boot.sh that contains: > > nslookup dk.archive.ubuntu.com >> /var/nslookup1.out 2>> /var/nslookup1.err > apt-get update >> /var/aptget_update.out 2>> /var/aptget_update.err > > No problems are seen in any of the output files.
Ok, looks like your DHCP request is taking a bit more time to be served than in setups I have used. I guess starting your script with a wait loop such as: while (! ping -c 1 dk.archive.ubuntu.com); do sleep 1; done will make sure DHCP has finished its job before going any further. > I do have a workaround (introducing a sleep 1 in start of boot.sh), > but I would like an explanation and solution. My biggest concern > however is that following the official documentation: > https://help.ubuntu.com/9.04/serverguide/C/jeos-and-vmbuilder.html > does not work out of the box. Well, it clearly does not in your case. Once you have verified that the above solution does work, if you can let us know or update the wiki page [1] which serves as a source for the documentation, it will definitely help. > For now I have create a bug: > https://bugs.launchpad.net/ubuntu/+source/vm-builder/+bug/391980 The wait loop could indeed be put in the calling script that vmbuilder installs... Let's discuss that in your bug. Nick
signature.asc
Description: OpenPGP digital signature
-- ubuntu-server mailing list ubuntu-server@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-server More info: https://wiki.ubuntu.com/ServerTeam