Project

General

Profile

Bug #14755

Feature #9005: Improve Tails Installer UX: phase 1

Tails Installer treats drives differently depending on when they are plugged

Added by anonym 2 months ago. Updated 27 days ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
Installation
Target version:
Start date:
10/02/2017
Due date:
% Done:

100%

QA Check:
Pass
Feature Branch:
tails:bugfix/14755-installer-consistent-drive-plugging-state
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Installer

Description

E.g. it matters if the drive is plugged before or after Tails installer is started.

It was reported on Reddit that if the drive was plugged before starting Tails Installer, installation failed with:

Partitioning device /dev/sdc1

GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error creating file system: Command-line `parted --script "/dev/sdc1" mktable gpt' exited with a non-zero exit status 1: Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 on /dev/sdc1 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes. Tails installation failed!

udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error creating file system: Command-line `parted --script "/dev/sdc1" mktable gpt' exited with a non-zero exit status 1: Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 on /dev/sdc1 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.

(0)

It was resolved when they "[started] Utilities -> Disks, reformatted the drive, unplugged it, started the Tails installer, then plugged it back in".

This is a regression introduced in Tails Installer 4.4.19 and Tails 3.2~rc1. It certainly sounds like an inconsistency on how the installer is initialized vs how it reacts to changes (of plugging/unplugging drives).

output.txt View (21.6 KB) cypherpunks, 10/18/2017 12:41 PM

Associated revisions

Revision 2f5d78f3 (diff)
Added by anonym about 1 month ago

Test suite: try installing Tails to an eligible drive with an existing filesystem.

This is a regression test for #14755.

Refs: #14755

Revision 1379b8fb (diff)
Added by anonym about 1 month ago

Apply fix for #14755 via a patch.

Will-fix: #14755

Revision 1b276dbc (diff)
Added by anonym about 1 month ago

Enable APT overlay installing a Tails Installer 5.0.2.

Note that I also remove an APT overlay because it contains a now
obsolete Tails Installer (5.0.2 has the fix for #14809).

Will-fix: #14721, #14722, #14723, #14755

Revision ddc95fba
Added by intrigeri about 1 month ago

Merge branch 'bugfix/14755-installer-consistent-drive-plugging-state' into stable (Fix-committed: #14755, #14721, #14722, #14723)

History

#1 Updated by anonym 2 months ago

  • Priority changed from Normal to Elevated
  • Parent task set to #9005

Reparenting to #9005 since it must be a regression introduced in that work. Also raising priority vs the other children of #9005, since this is an actual regression affecting users out there.

#2 Updated by cypherpunks about 2 months ago

I reproduced the bug. So what I did:
1. Booting a 16 GB JetFlash Transcend usb-stick with final Tales on it.
2. First plug in my second usb-stick (32 GB JetFlash Transcend, "W95 FAT32 (LBA) formatted", no data on it).
3. Afterward execute "tails-installer --verbose" from the command line.
4. GUI: Keep the standard checkbox "clone the current Tails" and keep standard drop-down choice for 32 GB JetFlash usb-stick.
5. GUI: Press install and confirm the target usb-stick.
6. Installation fails with an error "Error creating file system".

I put the log as attachement (three of my pc's further devices are anonymized as "XXX1" up to "XXX3"). Note I also managed to clone Tails if I first started the Tails installer and then plugged in the second usb-stick.

#3 Updated by sg611 about 2 months ago

The solution I found and someone else said worked for them was to delete the partition and then run the installer.
https://www.reddit.com/r/tails/comments/735fss/error_creating_file_system_when_installing_tails/doumgmj/

#4 Updated by sg611 about 2 months ago

I meant to say delete all partitions on the target flash drive that you are preparing to install Tails onto.

#5 Updated by cypherpunks about 1 month ago

I experienced the same error message when trying to use Tails Installer to clone Tails from an intermediary DVD to a USB stick on an older iMac running 10.10. A quick Google search turned up bnuo's Reddit post. AbandonedMantis' proposed solution worked for me.

An easy solution is to flip the order of the instructions so that it would read:

1. Choose Applications > Tails > Tails Installer to start Tails Installer.

2. Plug the USB stick in the computer.

#6 Updated by intrigeri about 1 month ago

  • Assignee changed from anonym to kurono

kurono, do you want to take a look?

#7 Updated by intrigeri about 1 month ago

  • Priority changed from Elevated to High

At the foundations team / help desk meeting today this was classified as high priority: it seems to be the cause for ~60% of the reports received by help desk these days.

#8 Updated by anonym about 1 month ago

  • Assignee changed from kurono to anonym

I'll give this one a try.

#9 Updated by goupille about 1 month ago

Someone reported that formatting the USB stick didn't fix the issue. Instead, this user had to delete the partition (and do the unplug/plug thing) to work around the issue.

#10 Updated by intrigeri about 1 month ago

Someone reported that formatting the USB stick didn't fix the issue. Instead, thins user had to delete the partition (and do the unplug/plug thing) to work around the issue.

I suspect they formatted the partition (i.e. filesystem) and not the USB stick: "formatting" a USB stick creates a new, empty partition table, so there's no way one can "delete the partition" after having formatted the USB stick.

#11 Updated by anonym about 1 month ago

  • Status changed from Confirmed to In Progress
  • Assignee changed from anonym to intrigeri
  • % Done changed from 0 to 50
  • QA Check set to Ready for QA
  • Feature Branch set to installer:bugfix/14755-consistent-drive-plugging-state

#12 Updated by intrigeri about 1 month ago

kurono, you're the force_reinstall master here. Do you think you could have a look at anonym's branch (ideally, once yours has been merged and anonym has resolved conflicts) e.g. tonight or tomorrow morning? If not, no big deal, I won't block on this anyway.

#13 Updated by kurono about 1 month ago

intrigeri wrote:

kurono, you're the force_reinstall master here. Do you think you could have a look at anonym's branch (ideally, once yours has been merged and anonym has resolved conflicts) e.g. tonight or tomorrow morning? If not, no big deal, I won't block on this anyway.

ok, I will take a look.

#14 Updated by intrigeri about 1 month ago

  • Feature Branch changed from installer:bugfix/14755-consistent-drive-plugging-state to installer:bugfix/14755-consistent-drive-plugging-state, bugfix/14755-installer-consistent-drive-plugging-state

#15 Updated by intrigeri about 1 month ago

kurono wrote:

ok, I will take a look.

Excellent :) I'll ping you here once it's time.

#16 Updated by intrigeri about 1 month ago

  • Assignee changed from intrigeri to anonym
  • QA Check changed from Ready for QA to Dev Needed

#17 Updated by anonym about 1 month ago

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Dev Needed to Ready for QA
  • Feature Branch changed from installer:bugfix/14755-consistent-drive-plugging-state, bugfix/14755-installer-consistent-drive-plugging-state to tails:bugfix/14755-installer-consistent-drive-plugging-state

I've optimistically built and prepared Tails Installer 5.0.2 in hope it's good enough for Tails 3.3. This release solves:

It does not solve #14720 due to #14720#note-11, so Tails Installer 5.0.2 simply skips one of kurono's commits.

Any way, a Tails build with Tails Installer 5.0.2 passes:

  • features/usb_install.feature
  • features/usb_upgrade.feature
  • features/persistence.feature

which now includes two new scenarios:

  • Installing Tails to a used USB drive (regression test for this ticket, #14755)
  • Re-installing Tails over an existing USB installation with a persistent partition

so I'm hopeful!

#18 Updated by intrigeri about 1 month ago

Code review passes. I've verified that the newly added regression test for this bug fails when run on a 3.2 ISO. I'll do a little bit of exploratory testing on Tails and Debian before merging.

#19 Updated by intrigeri about 1 month ago

  • Status changed from In Progress to Fix committed
  • % Done changed from 50 to 100

#20 Updated by intrigeri about 1 month ago

  • Assignee deleted (intrigeri)
  • QA Check changed from Ready for QA to Pass

I've trusted anonym's test suite run and tested quite some use cases on Debian. Worked fine, the resulting sticks boot fine on a ThinkPad X200 and a MacBook Pro 8,1. Congrats!

#21 Updated by anonym 27 days ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF