Failed to copy resolv.conf, error=1- not fixed in v.2.4.6

Asked by shirdi.saidasan@gmail.com

It was told in http://fabrizioballiano.net/2012/05/04/uck-2-4-6-is-out/
that

A bug with /etc/resolv.conf on precise was fixed
Fixes #9464801

But i used new version in linux mint 13 maya.
and the same error repeated. pls fix this.

******************
Building failed.

Please look at /home/netfox/tmp/build.log to see what went wrong.

If you cannot find the problem, please send a support request at:

 https://launchpad.net/products/uck/+addticket
**********************

Build (/usr/bin/uck-gui --wait-before-exit) started at 2012-08-10 11:05:36
>> Ubuntu Customization Kit 2.4.6 on LinuxMint 13, 3.2.0-23-generic i686
Starting CD remastering on Fri Aug 10 11:05:40 IST 2012
Customization dir=/home/netfox/tmp/customization-scripts
Mounting ISO image...
mount: warning: /home/netfox/tmp/remaster-iso-mount seems to be mounted read-only.
Unpacking ISO image...
Unmounting ISO image...
Mounting SquashFS image...
mount: warning: /home/netfox/tmp/remaster-root-mount seems to be mounted read-only.
Unpacking SquashFS image...
Unmounting SquashFS image...
Removing win32 files...
Creating apt cache...
Creating root home...
Mounting /proc
Mounting /sys
Mounting /dev/pts
Mounting /tmp
Mounting /home/netfox/tmp/remaster-root-home
Mounting /home/netfox/tmp/remaster-apt-cache
Mounting /run
Mounting /home/netfox/tmp/customization-scripts
Copying resolv.conf...
cp: cannot stat `/etc/resolv.conf': No such file or directory
Unmounting /home/netfox/tmp/remaster-root/var/cache/apt...
Unmounting /home/netfox/tmp/remaster-root/tmp/customization-scripts...
Unmounting /home/netfox/tmp/remaster-root/tmp...
Unmounting /home/netfox/tmp/remaster-root/sys...
Unmounting /home/netfox/tmp/remaster-root/run...
Unmounting /home/netfox/tmp/remaster-root/root...
Unmounting /home/netfox/tmp/remaster-root/proc...
Unmounting /home/netfox/tmp/remaster-root/dev/pts...
Failed to copy resolv.conf, error=1
**************
Build ended at 2012-08-10 12:48:41
Press ENTER to close the terminal
*******************

Question information

Language:
Portuguese Edit question
Status:
Solved
For:
Ubuntu Customization Kit Edit question
Assignee:
No assignee Edit question
Solved by:
shirdi.saidasan@gmail.com
Solved:
Last query:
Last reply:
Revision history for this message
shirdi.saidasan@gmail.com (shirdi-saidasan) said :
#1

I have solved the issue myself in Precise pongolin (ubuntu 12.04 based linux mint 13 maya ) after trying a user comment posted in the above-mentioned fabrizio post.

I think many standalone configuration files are being migrated to directories in ubuntu.

That resolve.conf is one such victim file. It is not found in /etc/resolve.conf.

instead /etc/resolve.conf/resolve.conf.d directory is there.

All we have to do is edit the line 355- from /usr/lib/uck/remaster-live-cd.sh to as below:

 //mount_pseudofilesystems

 if [ ! -e "$REMASTER_DIR/etc/resolv.conf" ] ; then
  echo "Copying resolv.conf..."
  cp -f /etc/resolvconf/resolv.conf.d/* "$REMASTER_DIR/etc/resolvconf/resolv.conf.d/" ||
   failure "Failed to copy resolv.conf, error=$?"

//

now the script instead of blindly trying to copy a non-existant resolve.conf, successfully copies the whole directory to its destination.

Now there is no more error.

Pls tell me how to submit as a patch to uck.

With love from India.

***************************************************

stlsaint on May 26, 2012 | Reply

The resolv.conf error can be fixed by simply editing the remaster script to show lines a) line 355-58 from /usr/lib/uck/remaster-live-cd.sh

instead of cp resolv.conf….
replace resolv.conf with /etc/resolvconf/resolv.conf.d/original /etc/resolvconf/resolv.conf.d/

By editing as such i was able to have net access during build.

Revision history for this message
Kanthanathan (kanthanathans) said :
#2

Hi

Thanks, the above workaround resolved for me as well.