Project

General

Profile

Bug #7678

Tails Installer crashes on upgrade if cruft files with same name are present on both sides

Added by sajolida over 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Installation
Target version:
Start date:
07/28/2014
Due date:
% Done:

100%

Feature Branch:
liveusb-creator:bugfix/7678-Tails-Installer-crashes-on-upgrade
Type of work:
Code
Blueprint:
Starter:
Yes
Affected tool:
Installer

Description

On upgrade, if both the source and destination USB sticks contain files with the same name, that are not part of what's normally on a Tails USB stick, then Tails Installer crashes with:

ERROR:liveusb.creator:[Errno 17] File exists: '/media/Tails/$filename Information'

This is because on upgrade, Tails Installer first removes all expected files (liveos_toplevel_files) from the destination, and then extract (when upgrading from ISO) or copies (when "clone and upgrade") all files from the source device to the destination one.

We could workaround this by deleting all files on the destination, when a file called the same name is on the source too. But this might lead to the personal data of the user, which our Installer has always been very careful about: it may not be that clear to users that they should not store any personal files on the system partition.

But, some filenames might clearly not be personal data and could then be treated as a special case, if they were created automatically by some operating system for example, then we could:

  • either by unconditionally removing it from the destination before copying files;
  • or by skipping it when copying files.

A better approach, that would avoid the need to list all these special cases, could be to copy only liveos_toplevel_files from the source on "clone and upgrade". Given the files with these names were removed already from the destination device, no conflict should arise :)

(Long term, this calls for a MANIFEST file in the ISO filesystem, that would avoid having to encode this information in the Tails Installer source code, but oh well, this can wait.)


Related issues

Related to Tails - Bug #6783: Test whether Windows installation method creates unexpected files Resolved 02/26/2014

History

#1 Updated by intrigeri over 5 years ago

  • Subject changed from Tails Installer crashes if identical filenames are present on both sides to Tails Installer crashes on upgrade if cruft files with same name are present on both sides
  • Description updated (diff)
  • Type of work changed from Research to Code
  • Starter changed from No to Yes

#2 Updated by intrigeri over 5 years ago

  • Related to Bug #6783: Test whether Windows installation method creates unexpected files added

#3 Updated by intrigeri over 5 years ago

  • Assignee set to kurono
  • Priority changed from Low to Normal

After reading #6783 again, I think that this bug is triggered when doing "clone and upgrade" from one device created with the Universal USB Installer, to another one that was also created with the UUI. Since nothing in our documentation says that it's not a supported use case, I'm bumping the priority of this ticket: something is broken even if the user doesn't do anything crazy and unsupported.

kurono, want to give it a try?

#4 Updated by kurono over 5 years ago

ok I'll take it.

#5 Updated by sajolida over 5 years ago

For example, we received a bug report by someone having a "System Volume Information" folder on both USB stick. According to support.microsoft.com, "the System Volume Information folder is a hidden system folder that the System Restore tool uses to store its information and restore points". So this should be treated as a metadata folder, not containing any personal data.

https://support.microsoft.com/kb/309531

#6 Updated by kurono about 5 years ago

  • Assignee deleted (kurono)
  • Target version set to Tails_1.2.1
  • QA Check set to Ready for QA
  • Feature Branch set to bugfix/7678-Tails-Installer-crashes-on-upgrade

#7 Updated by intrigeri about 5 years ago

  • Target version changed from Tails_1.2.1 to Tails_1.3

Too late for getting this tested enough in time for 1.2.1 IMO.

#8 Updated by anonym about 5 years ago

  • Target version changed from Tails_1.3 to Tails_1.2.2

It should go into the next release, though.

#9 Updated by intrigeri about 5 years ago

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 50

#10 Updated by anonym about 5 years ago

  • Target version changed from Tails_1.2.2 to Tails_1.2.3

#11 Updated by alant about 5 years ago

  • Assignee set to kurono
  • QA Check changed from Ready for QA to Dev Needed
  • Feature Branch changed from bugfix/7678-Tails-Installer-crashes-on-upgrade to liveusb-creator:bugfix/7678-Tails-Installer-crashes-on-upgrade

Thanks for the patch which I imported into liveusb-creator repository in the feature branch.

I confirm the patch fixes the issue.

A tiny comment though: as toplevels is only used once, so why not to write one less line:

-        toplevels = config['liveos_toplevel_files']
-        for f in toplevels:
+        for f in config['liveos_toplevel_files']:

#12 Updated by intrigeri about 5 years ago

  • % Done changed from 50 to 60

#13 Updated by BitingBird about 5 years ago

  • Affected tool set to Installer

#14 Updated by kurono about 5 years ago

  • Assignee deleted (kurono)
  • QA Check changed from Dev Needed to Ready for QA

I did the small fix.

#15 Updated by intrigeri about 5 years ago

  • Assignee set to anonym

#16 Updated by anonym about 5 years ago

  • Assignee changed from anonym to intrigeri

Delegating to intrigeri.

#17 Updated by intrigeri about 5 years ago

  • Assignee changed from intrigeri to kurono
  • Target version changed from Tails_1.2.3 to Tails_1.3
  • % Done changed from 60 to 70
  • QA Check changed from Ready for QA to Dev Needed

Tails Installer from current kurono branch fails with global name 'config' is not defined. I guess that's because from liveusb.config import config (which was initially in that branch) was removed, for some strange reason, when that branch's history was rewritten. Seems easy to fix, but we're already late for the release, so postponing to 1.3.

In the future, please do test the code you're proposing for merging. Thanks in advance :)

#18 Updated by kurono about 5 years ago

  • Assignee deleted (kurono)
  • QA Check changed from Dev Needed to Ready for QA

Fix done.

#19 Updated by intrigeri about 5 years ago

  • Status changed from In Progress to 11
  • % Done changed from 70 to 100
  • QA Check changed from Ready for QA to Pass

Thanks! Reviewed, tested, works for me. Merged into Tails Installer master branch => will be in Tails 1.3. Not bothered building and uploading a .deb, though.

#20 Updated by BitingBird almost 5 years ago

  • Status changed from 11 to Resolved

Also available in: Atom PDF