Install from USB fails: "An attempt to configure apt to install additional packages from the CD failed"

Bug #658865 reported by Kevin Alen
490
This bug affects 92 people
Affects Status Importance Assigned to Milestone
Estobuntu
New
Undecided
Unassigned
Baltix
New
Medium
Mantas Kriaučiūnas
ubiquity (Ubuntu)
Invalid
High
Unassigned

Bug Description

Please note that removing /usr/lib/ubiquity/apt-setup/generators/40cdrom from your system may cause the installer to crash at a later stage.

Original report follows:

Binary package hint: ubiquity

Description of problem:
When trying to install Ubuntu 10.10 from USB, ubiquity crashes with this message: "An attempt to configure apt to install additional packages from the CD failed."

Root of problem:
The problem is that the file structure on the usb differs to what is on a livecd and apt-setup is unaware of this.

WORKAROUND:

There appear to be two alternatives:

a) Remove the script that causes the error, when installing from a Live setup ("Try Ubuntu"):
   sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom

b) Create the files as they are expected:

   To resolve this, simply copy the contents of filesystem.squashfs on the iso into the usb stick. Luckily the parts it is reading from this appear to be just apt config files so the fact that you lose symbolic links or permissions on a FAT32 usb stick shouldn't matter.

   On your current Linux installation: (If you don't have one you could use a live cd off a different usb stick)
   1. Create USB stick.
   2. Type in a terminal:
   sudo mkdir iso
   sudo mkdir source
   sudo mount -o loop pathtoiso/ubuntu-10.10-desktop-amd64.iso iso
   sudo mount -t squashfs -o loop iso/casper/filesystem.squashfs source
   sudo cp -pLr source/* pathtomountedusbstick

   (Thanks Klaas Hartmann for the workaround :))

Architecture: i386
DistroRelease: Ubuntu 10.10
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
Package: ubiquity 2.4.8
PackageArchitecture: i386
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Tags: maverick
Uname: Linux 2.6.35-22-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Kevin Alen (kallen360) wrote :

Sorry couldn't figure out how to attach the second file. So here it is.

Revision history for this message
Aferim Mashalla (huec) wrote :

Same problem on Asus Eee 701 4G.

Revision history for this message
Alexey Kurchavy (resetinbox) wrote :

Tried to install using UnetBootin and Universal USB Installer. The same problem. Was detected even in RC. Asus Eee 900

Revision history for this message
João Gomes (jvpgomes) wrote :

I'm having the same problem.
I tried with the Ubuntu desktop CD and with the alternate CD.
I also tried creating the usb disk with the usb creator from Ubuntu and with the tool from http://www.pendrivelinux.com/downloads/Universal-USB-Installer/Universal-USB-Installer.exe

But the installation always fails with the message: "An attempt to configure apt to install additional packages from the CD failed".

Revision history for this message
Klaas Hartmann (klaas-hartmann) wrote :

Righteo, after 3 hours of frustration I have finally got the install from usb to work. I am not an expert on ubuntu so my interpretation of what is going on may be off the mark but the following steps achieved success on my machine.

The problem is that the file structure on the usb differs to what is on a livecd and apt-setup is unaware of this. To resolve this I simply copied the contents of filesystem.squashfs on the iso into the usb stick. Luckily the parts it is reading from this appear to be just apt config files so the fact that you loose symbolic links and permissions etc on a FAT32 usb stick shouldn't matter.

On your current Linux installation: (If you don't have one you could use a live cd off a different usb stick)
1. Create USB stick. I used unetbootin 494 and ubuntu-10.10-desktop-amd64.iso
2.
sudo mkdir iso
sudo mkdir source
sudo mount -o loop pathtoiso/ubuntu-10.10-desktop-amd64.iso iso
sudo mount -t squashfs -o loop iso/casper/filesystem.squashfs source
sudo cp -pLr source/* pathtomountedusbstick

Rant:
I am surprised that this problem is not seeing any attention. As with many modern pcs I only have wifi internet access and the usb netinstall doesn't recognise my wifi card. I also don't have a cd/bd drive as I only use open source software downloaded off the internet. So a usb install is the only possible option, surely this would be the case for an increasing number of users? To this end I have done my best to provide a workaround.

Revision history for this message
Mohamed Amine Ilidrissi (ilidrissi.amine) wrote :

Can someone boot the desktop on a LiveUSB (i.e "Try Ubuntu") and type "apport-collect 658865", so that we can get more information? Thanks!

Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Alexey Kurchavy (resetinbox) wrote : apport information

Architecture: i386
DistroRelease: Ubuntu 10.10
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
Package: ubiquity 2.4.8
PackageArchitecture: i386
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Tags: maverick
Uname: Linux 2.6.35-22-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

tags: added: apport-collected
Revision history for this message
Alexey Kurchavy (resetinbox) wrote : Casper.gz

apport information

Revision history for this message
Alexey Kurchavy (resetinbox) wrote : Dependencies.txt

apport information

Revision history for this message
Alexey Kurchavy (resetinbox) wrote : UbiquityDebug.gz

apport information

Revision history for this message
Alexey Kurchavy (resetinbox) wrote : UbiquityDm.gz

apport information

Revision history for this message
Alexey Kurchavy (resetinbox) wrote : UbiquitySyslog.gz

apport information

description: updated
description: updated
description: updated
Changed in ubiquity (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Jonas Wielicki (j-wielicki) wrote : Re: An attempt to configure apt to install additional packages from the CD failed upon install from USB

Not experienced with Ubuntu, but I just experience these problems when having used Universal USB Creator under windows, while I had no problems when I created the bootable with unetbootin from Fedora. May that be a problem in Universal USB Creator?

greetings

Revision history for this message
Dazed (dazed) wrote :

I had this problem with an Acer Aspire A110 netbook and the UNE 10.10 iso on a USB key (via Unetbootin on XP).

Connecting via WiFi first made no difference. I tried installing various times and at one point it told me installation was complete (after the installer crashed) but I still got "error: file not found grub rescue>" after rebooting.

Having no other Linux PC, I first tried running the #6 workaround on the netbook (using Live USB), but the USB key became read only when booted from and I didn't have another USB key big enough. I then tried to copy the files to an SD card instead and merge them back onto the USB key with my XP PC, but it was taking too long on the netbook.

The next plan was to use a Live CD on the XP PC and copy the files, but it was too slow with the CD drive spinning up/down repeatedly and causing I/O errors until the PC froze. Instead I installed Ubuntu via Wubi on the XP PC and did it there instead. After spending many hours copying 133,000 files (1.5-3Gb?) onto the USB key and installing it on the netbook, it still didn't work :(

My workaround was to use the 'Alternate installer' iso on USB instead, and I connected the ethernet too. It downloaded stuff and took somewhere between 2 - 6hrs (as I was asleep) and works well. An improvement at least on the 11.5 hrs it took before to upgrade from UNE 10.04 to a buggy 10.10 (slow SSD).

Revision history for this message
Daniel Castro (castromd) wrote :

Hi,

Tried to follow steps on #6 but when doing 'sudo cp -pLr source/* pathtomountedusbstick' it just give a bunch of errors about:
cp: failed to preserve ownership for `/media/SWEET/boot': Operation not permitted
cp: cannot create special file `/media/SWEET/dev/agpgart': Operation not permitted

And the like and just hangs....

Does anyone have any other workaround?

Revision history for this message
long.in.the.tooth (sean-cavanagh) wrote :

Yes, just worked one out this weekend.

Ubiquity is a collection of shell scripts. There is a shell script that attempts to add the cdrom to the apt-sources list, and this script crashes and brings down the whole install.

The workaround is to go find that script and delete it.

1. Start the machine in trial mode.
2. Open a terminal
3. $ locate ubiquity | grep apt

That command will show you a directory like /usr/lib/ubiquity/apt or somesuch.

Look around under there for a file that looks like '40cdrom' and remove it. Then click on the 'install ubuntu' icon and away you go.

Wish I had the filesystem in front of me or I'd go find the full path for you.

Good luck!

Revision history for this message
Derek Sheh (dsheh) wrote :

> long.in.the.tooth

Thank you for the workaround, and just in time after my hardware upgrades. You saved me from resorting to another lame windows install. Time to enjoy a more robust, speedy, and customizable OS.

Cheers.

Revision history for this message
Ramchandra Apte (ramchandra.apte) wrote :

This bug also affects Natty Narwhal Alpha 1.
Enhancment of long.in.the.tooth's solution(does not need fetch the packages from the internet)
1. Start the machine in trial mode.
2. Open a terminal
3. Execute dpkg -iR /cdrom/pool #installs the packages from the usb drive.
4. Remove the file /usr/lib/ubiquity/apt-setup/generators/40cdrom
2. Install Kubuntu.

Revision history for this message
Ramchandra Apte (ramchandra.apte) wrote :

This bug also affects Natty Narwhal Alpha 1.
Enhancment of long.in.the.tooth's solution (does not need to fetch the packages from the internet).
1. Start the machine in trial mode.
2. Open a terminal
3. Execute dpkg -iR /cdrom/pool #installs the packages from the USB drive.
4. Remove the file /usr/lib/ubiquity/apt-setup/generators/40cdrom
2. Install Kubuntu.

Revision history for this message
snehalmasne (snehalmasne) wrote :

Here goes what happened to me and the workaround I got for successful cloud setup:

I used both a USB (Unetbootin+Universal USB) and a CD (10.10) to install but neither worked and both gave me the same error:

"Apt configuration fail; an attempt to configure apt to install additional packages from the CD failed."

Some days ago, I successfully did UEC setup with 10.04 LTS from CD. But even that was also not working. I thought that something went wrong with me or my devices.

After searching on the net, I got following:

[QUOTE]

Root of problem:
The problem is that the file structure on the usb differs to what is on a livecd and apt-setup is unaware of this.

Workaround:
To resolve this, simply copy the contents of filesystem.squashfs on the iso into the usb stick. Luckily the parts it is reading from this appear to be just apt config files so the fact that you lose symbolic links or permissions on a FAT32 usb stick shouldn't matter.

[/QUOTE]

I don't think that's the problem, as I was getting same error while using CD. As setting up the cloud is part of my project work, I spent almost a week and many CDs but all failed.

I thought its somehow related to the broken filesystem. So I tried Universal USB Installer to create bootable USB with PartedMagic (you can try paragon partition manager also) and deleted all partitions from HDD. Then created primary and extended partitions followed by the installation of UEC on extended partition. It worked for 3 other machines as well.

It's worth trying. All the best !!

Regards,
Snehal Masne

Revision history for this message
Stephen Schleising (stephen-schleising) wrote :

This bug is still present in Natty Narwhal Beta 1.

Revision history for this message
jack doherty (jkdoherty) wrote :

This worked!

Yes, just worked one out this weekend.

Ubiquity is a collection of shell scripts. There is a shell script that attempts to add the cdrom to the apt-sources list, and this script crashes and brings down the whole install.

The workaround is to go find that script and delete it.

1. Start the machine in trial mode.
2. Open a terminal
3. $ locate ubiquity | grep apt

That command will show you a directory like /usr/lib/ubiquity/apt or somesuch.

Look around under there for a file that looks like '40cdrom' and remove it. Then click on the 'install ubuntu' icon and away you go.

Wish I had the filesystem in front of me or I'd go find the full path for you.

Good luck!

Revision history for this message
Jochen Laux (dev-null-freenet) wrote :

Thanks Jack.
sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom is the solution.
Be joyful, happy and install.

Daniel Hahler (blueyed)
Changed in ubiquity (Ubuntu):
status: Confirmed → Triaged
importance: Medium → High
Daniel Hahler (blueyed)
description: updated
Revision history for this message
Nix (nix-zgb) wrote :

Greetings all

I had the same problem and my solution was much more simple than of some solutions described here.
I have been using unebootin for creation of bootable usb, and installation was always crashing somwhere at the and with error "An attempt to configure apt to install additional packages from the CD failed"

Only thing that i actualy needed to change for installation to work was my usb stick , since from my experiance working with diferent versions of linux not all usb stick can be made bootable( sure you can even come to setup sometimes but not all usb's can deliver full install)

So just try few different usb memory sticks and one of them will hopefully work.

Cheers

Revision history for this message
Ed Phillips (edphillips1066) wrote :

I had the same problem as everyone else. After several failed attempts I unchecked the update while installing and install restricted extra check boxes. After that, the installation went fine for me. Ubuntu 11.04 32 bit iso.

Thanks,
Ed

tags: added: ubiquity-2.4.8
tags: added: maverick
Revision history for this message
Brian Murray (brian-murray) wrote : Traceback

Exception during installation:
Oct 12 01:29:34 ubuntu python: Traceback (most recent call last):
Oct 12 01:29:34 ubuntu python: File "/usr/share/ubiquity/plugininstall.py", line 1424, in <module>
Oct 12 01:29:34 ubuntu python: install.run()
Oct 12 01:29:34 ubuntu python: File "/usr/share/ubiquity/plugininstall.py", line 54, in wrapper
Oct 12 01:29:34 ubuntu python: func(self)
Oct 12 01:29:34 ubuntu python: File "/usr/share/ubiquity/plugininstall.py", line 136, in run
Oct 12 01:29:34 ubuntu python: self.configure_apt()
Oct 12 01:29:34 ubuntu python: File "/usr/share/ubiquity/plugininstall.py", line 438, in configure_apt
Oct 12 01:29:34 ubuntu python: raise install_misc.InstallStepError("AptSetup failed with code %d" % ret)
Oct 12 01:29:34 ubuntu python: InstallStepError: AptSetup failed with code 127
Oct 12 01:29:34 ubuntu python:

tags: added: installer-crash
Revision history for this message
Lucas Wilson (lucaswilson7) wrote : Re: An attempt to configure apt to install additional packages from the CD failed upon install from USB

Yep same problem for me with eeepc 701 4g.. method a works, the only problem is it takes 2 and a half hours to boot to live mode and a futher 2 hours to load the installer.. lol

Daniel Hahler (blueyed)
summary: - An attempt to configure apt to install additional packages from the CD
- failed upon install from USB
+ Install from USB fails: "An attempt to configure apt to install
+ additional packages from the CD failed"
tags: added: natty
Changed in ubiquity (Ubuntu):
assignee: nobody → Ubuntu Foundations Team (ubuntu-foundations-team)
Revision history for this message
Borim (borim) wrote :

ubuntu 11.10 suffers under the same bug.

I use a lenovo x121e.

besides it is really a great idea to exclude the console program from the live cd setup. Without the console it is really difficult to write something like:
sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom

yeah I know you can use strg+alt+f1 to switch to another x console, but still someone a little unfamilar with linux will have a "little" problem!

also I think it is really odd if you test a linux distro and do not have a console... there is something important missing!

tags: added: oneiric
Revision history for this message
Michelle Mastin (violajack) wrote :

Seriously, how is this still a bug 3 releases later? Can Ubiquity not just skip this script gracefully if it fails and continue through to finish the install? Also, I didn't have this problem with either beta install of 11.10, just now with the final release.

Ubuntu 11.10 i386 desktop USB created with unetbootin-555 on Windows 7.

@Borim - it's under the name "terminal" and if you search for that in the launcher, you'll be able to run the workaround command.

Revision history for this message
Yann (yann-cabon) wrote :

This is simply outrageous!!!

How is it possible to promote correctly Ubuntu when the first thing you face is the installator and throw an error.
That's just lame. I'm using Ubuntu for years, and I just loose the little credibility because of that.
Please focus on critical stuffs!

<3 u anyway :-)

The remove 40cdrom file trick did work on 11.10 RELEASE!!!

Steve Langasek (vorlon)
tags: added: rls-mgr-p-tracking
Evan (ev)
description: updated
Steve Langasek (vorlon)
tags: added: rls-p-tracking
Revision history for this message
TimHenri (tim-moerman) wrote :

Thank you for this very usefull information!
I found this 40CDROM file, but it is blocked (read only) which makes that I cannot remove.
Anyone that can help on how to deblock this read only protection?...

Thanks

Steve Langasek (vorlon)
Changed in ubiquity (Ubuntu):
milestone: none → ubuntu-12.04
Revision history for this message
Thomas (t.c) wrote :

I have the same problem on a modified usb stick from 11.10, but currently dont understand why it fail:

I debugged it and found out, that it fail on "apt-cdrom add" command on the bottom of the script.

is there a way to debug this also? how can I set more debugging? How can I use the CATCHLOG?

Revision history for this message
jkn (jkn) wrote : Re: [Bug 658865] Re: Install from USB fails: "An attempt to configure apt to install additional packages from the CD failed"

"Thomas C." <email address hidden> writes:

> I have the same problem on a modified usb stick from 11.10, but
> currently dont understand why it fail:
>
> I debugged it and found out, that it fail on "apt-cdrom add" command on
> the bottom of the script.

Do you have: 'apt-setup: warning:
/usr/lib/ubiquity/apt-setup/generators/40cdrom returned error code 1;
discarding output' in syslog?

What is before it?

- jkn

Revision history for this message
Cory Dolphin (wcdolphin) wrote :

@tim-moerman
You must 'try ubuntu' and then as root, remove it: sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom
Then (without shutting down) run the installer.

I reproduced this issue using Ubuntu's Startup disk creator for 11.04 and the latest 11.10 release iso.

eric fortin (nitrof22)
Changed in ubiquity (Ubuntu):
status: Triaged → Opinion
status: Opinion → Fix Released
eric fortin (nitrof22)
no longer affects: ubiquity (Fluxbuntu)
Steve Langasek (vorlon)
Changed in ubiquity (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
bsd (bdowning) wrote :

Removing the apt-setup/generators/40cdrom file requires that one have net connectivity to complete the installation.

What's the point of having a cdrom, or usb stick with a complete distro except to either avoid the overhead of (repeated) download(s) (multiple installs) or a slow net connection to begin with (some of my friends still use dialup).

My problem is potentially compounded by the fact that I'm installing UEFI.

I don't like either of these workarounds, there must be something better.

What's the purpose of the cdrom-detect/try-usb=true boot arg?
Isn't that supposed to offer a clue that /cdrom is really a USB?
TIA

Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu):
assignee: Ubuntu Foundations Team (ubuntu-foundations-team) → Colin Watson (cjwatson)
assignee: Colin Watson (cjwatson) → Evan Dandrea (ev)
Revision history for this message
Evan (ev) wrote :

I cannot reproduce this bug with a 10.10 USB disk created in usb-creator.

I've started to poke around the other tools people are using in this bug, in the event that these are doing something out of spec. It looks like unetbootin is dropping 0-byte files whenever it encounters a symlink. This may be a red herring, however, as I cannot make apt-cdrom from precise blow up under such conditions. I'll try again tomorrow with 10.10's version.

Revision history for this message
Klaas Hartmann (klaas-hartmann) wrote :

Interesting that it seems to be working for you Evan. I haven't re-encountered the bug as I've been upgrading my Ubuntu systems since 10.10 rather than doing fresh installs. As I said in my original post, it was a repeatable bug with unetbootin 494 and ubuntu-10.10-desktop-amd64.iso. I tried several times with different USB sticks etc.

The other factors of interest were:
* no cd/bd-rom drive in the system
* no internet connectivity (the wi-fi card wasn't supported out of the box)

I tried to muck around with the 40cdrom file as others have suggested here but didn't have much luck, perhaps due to my lack of a network connection (which bdowning suggests is necessary if you attempt that method).

Revision history for this message
Evan (ev) wrote :

Thanks for the pointers, Klass.

Unfortunately, I cannot reproduce this with unetbootin 494 and an Ubuntu 10.10 CD.

Would someone who is still experiencing this bug please do the following:
1) Boot the USB disk created by unetbootin 494 (or whatever tool you used - just be sure to mention it here) and select Try Ubuntu.
2) Open a terminal and edit /usr/lib/ubiquity/apt-setup/generators/40cdrom as root (sudo gedit /usr/lib/ubiquity...)
3) Put 'set -x' just below the 'set -e' line. Save the file.
4) Run the installer until it crashes.
5) Run `sudo apport-collect ubiquity`. This will attach the needed debugging information to this bug report. Also write here which tool you used and what Ubuntu version you used. Please do not follow up to this report simply to say that you tried installing without these steps and it did not work.

Thanks!

Revision history for this message
Brian Murray (brian-murray) wrote :

apport-collect actually wants a bug number as an argument so you'd want to use 'apport-collect 658865'

Revision history for this message
Evan (ev) wrote :

Err yes, thanks for the catch :)

Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Evan (ev) wrote :

Removing the milestone. Without the requested information, there's nothing more we can do on this bug.

Changed in ubiquity (Ubuntu):
milestone: ubuntu-12.04 → none
Colin Watson (cjwatson)
tags: added: rls-p-nottracking
removed: rls-mgr-p-tracking rls-p-tracking
Revision history for this message
husfeldt (thomas-husfeldt) wrote :

Impressive bug - high severity bug that is alive on now here well into 2013 -- and was reported first time 2010..
Further the fix appears to be damm simple -- remove the '40cdrom' and all works...

How to workaround until this bug gets fixed sometime in far future...
1) Boot chosing the "try live" option
2) open a terminal
3) enter "sudo mv /usr/lib/ubiquity/apt-setup/generators/40cdrom /"
4) click the install icon .. and complete installation

I have fighted for hours trying to install Lubuntu 12.04 now ..
PLEASE FIX THIS STUPID BUG SOMEONE!!!!

Revision history for this message
gest (gest-mail) wrote :

I've tried 13.04 on two notebooks, all are having exactly same issue, the installation failed with the same message at the end after almost an hour of copying(?) files from USB stick to hard drive.

Evan (ev)
Changed in ubiquity (Ubuntu):
assignee: Evan Dandrea (ev) → nobody
dino99 (9d9)
tags: added: precise quantal
removed: maverick natty oneiric ubiquity-2.4.8
dino99 (9d9)
Changed in ubiquity (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Jason Moore (moorepants) wrote :

I tried installing Lubuntu 13.04 from a USB drive created with unetbootin and hit this bug. I used husfeldt's suggested solution and the install worked fine.

Revision history for this message
Eric Ongerth (ericongerth) wrote :

Same as above, this is still a problem when installing 14.04 final beta from a USB stick created with either unetbootin or ubuntu's own Startup Disk Creator. Same solution as above worked for me.

I want to recommend Ubuntu to my friends who are discontinuing Windows but it's hard to believe I have to give them these special instructions so that they can install it from a downloaded ISO and a USB stick. I hope it is clear that this is a very very popular path for installation and it should not be broken. It's surprising this has been an open issue for over three years.

Revision history for this message
Ramchandra Apte (ramchandra.apte) wrote :
Download full text (3.3 KiB)

Me too. I was shocked to see it fail in a final version through USB
install, which is nowadays one of the most popular installation options.

On 4 April 2014 03:51, Eric Ongerth <email address hidden> wrote:

> Same as above, this is still a problem when installing 14.04 final beta
> from a USB stick created with either unetbootin or ubuntu's own Startup
> Disk Creator. Same solution as above worked for me.
>
> I want to recommend Ubuntu to my friends who are discontinuing Windows
> but it's hard to believe I have to give them these special instructions
> so that they can install it from a downloaded ISO and a USB stick. I
> hope it is clear that this is a very very popular path for installation
> and it should not be broken. It's surprising this has been an open
> issue for over three years.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/658865
>
> Title:
> Install from USB fails: "An attempt to configure apt to install
> additional packages from the CD failed"
>
> Status in Estobuntu -- oma eesti opsüsteem:
> New
> Status in "ubiquity" package in Ubuntu:
> Confirmed
> Status in Baltix GNU/Linux:
> New
>
> Bug description:
> Please note that removing /usr/lib/ubiquity/apt-
> setup/generators/40cdrom from your system may cause the installer to
> crash at a later stage.
>
> Original report follows:
>
> Binary package hint: ubiquity
>
> Description of problem:
> When trying to install Ubuntu 10.10 from USB, ubiquity crashes with this
> message: "An attempt to configure apt to install additional packages from
> the CD failed."
>
> Root of problem:
> The problem is that the file structure on the usb differs to what is on
> a livecd and apt-setup is unaware of this.
>
> WORKAROUND:
>
> There appear to be two alternatives:
>
> a) Remove the script that causes the error, when installing from a Live
> setup ("Try Ubuntu"):
> sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom
>
> b) Create the files as they are expected:
>
> To resolve this, simply copy the contents of filesystem.squashfs on
> the iso into the usb stick. Luckily the parts it is reading from this
> appear to be just apt config files so the fact that you lose symbolic
> links or permissions on a FAT32 usb stick shouldn't matter.
>
> On your current Linux installation: (If you don't have one you could
> use a live cd off a different usb stick)
> 1. Create USB stick.
> 2. Type in a terminal:
> sudo mkdir iso
> sudo mkdir source
> sudo mount -o loop pathtoiso/ubuntu-10.10-desktop-amd64.iso iso
> sudo mount -t squashfs -o loop iso/casper/filesystem.squashfs source
> sudo cp -pLr source/* pathtomountedusbstick
>
> (Thanks Klaas Hartmann for the workaround :))
>
> Architecture: i386
> DistroRelease: Ubuntu 10.10
> LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
> Package: ubiquity 2.4.8
> PackageArchitecture: i386
> ProcEnviron:
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
> Tags: maverick
> Uname: Linux 2...

Read more...

Revision history for this message
mexlinux (mcanedo) wrote :

Still present on 14.04 final.

Changed in baltix:
assignee: nobody → Mantas Kriaučiūnas (mantas)
importance: Undecided → Medium
Revision history for this message
mint-user (mint-user) wrote : apport information

ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CasperVersion: 1.340
DistroRelease: Ubuntu 14.04
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/linuxmint.seed boot=casper iso-scan/filename= quiet splash --
LiveMediaBuild: Linux Mint 17 "Qiana" - Release amd64 20140512
Package: ubiquity 2.18.8-1linuxmint2 [modified: usr/lib/ubiquity/apt-setup/generators/40cdrom] [origin: linuxmint]
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Tags: third-party-packages qiana ubiquity-2.18.8-1linuxmint2 linuxmint
Uname: Linux 3.13.0-24-generic x86_64
UnreportableReason: This is not an official Ubuntu package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

_MarkForUpload: True

tags: added: linuxmint qiana third-party-packages ubiquity-2.18.8-1linuxmint2
Revision history for this message
mint-user (mint-user) wrote : Casper.txt

apport information

Revision history for this message
mint-user (mint-user) wrote : Dependencies.txt

apport information

Revision history for this message
mint-user (mint-user) wrote : UbiquityDebug.txt

apport information

Revision history for this message
mint-user (mint-user) wrote : UbiquityPartman.txt

apport information

Revision history for this message
mint-user (mint-user) wrote : UbiquitySyslog.txt

apport information

Revision history for this message
mint-user (mint-user) wrote :

I hit this bug in the Mint 17 RC installer, but figured it's close enough that the apport dump can help unblock this bug. Removing `40cdrom` causes the installer to crash later on.

Revision history for this message
mint-user (mint-user) wrote :

I switched to the freshly-published Mint 17 Cinnamon release ISO and had the same problem. Then I switched from using UNetbootin (OSX) to using the Ubuntu instructions for making a bootable USB drive natively in OSX (http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx). That method created a bootable flash drive whose installer completed successfully.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Mint support is not provided by Ubuntu. Please contact the developers of the images you use to resolve issues with them. As in addition to ubiquity, it does matter how the final image was constructed.

Revision history for this message
Mark Caldwell (naughty-mark) wrote :

I am getting this same error is 14.04.1-desktop-i386 Check disk for errors reports no problems with the install USB

After getting the same apt config error I press the OK button and then it tells me that that the install was successful and to reboot. When i reboot i get the flashing curser and no more.

I have tried tried installing 4 times and I've tried boot-repair-disk twice. Still to no avail.

The workaround mentioned above is very confusing and although seemingly a USB issue... My little netbook has no dvd to install from, and though i have a portable cd writer, this image is far too big to burn to CD. So, I am stuck with USB only method of installing. and it fails repeatedly.

Would someone please classify this a CRITICAL and ASSIGN it to someone? Or simple fix the issue? Or make the workaround clear enough to know when method1 ends and method2 begins?

The only other workaround i can imagine is is downloading the 12.04 and doing 4 upgrades. How lame is that?

Revision history for this message
opi (opi-gmx) wrote :

This also effects XBMCbuntu.

Revision history for this message
DaleEMoore (daleemoore) wrote :

Mint 17 64-bit still has this problem from ISOs put on USB drives via unetbootin. But the problem does not exist when the ISO was put on the USB drive via usb-creator-gtk.

Revision history for this message
Lieven (lieven-debels) wrote :

I created a custom live cd, and had this problem too.
It was solved by removing the file /usr/share/ubiquity/apt-setup,
then recreating it again by hand and giving it the right permissions
(see below)

1. sudo rm /usr/share/ubiquity/apt-setup
2. sudo nano /usr/share/ubiquity/apt-setup
3. enter the following in the file: #do nothing
4. save the file.
5. sudo chmod 755 /usr/share/ubiquity/apt-setup

Revision history for this message
Richard H (rahrah) wrote :

Hello,

I had the same problem, too, installing Linux Mint 17.2. The
installer just crashed, informing me that it had crashed, and not
giving massively helpful error messages.

I don't like having to trash the contents of a usb stick in order
to install an os, so I have one usb stick created under Linux with
good old grub1 (or grub4dos) on there.

My problem was that I had not copied these directories to the root
of the usb drive:

/preseed
/.disk
/dists
/pool

The whole usb stick is mounted under /cdrom on the resulting live
system, and some or all these directories being in the root
directory seem to be immovable.

It's unfortunate that all these files, only amounting to 8.2MB in
total on Mint 17.2, and 5.6MB on Ubuntu 15.04 can't all be more
portable and placed anywhere. It's unfortunate, too, that after
years of bug reports, the error handling on this is unhelpful. It
seems to be an upstream ubuntu problem, though.

To fix, this is what I did, assuming that the usb stick is mounted
under /usb:

#Mount the iso image as a loopback on /cdrom
mount -o loop linuxmint-17.2-cinnamon-64bit.iso /cdrom

cd /usb
mkdir mint17.2
cd mint17.2
#Copy all CD files to /usb/mint17.2
rsync -avv cdrom/ . --progress

#Now copy the necessary dirs to the root of USB:
cd /usb
rsync -avv /cdrom/preseed /cdrom/.disk /cdrom/dists /cdrom/pool . --progress

My grub1 menu.lst command line is:

title Linux Mint 17.2
kernel /mint17.2/casper/vmlinuz file=/mint17.2/preseed/linuxmint.seed live-media-path=/mint17.2/casper/ ignore_uuid boot=casper ramdisk_size=1048576 root=/dev/ram rw splash --
initrd /mint17.2/casper/initrd.lz

The same idea can be used for Ubuntu 15.04.

Grub4dos also works for booting usb sticks.

Cheers,

===Rich

Revision history for this message
Carl Muehlbauer (carl-muehlbauer) wrote :

I've been struggling for days to load Ubuntu 15.10 and /or Mint 17.2 on a new HP Pavilion. Everything functioned perfectly from the jump drive until I started to load to the hard drive. Finally found this page, removed the 40cdrom file and I am happy to say that the install of 15.10 appears to be successful. I am not computer literate, but I have been using Ubuntu as my home office operating system for about 8 years, with no issues. This one had me stumped until i found this page. Thanks to all who posted the fix. This appears to be a problem that could have been fixed months ago. Can anyone get this to the top and get it fixed?? Thanks again for all of the help.

Revision history for this message
jkn (jkn) wrote : Re: [Bug 658865] Re: Install from USB fails: "An attempt to configure apt to install additional packages from the CD failed"

Carl Muehlbauer <email address hidden> writes:

> I've been struggling for days to load Ubuntu 15.10 and /or Mint 17.2 on
> a new HP Pavilion. Everything functioned perfectly from the jump drive
> until I started to load to the hard drive. Finally found this page,
> removed the 40cdrom file and I am happy to say that the install of 15.10
> appears to be successful. I am not computer literate, but I have been
> using Ubuntu as my home office operating system for about 8 years, with
> no issues. This one had me stumped until i found this page. Thanks to
> all who posted the fix. This appears to be a problem that could have
> been fixed months ago. Can anyone get this to the top and get it fixed??
> Thanks again for all of the help.

This should have been fixed years ago:) For me this happened because I
had extra files in my USB stick. With clean stick everything worked.
Did you have clean USB stick?

Revision history for this message
tandt (dothetan-040490) wrote :

Hi,

I am a new of linux.
I met a problem and try to run commands as you guide. But the last on, how can I find "pathtomountedusbstick" ?

Please help, I tried installing by using USB and CD live, but not success yet.

thank you!

Revision history for this message
Jasper van der Bent (jasper-vander-bent) wrote :

Dear all, I have been reading this post and have been struggling with it for both Ubuntu and Linux Mint USB installations (my computer is so new, it doesn't have a disc nor ethernet port anymore).
Unfortunately the resolution mentioned above didn't work our form e, but after some hours of booting and testing, I found this which proofed to be a robust and working resolution.

Hope you enjoy using your system of choice in UEFI mode while installing from USB.

As for the credit part, please note that none of the below is my intellectual property, I just found a way to use Google in a smart way and combine several resolutions into one that is working for me, using mainly the following websites:

https://wiki.debian.org/InstallingDebianOn/Thinkpad/X1%20Carbon%204thGen%20PCIe_SSD/jessie

http://unix.stackexchange.com/questions/280440/grub-and-lilo-both-fail-to-install-to-nvme-hard-disk-when-installing-debian

http://www.rojtberg.net/1032/converting-a-ubuntu-and-windows-dual-boot-installation-to-uefi/

Basically, what you do is :

 - start the Ubuntu/Mint installer in BIOS mode
 - at the partition choise: "something else" / "manually"
 - create the 3 partitions to use in the final UEFI mode (1x EFI 512MB, 1x ext4, 1x SWAP)
 - set the GRUB partition to /dev/nvme0n1 (or /dev/sda, or ...)
 - install the Ubuntu/Mint as a normal BIOS install
 - Once installed, reboot to test the BIOS mode installed correctly
 - shutdown your BIOS based system

and then make the switch from BIOS mode to UEFI mode

 - Boot the LIVE INSTALLATION image again in UEFI mode
 - Enter chroot and update Grub

sudo mount /dev/nvme0n1p2 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /sys /mnt/sys
sudo mount -t proc /proc /mnt/proc
sudo cp /proc/mounts /mnt/etc/mtab
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
sudo chroot /mnt

sudo aptitude update
sudo aptitude install grub-efi-amd64
sudo update-grub
sudo grub-install --target=x86_64-efi /dev/nvme0n1
sudo update-grub
reboot

Et voila .. your system will boot in UEFI mode - with just a few minutes of additional installation effort.

P.s. one of the articles also mentiones the following necessary commands - but to be honoust, the system works fine for me without ;-)

Once the installation completes, boot into the system.

$ sudo nano /etc/initramfs-tools/modules # add the following line
nvme

sudo update-initramfs -u

sudo nano /etc/default/grub # modify the following lines
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
GRUB_CMDLINE_LINUX="intel_pstate=no_hwp"

sudo update-grub
reboot

Revision history for this message
Srdjan Grubor (sgnn7) wrote :

Got sick and tired of this bug so figured I'd find out what the cause is. Turns out (for me) because I overwrote multiple versions of Linux using unetbootin, there were multiple apt folders in dist/ on the drive (i.e. yakkety, zesty, etc) so when the 40cdrom script came around, it tried to validate the GPG signature of all the dist/ repos including the non-target dist/ which of course fails so it bubbles up as a failure of the whole installation script. Removing the folder in question made the installation proceed without issues.

PS: Without 40cdrom script, latter part of the installation fails if you have a UEFI system since it won't be able to find the signed grub shim so this approach is not recommended.

tl;dr fix: Removing the folder not matching installation CD version from your USB dist/ folder should make it work.

Revision history for this message
Rob Ristroph (rgristroph) wrote :

I can confirm I had this same issue with multiple different versions of Ubuntu that I was trying to install via a USB stick created with Unetbootin. I had previously been in the habit of rewriting a USB thumb drive with different bootable images without cleaning it first. When I started wiping the USB thumb drive between loading it with an iso via unetbootin, everything started working.

I think this could be considered a bug in unetbootin.

Revision history for this message
Phillip Susi (psusi) wrote :

Setting up a USB stick with files in the wrong place is not a bug in ubiquity.

Changed in ubiquity (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
jkn (jkn) wrote :

Phillip Susi <email address hidden> writes:

> Setting up a USB stick with files in the wrong place is not a bug in
> ubiquity.
>
>
> ** Changed in: ubiquity (Ubuntu)
> Status: Confirmed => Invalid

I did have old files which caused bug (long time ago, I hope my memory
is correct:), but ubiquity should handle situation better. I believe
many users experience same problem. For me this is solved, because I know
now what to clean. But others don't, so this will reappear again and
again until ubiquity is fixed.

Revision history for this message
bsd (bdowning) wrote :

My comments are years old, so I can't recall the details of the error, but
the combinations of the two sets of instructions for adding additional
packages, and burning a USB from a CD, don't jibe, leaving users in the
lurch.
One or the other set of instructions should be updated to reflect this.
I switched to Arch years ago, simply because their documentation is superb!

On Tue, Jun 12, 2018 at 11:25 AM Phillip Susi <email address hidden> wrote:

> Setting up a USB stick with files in the wrong place is not a bug in
> ubiquity.
>
>
> ** Changed in: ubiquity (Ubuntu)
> Status: Confirmed => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/658865
>
> Title:
> Install from USB fails: "An attempt to configure apt to install
> additional packages from the CD failed"
>
> Status in Estobuntu:
> New
> Status in ubiquity package in Ubuntu:
> Invalid
> Status in Baltix:
> New
>
> Bug description:
> Please note that removing /usr/lib/ubiquity/apt-
> setup/generators/40cdrom from your system may cause the installer to
> crash at a later stage.
>
> Original report follows:
>
> Binary package hint: ubiquity
>
> Description of problem:
> When trying to install Ubuntu 10.10 from USB, ubiquity crashes with this
> message: "An attempt to configure apt to install additional packages from
> the CD failed."
>
> Root of problem:
> The problem is that the file structure on the usb differs to what is on
> a livecd and apt-setup is unaware of this.
>
> WORKAROUND:
>
> There appear to be two alternatives:
>
> a) Remove the script that causes the error, when installing from a Live
> setup ("Try Ubuntu"):
> sudo rm /usr/lib/ubiquity/apt-setup/generators/40cdrom
>
> b) Create the files as they are expected:
>
> To resolve this, simply copy the contents of filesystem.squashfs on
> the iso into the usb stick. Luckily the parts it is reading from this
> appear to be just apt config files so the fact that you lose symbolic
> links or permissions on a FAT32 usb stick shouldn't matter.
>
> On your current Linux installation: (If you don't have one you could
> use a live cd off a different usb stick)
> 1. Create USB stick.
> 2. Type in a terminal:
> sudo mkdir iso
> sudo mkdir source
> sudo mount -o loop pathtoiso/ubuntu-10.10-desktop-amd64.iso iso
> sudo mount -t squashfs -o loop iso/casper/filesystem.squashfs source
> sudo cp -pLr source/* pathtomountedusbstick
>
> (Thanks Klaas Hartmann for the workaround :))
>
> Architecture: i386
> DistroRelease: Ubuntu 10.10
> LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
> Package: ubiquity 2.4.8
> PackageArchitecture: i386
> ProcEnviron:
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
> Tags: maverick
> Uname: Linux 2.6.35-22-generic i686
> UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/estobuntu/+bug/658865/+subscriptions
>

--
<email address hidden>

Revision history for this message
Eric Mintz (mintz-eric) wrote :

Happened in 20.04 LTS as well. I have removed usr/lib/ubiquity/apt-setup/generators/40cdrom (actually created ~/RemovedFiles and saved it there) and will try again.

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.