Calamares mounts existing partition at /tmp/calamares-xxxx and deletes contents

calamares
manjaroiso
mount

#1

I have found a serious problem now @philm
I started Calamares to install to disk and reviewing the partitions for safety I realised that it had mounted an existing partition of another install, having everything deleted inside!!
And now I connect this with what I had regrettably noticed a week ago. I had the same partition empty with no apparent reason. And this must have happened when booting another ISO on USB.
I can’t remember if I had or not used Calamares then, or It was just used by the ISO as /tmp
Here is my lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0   1,7G  1 loop /run/miso/bootmnt
loop1    7:1    0  67,5M  1 loop /run/miso/sfs/livefs
loop2    7:2    0 288,5M  1 loop /run/miso/sfs/mhwdfs
loop3    7:3    0 955,6M  1 loop /run/miso/sfs/desktopfs
loop4    7:4    0 396,5M  1 loop /run/miso/sfs/rootfs
sda      8:0    0 298,1G  0 disk 
├─sda1   8:1    0  68,4G  0 part /run/media/petros/214cdfbb-b2d3-4428-8b4c-7039d
├─sda2   8:2    0     1K  0 part 
├─sda5   8:5    0 161,4G  0 part /run/media/manjaro/LARGE
├─sda6   8:6    0  30,2G  0 part 
├─sda7   8:7    0  34,2G  0 part /tmp/Calamares-TqYRNd
└─sda8   8:8    0     4G  0 part 
sdb      8:16   0 232,9G  0 disk 
├─sdb1   8:17   0  29,3G  0 part 
├─sdb2   8:18   0  29,3G  0 part /run/media/manjaro/Testing
├─sdb3   8:19   0  29,3G  0 part 
├─sdb4   8:20   0     1K  0 part 
└─sdb5   8:21   0   145G  0 part 
sdc      8:32   0   4,6T  0 disk 
├─sdc1   8:33   0   128M  0 part 
├─sdc2   8:34   0  97,7G  0 part /run/media/manjaro/Seagate Expansion Drive
└─sdc3   8:35   0   4,5T  0 part /run/media/manjaro/LINUX45
sdd      8:48   0   1,8T  0 disk 
└─sdd1   8:49   0   1,8T  0 part /run/media/manjaro/H_BACKUP
sde      8:64   1  14,7G  0 disk 
├─sde1   8:65   1     1M  0 part 
├─sde2   8:66   1    50M  0 part /run/media/manjaro/6C7D-6A10
├─sde3   8:67   1  10,7G  0 part /run/miso/img_dev
└─sde4   8:68   1     4G  0 part /run/media/manjaro/MSDCdata


So it’s the ISO (during system start) that must have done it.
I have a previous Timeshift backup of the partition that I have reverted and now (luckily?) I have to do it again.


Dual Boot Partition suddenly erased
Windows deleted
A content of the entire system partition has been deleted
Manjaro v17.1-rc3 feedback thread
Manjaro v17.1-rc3 feedback thread
#2

Well, I recommend to use rc4 as rc3 can’t properly install. There is a known bug with it.


#3

I saw this bug and it is for Calamares.
I think this is not relevant.
I am still logged in to the ISO.
Could I gather any useful info about that?
Now I am not at the least confident to boot again another Manjaro ISO live and to have this tested you need to create a similar setup on a VM?


#4

@petsam: CAL doesn’t delete any files when you are at the summary page. You have to press on OK before anything get started on formatting. It is recommended to start CAL in debug mode and paste the log if some fishy is happening: sudo -E calamares -d


#5

You didn’t get it.
It is NOT Calamares.
It’s the ISO /temp that is used from start

ls /tmp


44AACZ.shell-extension.zip
Calamares-TqYRNd
DA5CCZ.shell-extension.zip
YD0RBZ.shell-extension.zip
libgksu-jfu6aC
mozilla_manjaro0
mozilla_petros0
pamac-app-screenshots
pamac-checkdbs
qipc_sharedmemory_Calamaresb48b141030f936144178afffc4a0c6ec7eb94acf
qipc_sharedmemory_MSMNotifier1982c3c75cbed4786bc185973fce6242a7b208b8
qipc_systemsem_Calamaresb48b141030f936144178afffc4a0c6ec7eb94acf
qipc_systemsem_MSMNotifier1982c3c75cbed4786bc185973fce6242a7b208b8
runtime-root
spacefm-petros-71e0a0a1.tmp
spacefm.tmp
systemd-private-7b742e426e1e43d6b23f0aedb9453eec-colord.service-Fhzic3
systemd-private-7b742e426e1e43d6b23f0aedb9453eec-ntpd.service-2VsN2U
tmpaddon
tmpaddon-e2de40



#6

@petsam: be more specific about the issue you have with /tmp. What is it?


#7

Check this

Check the previous post with lsblk


#8

@petsam: still don’t get the issue here. What is it? Be more specific on what you expect or not expect.


#9

Check the timestamps.
Created time of calamares, of first item in /tmp and compare with the first created thing.
During boot of ISO it mounted an existing NOT EMPTY partition and erased all and used it as temp.


#10

At last I fount the ls params

ls -ltu /

σύνολο 45
drwxrwxrwt  21 root root   640 Δεκ  29 20:45 tmp
drwxr-x---   1 root root   200 Δεκ  29 17:49 root
drwxr-xr-x  27 root root   680 Δεκ  29 15:48 run
drwxr-xr-x   1 root root   660 Δεκ  29 15:43 etc
drwxr-xr-x   1 root root   140 Δεκ  29 15:20 usr
drwxr-xr-x   1 root root    80 Δεκ  29 15:12 home
drwxr-xr-x  20 root root  3920 Δεκ  29 14:31 dev
dr-xr-xr-x  13 root root     0 Δεκ  29 14:28 sys
dr-xr-xr-x 270 root root     0 Δεκ  29 14:28 proc
drwxr-xr-x   1 root root    50 Δεκ  26 11:44 opt
drwxr-xr-x   1 root root     3 Δεκ  26 11:43 boot
-rw-r--r--   1 root root 21147 Δεκ  26 11:43 livefs-pkgs.txt
drwxr-xr-x   1 root root   140 Δεκ  26 11:43 var
\-rw-r--r--   1 root root 19336 Δεκ  26 11:43 desktopfs-pkgs.txt
\-rw-r--r--   1 root root  4060 Δεκ  26 11:40 rootfs-pkgs.txt
drwxr-xr-x   4 root root    38 Δεκ  26 11:39 srv
lrwxrwxrwx   1 root root     7 Νοέ  27 20:29 bin -> usr/bin
lrwxrwxrwx   1 root root     7 Νοέ  27 20:29 lib -> usr/lib
lrwxrwxrwx   1 root root     7 Νοέ  27 20:29 lib64 -> usr/lib
drwxr-xr-x   2 root root     3 Νοέ  27 20:29 mnt
lrwxrwxrwx   1 root root     7 Νοέ  27 20:29 sbin -> usr/bin

ls -ltu /tmp

σύνολο 1564
drwx------ 2 root    root        80 Δεκ  29 19:53 libgksu-jfu6aC
-rw------- 1 petros  petros  525838 Δεκ  29 19:51 tmpaddon-e2de40
drwxrwxrwx 2 root    root     16384 Δεκ  29 19:51 Calamares-TqYRNd
drwxr-xr-x 2 petros  petros      40 Δεκ  29 19:49 spacefm-petros-71e0a0a1.tmp
-rw-r----- 1 root    root         0 Δεκ  29 19:45 qipc_sharedmemory_Calamaresb48b141030f936144178afffc4a0c6ec7eb94acf
-rw-r----- 1 root    root         0 Δεκ  29 19:45 qipc_systemsem_Calamaresb48b141030f936144178afffc4a0c6ec7eb94acf
drwx------ 2 root    root        40 Δεκ  29 19:45 runtime-root
drwxrwxrwx 2 manjaro manjaro     40 Δεκ  29 19:38 pamac-app-screenshots
-rw------- 1 petros  petros  174298 Δεκ  29 19:35 DA5CCZ.shell-extension.zip
drwx------ 2 petros  petros      40 Δεκ  29 19:28 mozilla_petros0
-rw------- 1 petros  petros  174298 Δεκ  29 19:23 YD0RBZ.shell-extension.zip
-rw-r----- 1 petros  petros       0 Δεκ  29 18:51 qipc_sharedmemory_MSMNotifier1982c3c75cbed4786bc185973fce6242a7b208b8
-rw-r----- 1 petros  petros       0 Δεκ  29 18:51 qipc_systemsem_MSMNotifier1982c3c75cbed4786bc185973fce6242a7b208b8
-rw------- 1 manjaro manjaro 174298 Δεκ  29 15:53 44AACZ.shell-extension.zip
drwx------ 2 manjaro manjaro     40 Δεκ  29 15:52 mozilla_manjaro0
drwxrwxrwt 2 root    root        60 Δεκ  29 15:11 spacefm.tmp
drwxr-xr-x 3 manjaro manjaro    100 Δεκ  29 15:07 pamac-checkdbs
drwx------ 3 root    root        60 Δεκ  29 15:02 systemd-private-7b742e426e1e43d6b23f0aedb9453eec-ntpd.service-2VsN2U
-rw------- 1 manjaro manjaro 525838 Δεκ  29 14:40 tmpaddon
drwx------ 3 root    root        60 Δεκ  29 14:30 systemd-private-7b742e426e1e43d6b23f0aedb9453eec-colord.service-Fhzic3



#11

That bit… if Calamares is actually mounting a partition under /tmp than there’s something very odd going on.


#12

Yet again, it’s NOT calamares.
The timestamps say /tmp was mounted at 14:30


#13

That’s a seperate mount of calamares. The system tmp was mounted hours before
OK I think I was wrong. It is calamares.


#14

OK, but the output of lsblk doesn’t show the partition mounted at /tmp.

Ah - so something in the iso’s startup process is randomly mounting a partition as /tmp?

This is odd, and a good catch.


#15

@petsam: I don’t get the problem here. manjaro-tools doesn’t mount any partition on boot up. Only a swap partition if it finds any. Also no erasing is done.


#16

Yes, I also realised it is indeed Calamares. Sorry for that.
But still it has made some damage.

├─sda7 8:7 0 34,2G 0 part /tmp/Calamares-TqYRNd


#17

One of his disk partitions (/dev/sda7) appears to have been mounted at /tmp/Calamares-TqYRNd. If this wasn’t user-initiated, and it leads to data loss, it’s almost definitely an issue.


#18

Expected behavior should be:
Check for existing /tmp, use that.
How could this not be done?


#19

@petsam: which ISO was used?

  • CAL shipped with rc3 was broken in regard of partition handling.
  • Also provide always a log for review. Action will always taken after the user presses OK.
  • In manual partition mode we don’t format right away. Only if you create a new partition table.

Which steps were done on your end?


#20

I had just entered in the manual partitioning screen. Then went around to double check for the correct partitions and found that it had used sda7
I still have it open

What log would be useful ?