Stuck at "Saving installed packages..." when using a custom /var

Bug #875343 reported by Ingo Schmidt
124
This bug affects 27 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Triaged
High
Unassigned

Bug Description

The installer hangs forever at message "Saving installed packages" under certain conditions. Steps to reproduce:
- Start gparted, create GPT partition table and create big enough partitions as follows:
- /dev/sda1 formatted as ext4
- /dev/sda2 formatted as ext4
- Start Ubiquity
- Use default options until you reach "Installation Type"
- Choose "Something else"
- Choose usage of partitions and mount points as follows (do NOT format!)
-- /dev/sda1 on /
-- /dev/sda2 on /var
- Hit "Install now" (ignore the warning)
=> Installer will then hang forever. Last message it displays is: "Saving installed packages"

I have tried this with 14.04 live CDs (daily build) on a physical machine and VMs and it always shows this behaviour.

Some notes:
- You can avoid the problem, if you mark / or /var (or both) for formatting
- It only seems to happen with a separate /var partition. If only /usr is different, everything works as expected
- The problem did not exist in previous installers (before Ubuntu 11.10)

The reason why I do not want to format with Ubiquity is because I have pre-formatted my partitions with special parameters which I cannot set in Ubiquity.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ubiquity 2.17.1
ProcVersionSignature: Ubuntu 3.12.0-7.15-generic 3.12.4
Uname: Linux 3.12.0-7-generic x86_64
ApportVersion: 2.12.7-0ubuntu2
Architecture: amd64
CasperVersion: 1.336ubuntu1
Date: Tue Dec 17 01:55:05 2013
LiveMediaBuild: Xubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20131216)
ProcEnviron:
 LANGUAGE=en_US
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ingo Schmidt (ubuntu-hwbqs6tox1bv6csee) wrote :
Revision history for this message
Evan (ev) wrote :

Can you please reproduce this with the installer in debug mode, then reattach the logs (`sudo apport-collect 875343`)? To get ubiquity in debug mode, press the "Try Ubuntu" button, then open a terminal and type `ubiquity -d`

Thanks!

Changed in ubiquity (Ubuntu):
status: New → Incomplete
Revision history for this message
Ingo Schmidt (ubuntu-hwbqs6tox1bv6csee) wrote : Casper.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Ingo Schmidt (ubuntu-hwbqs6tox1bv6csee) wrote : Dependencies.txt

apport information

Revision history for this message
Ingo Schmidt (ubuntu-hwbqs6tox1bv6csee) wrote : UbiquityDebug.txt

apport information

Revision history for this message
Ingo Schmidt (ubuntu-hwbqs6tox1bv6csee) wrote : UbiquityPartman.txt

apport information

Revision history for this message
Ingo Schmidt (ubuntu-hwbqs6tox1bv6csee) wrote : UbiquitySyslog.txt

apport information

Revision history for this message
TJ (tj) wrote : Re: Installer hangs forever

I'm experiencing the same issue attempting an 11.10 install via the Live CD image over a PXE/NFS boot. It affects x86 and amd64 installs.

The system's hard disk is configured with 4 primary partitions:

/dev/sda1 Vaio Recovery environment
/dev/sda2 Microsoft Windows Vista
/dev/sda3 /boot
/dev/sda4 LVM

/dev/sda4 is the PV, it contains one VG "Ubuntu". The VG contains several LVs. Some LVs are encrypted. I unlocked them via a terminal prior to starting Ubiquity using:

"sudo cryptsetup --key-file /media/USB/somefile.key luksOpen /dev/Ubuntu/Oneiric_var_encrypted Oneiric_var"

For the install I chose "Something Else" for the partitioning scheme and selected recently created and ext4-formatted LVs for:

/dev/Ubuntu/Oneiric == "/"
/dev/Ubuntu/Oneiric_var_encrypted -> /dev/mapper/Oneiric_var == "/var"

and existing LVs (from the Lucid installation) for /home, /usr/local/.

The installer reports "Saving installed packages..." but there is no further installation activity although the taster panels continue to be active. The "Skip" button does not respond and the cursor has the 'busy' icon.

From trawling "/var/log/installer/debug" I think this is the pertinent problem:

Nov 10 00:47:25 debconf (filter): <-- PROGRESS INFO ubiquity/install/apt_clone_save
Nov 10 00:47:25 debconf (filter): widget found for ubiquity/install/title
debconf (developer): <-- METAGET ubiquity/install/apt_clone_save description
debconf (developer): --> 1 Saving installed packages...
Nov 10 00:47:25 debconf (filter): --> 0 OK
Nov 10 00:47:25 ubiquity: ['log-output', '-t', 'ubiquity', '--pass-stdout', '/bin/partman-commit'] exited with code 32

Looking further into the /lib/partmain/* scripts I found that "ubiquity/install/apt_clone_save" comes from /lib/partman/finish.d/01apt_clone_save and the exit code "32" is returned from mount when doing:

[ -n "$var" ] && mount "$var" "$mountpoint/var"

which fails since the /var directory has not been created in the root file-system as a mount-point:

sudo mount /dev/mapper/Oneiric_var /tmp/tmp.WVwIJqLzQe/var
mount: mount point /tmp/tmp.WVwIJqLzQe/var does not exist
echo $?
32

This line should be:

[ -n "$var" ] && mkdir -p "$mountpoint/var" && mount "$var" "$mountpoint/var"

summary: - Installer hangs forever
+ Stuck at "Saving installed packages..." when using a custom /var
Changed in ubiquity (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Murithi (bmurithi) wrote :

This is not a permanent solution but just a workaround for anyone wishing to upgrade without formatting target partition.

I was trying to set up 12.04 Beta 1 without formatting my /-mounted partition and got stuck at this.
My 11.10 setup was going to be a pain to upgrade anyway - had troublesome upgrade earlier when using .

I booted with an alternate cd and removed everything I did not need (/var /lib /opt e.t.c) except /home.
For good measure, I also renamed /home and then installed 12.04 beta 1 without formatting target partition - went smoothly.

Hope this is useful.

Revision history for this message
John McCabe-Dansted (gmatht) wrote :

How long is forever? It appears to freeze for me on 12.04 beta 1 (x86, atom based netbook), and will not respond to clicks on the skip button, but unfreezes after an hour or so. Top reports it spends a lot of time switching between 100% CPU for dpkg-deb and dpkg-repack.

Revision history for this message
Michael Lager (mrzx4l98d4tp89jab6giohdrjqysbyjs4npz2ccq25kvjmf5h8u4cmidcko7s4tfr6ur1te-ubuntu) wrote :

How log? It just took overnight .. so I gave up and will try something else.

Revision history for this message
Ivan Popivanov (ivan-popivanov) wrote :

Hit the same problem on 12.04, both Ubuntu and Kubuntu.

Revision history for this message
Ivan Popivanov (ivan-popivanov) wrote :

My /var is not custom, my old install uses two partitions - "/" and swap. The new install adds an extra partition for /home. Didn't want to format "/" to save time after the install. Out of luck I guess.

Revision history for this message
Audun Gangsto (audun-m) wrote :

Seriously, this is still a problem.
I just tried it now and I have to format my partitions. This really sucks.

Revision history for this message
Ingo Lafrenz (curly060) wrote :

I can still confirm the bug. I gave a very detailed description and reproducable steps. It is a shame that there is not even a comment on this.

Revision history for this message
Justin (justin-acklin) wrote :

This bug still exists as of 13.04. I'm simply installing to / on a hard drive that hard a partial 13.04 install and many applications so I don't want to format.

Revision history for this message
Justin (justin-acklin) wrote :

Never mind it just suddenly jumped to 91% while is was looking through the logs

Revision history for this message
Matt McLeish (childofmaud) wrote :

For the record, I had this same problem installing 13.04 over a previous installation. After letting it run for 10 minutes I decided to go online to read about it. After reaching the end of this post, it suddenly began working. It took at least 20 minutes.

I guess time does heal all wounds?

Revision history for this message
Stuart Shelton (srcshelton) wrote :

This problem still affects the 12.04 LTS distribution - with entirely blank filesystems (formatted with custom options) the installer did not progress past "Saving installed packages" when left over the weekend.

Dropping to the shell and creating a 'var' directory on the intended root filesystem by hand and restarting the process allowed the installer to progress past this stage.

tags: added: saucy
Revision history for this message
Sergio Benjamim (sergio-br2) wrote :

It still happens in Saucy, I have one HDD and a SSD, I tried it:

HDD:
/dev/sda1
/dev/sda2 - linux-swap
/dev/sda3 - /var
/dev/sda4 -
/dev/sda5 -
/dev/sda7 - /home

SSD:
/dev/sdb1 - EFI
/dev/sdb2 - /boot
/dev/sdb3 - /

And the install hangs... then, I did use /var in a separate partition, and ubuntu did the install, normally.

Is this problem still happen in Trusty?

This is a serious problem, if one person has 2 hard disk, and one of them is SSD, it's a good idea to use /var in HDD, to try increase the lifetime of the SSD.

Revision history for this message
Sergio Benjamim (sergio-br2) wrote :

I can reproduce this in xubuntu daily 2013/12/16.

If Canonical wants to improve SSD support (like i saw with Trim stuffs), I think it is a good idea to see that problem.

tags: added: trusty
tags: added: ubiquity-2.17.1
removed: ubiquity-2.8.7
Revision history for this message
Sergio Benjamim (sergio-br2) wrote :
description: updated
tags: removed: running-unity
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/875343

tags: added: iso-testing
Revision history for this message
Sergio Benjamim (sergio-br2) wrote :

The problem in Trusty, take a look at the picture.

Changed in ubiquity (Ubuntu):
importance: Undecided → Critical
Changed in ubiquity (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

Critical seems higher than necessary, given that some changes to a default install are necessary to encounter this bug.

Changed in ubiquity (Ubuntu):
importance: Critical → High
Revision history for this message
Brian Candler (b-candler) wrote :

I had this problem when installing 14.04 desktop amd64.

I had configured LVM as per
http://ubuntuforums.org/showthread.php?t=1782296
and had not marked any partitions apart from /boot for formatting (because I'd already formatted them with mkfs.ext4)

It did warn me that it would overwrite any system directories like /etc, /lib etc - which is no problem. But it hung at the "Saving installed packages..." step.

I rebooted and told the installer to format all partitions, and then it was OK.

Revision history for this message
Christian Reis (kiko) wrote :

I've just been able to reconfirm the problem with both the server and desktop installs. Interestingly on the server install I get an actual failure, but on the desktop install it hangs as per the bug description.

My setup was / on /dev/sdb1 (part of a pre-created btrfs raid1 array) and /var on /dev/sdb3 (part of a second array). I indicated that /dev/sda1 and /dev/sda3 were / and /var, respectively. I asked the partitioner not to format the drives.

Mounting / and creating /var, worked fine for me as a workaround.

Revision history for this message
Alexander Lopez (xantech) wrote :

So, from what I can deduce from this thread is that there is an issue with the installer... The developers at Ubuntu are fully aware of it... Yet they chose to do nothing to rectify it. Are they competing with Microsoft to drop the ball now?

Revision history for this message
distributist (hugh-ranalli) wrote :

Just to note, still occurring in utopic. I left the installer overnight with no progress. I have existing RAID partitions and two LVM containers, home and var.

After killing the first installer, I tried mounting the root partition and simply created a /var directory in it, unmounted it and restarted the install, which worked fine after that.

tags: added: utopic
Revision history for this message
David Kergyl (dcargille) wrote :

I experienced this problem today on a re-installation of Mint 17.2, over existing, separated \var and other partitions, without checking the "format partition" check-boxes. It is a re-installation of Mint on SDB (hard drive 1) after a clean installation of Windows 10 on SDA (hard drive 0).

I tried "ubiquity -d" but "Ubitquity is already running!"
sudo apport-collect 875343 -- apport-collect was not found.

- Installer hangs forever
+ Stuck at "Saving installed packages..." when using a custom /var

Revision history for this message
dsainty (dsainty) wrote :

Also seeing 100% CPU for tens of seconds (E.g. I just saw it run for over 2 minutes) in dpkg-deb, followed by a few seconds in dpkg-recheck.

I have none of the separate partitions people talk about. One single root partition. Couldn't be simpler.

This only seemed to happen after reinstalling over a previous failed installation, when the installer crashed on me. First install ran fast but crashed at the end. Second attempt is slow to the point that it isn't clear if any progress is being made.

Revision history for this message
dsainty (dsainty) wrote :

Unlike other people, my installation did eventually complete. It just took several hours (around 5 hours, I think) to get past the "Saving installed packages" stage. Kubuntu 14.04.3.

Revision history for this message
Ponchietto (ponchio) wrote :

15.10 here, same bug, trying to install preserving /home.

Revision history for this message
MasterCATZ (mastercatz) wrote :

Still the same trying to install
 Ubuntu 16.04 LTS "Xenial Xerus"
 over
Ubuntu 14.04 LTS 'Trusty"

as the upgrade failed ( would only do partial )

Revision history for this message
MasterCATZ (mastercatz) wrote :

Allowing it to format the /Var partition it started installing system , minor losses

/boot
/
/Home
/Var
/Tmp

partitions used

Revision history for this message
Alex (sove) wrote :

Five years later, perhaps Canonical should look into this?

Revision history for this message
Andrew (amasiye313) wrote :

...and, I guess I'm joining the list of despondent users hoping that this issue had been resolved in the five years since the original post only to scroll down to disappointment.

Revision history for this message
xennex82 (xennex82) wrote :

It's just incredible isn't it.

Something that someone could probably solve in 30 minutes, and it cost me another hour.

Multiply that with all the people being affected by this, and you will realize how inefficient this system is.

Revision history for this message
Thomas Sisson (thomas-sisson-1) wrote :

I'm using the Live CD install. Has anyone run the installer in debug mode? I'm attaching files from /var/log/syslog
/var/log/partman
/var/log/installer

Tom

By the way, I tried to log in using Links, but it kept telling me I was a bot. I guess it can't do the verification (no Javascript?).

Revision history for this message
Pixy Yuan (pixy-bupt) wrote :

I was stuck here, too. I delete all these old directories like '/usr /lib /var...' except '/home' on the target partition, then it works.

Revision history for this message
Robert Purser (pegasusturbo) wrote :

Hi Guys,

I would just like to say that although its annoying that a bug has been going for so long and i have just come across it, but thanks to people posting workarounds im finally updating my 12.04 laptop to 16.04.

Revision history for this message
Sergio Benjamim (sergio-br2) wrote :

Wow, still happens in 17.04

tags: added: zesty
Revision history for this message
Brad Schaffer (schafferbrad) wrote :

I apologize if this is off topic, my intent is to help, and offer something that may be a work around.

During an upgrade from 18.1 Mate to 18.2 Mate, I got caught in “Saving installed packages” too.

Pixy Yuan (pixy-bupt) #41 is right, delete everything but /home by way of sudo’ed file browser. I also delete most .xxx files - if you keep .remmina and the like - you don’t have to re-invent the wheel, but get rid of the standard system hidden files in /home/username/

Install shifted into copying files directly. No wait. Full Mate install in under 10 minutes on a Dell Lattitude D610 - Pentium M single core 1.1 gig CPU

I thank my friend Jason for showing me this, many years ago, and wanted to share. NOTE - I did not have /var in a custom spot, thus the apology in the first line.

Brad

Revision history for this message
k3dar7 (k3dar7) wrote :

after 7 years... problem still exists in 18.10...

what is problem for fixing this? already is found problem:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/875343/comments/8

only is need add: mkdir -p "$mountpoint/var"

Revision history for this message
Marco Gamberoni (gamberoni) wrote :

Installing from scratch Ubuntu 18.10, with a customised full disk encryption partitioning scheme.
After setting up separate encrypted volumes with new filesystems for these mountpoints:
   / /boot /home swap
I started
   ubiquity
and forgot -b so it completed fast but crashed at end (it is a known bug: on a FDE setup -b is needed, grub must be installed after configuring GRUB_ENABLE_CRYPTODISK=y in /etc/default/grub).
So, I restarted with the switch
   ubiquity -b
and met this "bug". Which isn't, at least in one, my, case. It's a "feature": finding an existing installation, ubiquity uses dpkg-repack to save the customisations and transport them to the new installation; this takes very long time, enough to find and read the preceding 45 posts...
In case of a new installation, kill ubiquity and restart recreating empty filesystems is quicker than waiting the repacking of the whole release.

OTOH, there seems to be also real bug described here: when /var is a mountpoint.

Rethinking, there are 2 bugs. One is in front of the keyboard. Those who want to keep the existing customised configuration should not reinstall, but should should perform a
   do-release-upgrade
Catering for those who reinstall but want to keep previous settings is a bug, I say.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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