summaryrefslogtreecommitdiffstats
path: root/features/usb_install.feature
blob: dfc15b6e362403b5de42e1a95dd4a06990ef0464 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@product
Feature: Installing Tails to a USB drive
  As a Tails user
  I want to install Tails to a suitable USB drive

# XXX: rename to tails_installer.feature and move things that don't use Tails
# Installer elsewhere?

  Scenario: Try installing Tails to a too small USB drive without partition table
    Given I have started Tails from DVD without network and logged in
    And I temporarily create a 4500 MiB disk named "too-small-device"
    And I start Tails Installer
    But a suitable USB device is not found
    And no USB drive is selected
    When I plug USB drive "too-small-device"
    Then I am told by Tails Installer that the destination device "is too small"
    And no USB drive is selected
    When I unplug USB drive "too-small-device"
    And I temporarily create a 7200 MiB disk named "big-enough"
    And I plug USB drive "big-enough"
    Then the "big-enough" USB drive is selected

  Scenario: Try installing Tails to a too small USB drive with GPT and a FAT partition
    Given I have started Tails from DVD without network and logged in
    And I temporarily create a 4 GiB disk named "gptfat"
    And I create a gpt partition with a vfat filesystem on disk "gptfat"
    And I plug USB drive "gptfat"
    When I start Tails Installer
    Then I am told by Tails Installer that the destination device "is too small"

  Scenario: Detecting when a target USB drive is inserted or removed
    Given I have started Tails from DVD without network and logged in
    And I temporarily create a 7200 MiB disk named "temp"
    And I start Tails Installer
    But a suitable USB device is not found
    When I plug USB drive "temp"
    Then the "temp" USB drive is selected
    When I unplug USB drive "temp"
    Then a suitable USB device is not found

  Scenario: Installing Tails to a used USB drive
    Given I have started Tails from DVD without network and logged in
    And I temporarily create a 7200 MiB disk named "install"
    And I create a gpt partition with a vfat filesystem on disk "install"
    And I plug USB drive "install"
    And I install Tails to USB drive "install" by cloning
    Then the running Tails is installed on USB drive "install"
    But there is no persistence partition on USB drive "install"

  Scenario: Installing Tails to a pristine USB drive
    Given I have started Tails from DVD without network and logged in
    And I temporarily create a 7200 MiB disk named "install"
    And I plug USB drive "install"
    And I install Tails to USB drive "install" by cloning
    Then the running Tails is installed on USB drive "install"
    But there is no persistence partition on USB drive "install"

  Scenario: Re-installing Tails over an existing USB installation with a persistent partition
    # We reach this first checkpoint only to ensure that the ' __internal' disk has reached the state (Tails installed + persistent partition set up) we need before we clone it below.
    # This first part is done without Tails Installer (install from Tails USB image)
    # Note: the "__internal" disk will keep its state across scenarios
    # and features until one of its snapshots is restored.
    Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
    Given I have started Tails from DVD without network and logged in
    And I clone USB drive "__internal" to a temporary USB drive "install"
    And I plug USB drive "install"
    # This second part is done with Tails Installer, that's what this scenario is about
    When I reinstall Tails to USB drive "install" by cloning
    Then the running Tails is installed on USB drive "install"
    And there is no persistence partition on USB drive "install"

  Scenario: Booting Tails from a USB drive without a persistent partition and creating one
    Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
    And I log in to a new session
    When I create a persistent partition
    Then a Tails persistence partition exists on USB drive "__internal"

  Scenario: Booting Tails from a USB drive without a persistent partition
    Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
    When I log in to a new session
    Then Tails is running from USB drive "__internal"
    And the persistent Tor Browser directory does not exist
    And there is no persistence partition on USB drive "__internal"

  #13459
  @fragile
  Scenario: Booting Tails from a USB drive in UEFI mode
    Given I have started Tails without network from a USB drive without a persistent partition and stopped at Tails Greeter's login screen
    Then I power off the computer
    Given the computer is set to boot in UEFI mode
    When I start Tails from USB drive "__internal" with network unplugged and I login
    Then the boot device has safe access rights
    And Tails is running from USB drive "__internal"
    And the boot device has safe access rights
    And Tails has started in UEFI mode

  Scenario: Installing Tails to a USB drive with an MBR partition table but no partitions, and making sure that it boots
    Given I have started Tails from DVD without network and logged in
    And I temporarily create a 7200 MiB disk named "mbr"
    And I create a msdos label on disk "mbr"
    And I plug USB drive "mbr"
    And I install Tails to USB drive "mbr" by cloning
    Then the running Tails is installed on USB drive "mbr"
    But there is no persistence partition on USB drive "mbr"
    When I shutdown Tails and wait for the computer to power off
    And I start Tails from USB drive "mbr" with network unplugged and I login
    Then Tails is running from USB drive "mbr"
    And the boot device has safe access rights
    And there is no persistence partition on USB drive "mbr"

  Scenario: Writing a Tails isohybrid to a USB drive and booting it, then installing Tails on top of it using Tails Installer, and it still boots
    Given a computer
    And I temporarily create a 7200 MiB disk named "isohybrid"
    And I write the Tails ISO image to disk "isohybrid"
    And I start Tails from USB drive "isohybrid" with network unplugged and I login
    Then Tails is running from USB drive "isohybrid"
    When I shutdown Tails and wait for the computer to power off
    And I start Tails from DVD with network unplugged and I login
    And I install Tails to USB drive "isohybrid" by cloning
    Then the running Tails is installed on USB drive "isohybrid"
    But there is no persistence partition on USB drive "isohybrid"
    When I shutdown Tails and wait for the computer to power off
    And I start Tails from USB drive "isohybrid" with network unplugged and I login
    Then Tails is running from USB drive "isohybrid"
    And the boot device has safe access rights
    And there is no persistence partition on USB drive "isohybrid"

  Scenario: The system partition is updated when booting from a USB drive where a Tails USB image was copied
    Given a computer
    And I temporarily create a 7200 MiB disk named "usbimage"
    And I write the Tails USB image to disk "usbimage"
    And I start Tails from USB drive "usbimage" with network unplugged and I login
    Then Tails is running from USB drive "usbimage"
    And the label of the system partition on "usbimage" is "Tails"
    And the system partition on "usbimage" is an EFI system partition
    And the FAT filesystem on the system partition on "usbimage" is at least 4000M large
    And the UUID of the FAT filesystem on the system partition on "usbimage" was randomized
    And the label of the FAT filesystem on the system partition on "usbimage" is "TAILS"
    And the system partition on "usbimage" has the expected flags