When re-installing Ubuntu on a partition where an existing Ubuntu installation already exists, and not choosing to format the partition, the installer shows a warning message before it begins installing:
The file system on /dev/sda5 assigned to / has not been marked for formatting. Directories containing system files (/etc, /lib, /usr, /var, ...) that already exist under any defined mountpoint will be deleted during the install.
Please ensure that you have backed up any critical data before installing.
The list of "system directories" here does not seem complete. Furthermore, I would expect /home to be a system directory, but from experience I know that /home is not erased.
What is the complete list of directories that will be removed during install?
I wasn't able to find a hardcoded list in the ubiquity source code. The documentation says that partitioning is handled by d-i (debian installer) code to avoid duplication and maintenance effort. But I wasn't able to find an answer in the related packages or the Debian documentation.
Fortunately
/var/log/syslog
, respectively/var/log/installer/syslog
post installation, contains useful information about ubiquity and the installation process. Here is an excerpt from a 12.04 install over a 12.04 install in my VM:Basically the directories bin, dev, etc, lib, lib32, lib64, proc, sbin and sys are deleted as are the contents of usr and var (/usr/local and /var/local seem to be an exception, but test folders I had in usr and var were deleted). The boot directory does not seem to be deleted and is just overwritten by the packages related to grub and the kernel.
I'm pretty annoyed at ubiquity right now. I told 15.04beta2's installer to use
/
on araid10f2
md device, without formatting. Fine, I'd already done a mkfs.xfs on that device. I also told it to use my existing/home
and/var/tmp
md
devices, without formatting./home
survived, but my/var/tmp
is now empty!What the hell? It's a well-defined place to store persistent user data. I didn't lose anything that I can't find and re-download, or back up again from other machines, but it's very uncool. I didn't think the warning dialog was even talking about partitions other than the root filesystem. (I thought I would have gotten another warning for the device to be mounted on
/var/tmp
specifically, if it was going to be mounted somewhere that wasn't safe from therm -r
.)I knew there was a slight risk telling the installer about my other filesystems, instead of just editting fstab later, but this is just dumb.
so anyway, the list of directories that Ubiquity blows away includes
/var/tmp
, but not/home
.Opened https://bugs.launchpad.net/ubuntu-manual-tests/+bug/1445196