在不格式化分区的情况下重新安装Ubuntu-删除了哪些文件夹?


8

当在已经存在现有Ubuntu安装的分区上重新安装Ubuntu且未选择格式化该分区时,安装程​​序会在开始安装之前显示警告消息:

/ dev / sda5上分配给/的文件系统尚未标记为格式化。在安装过程中,包含已定义的安装点下已存在的包含系统文件(/ etc,/ lib,/ usr,/ var,...)的目录将被删除。

在安装之前,请确保已备份所有关键数据。

这里的“系统目录”列表似乎并不完整。此外,我希望/ home是系统目录,但是根据经验,我知道/ home不会被擦除。

在安装过程中将删除的目录的完整列表是什么?


1
我的两分钱:/home/不是系统目录。如果在安装过程中创建的用户名与旧安装中的现有用户相同,则可能会删除旧目录。否则,它将只创建一个新的用户文件夹,而保留旧的用户文件夹。有些人有一个单独的主分区,并在重新安装时使用它。
adempewolff 2012年

1
实际上,使用与/home目录中已经存在的用户相同的用户名进行安装会在可能的情况下使用旧的用户名,并且不会覆盖任何内容(我在不到一个小时前:P进行了此操作)。但是/home据我所知,没有目录(至少包含一个用户目录)的Ubuntu安装将无法正常运行-因此,我将其称为/home系统目录。(推论:重新安装Ubuntu时,并非所有系统目录都会被删除!)
Tomas Aschan 2012年

Answers:


10

我无法在普遍存在的源代码中找到一个硬编码列表。该文档说,分区由di(debian安装程序)代码处理,以避免重复和维护工作。但是我无法在相关的软件包或Debian文档中找到答案。

幸运的是/var/log/syslog,分别/var/log/installer/syslog在安装后,包含有关普遍性和安装过程的有用信息。这是我的VM中12.04安装相对于12.04安装的摘录:

May 27 21:20:12 ubuntu ubiquity[8109]: switched to page partman
May 27 21:20:35  ubiquity[8109]: last message repeated 5 times
May 27 21:20:35 ubuntu kernel: [  598.116238] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
May 27 21:20:35 ubuntu ubiquity: umount: /tmp/tmp.5jn9BTMDwz: device is busy.
May 27 21:20:35 ubuntu ubiquity:         (In some cases useful info about processes that use
May 27 21:20:35 ubuntu ubiquity:          the device is found by lsof(8) or fuser(1))
May 27 21:20:35 ubuntu ubiquity: 
May 27 21:20:37 ubuntu ubiquity[8109]: debconffilter_done: ubi-partman (current: ubi-partman)
May 27 21:20:37 ubuntu ubiquity[8109]: Step_before = stepPartAdvanced
May 27 21:20:37 ubuntu clock-setup: Sun May 27 21:20:37 UTC 2012
May 27 21:20:37 ubuntu clock-setup: rdate: adjust local clock by -0.063701 seconds
May 27 21:20:40 ubuntu ubiquity[8109]: switched to page timezone
May 27 21:20:42 ubuntu kernel: [  605.076359] Adding 784380k swap on /dev/sda5.  Priority:-1 extents:1 across:784380k 
May 27 21:20:42 ubuntu kernel: [  605.225583] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
May 27 21:20:51 ubuntu ubiquity: not installable: 
May 27 21:20:51 ubuntu ubiquity: version mismatch: 
May 27 21:20:51 ubuntu clear_partitions: Considering /,/dev/sda1. 
May 27 21:20:51 ubuntu kernel: [  614.038996] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
May 27 21:20:51 ubuntu clear_partitions: Removing bin from / (/dev/sda1).
May 27 21:20:51 ubuntu clear_partitions: Removing dev from / (/dev/sda1).
May 27 21:20:51 ubuntu clear_partitions: Removing etc from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing lib from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing lib64 from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing proc from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing sbin from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing sys from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing usr/bin from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing usr/games from / (/dev/sda1).
May 27 21:20:52 ubuntu clear_partitions: Removing usr/include from / (/dev/sda1).
May 27 21:20:53 ubuntu clear_partitions: Removing usr/lib from / (/dev/sda1).
May 27 21:20:53 ubuntu clear_partitions: Removing usr/not-formatted from / (/dev/sda1).
May 27 21:20:53 ubuntu clear_partitions: Removing usr/sbin from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing usr/share from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/backups from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/cache from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/crash from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/games from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/lib from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/lock from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/log from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/mail from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/not-formatted from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/opt from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/run from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/spool from / (/dev/sda1).
May 27 21:21:02 ubuntu clear_partitions: Removing var/tmp from / (/dev/sda1).
May 27 21:21:02 ubuntu kernel: [  625.522422] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: errors=remount-ro

基本上删除目录bin,dev等,lib,lib32,lib64,proc,sbin和sys,删除usr和var的内容(/ usr / local和/ var / local似乎是一个例外,但是测试文件夹I在usr和var中已删除)。引导目录似乎没有被删除,而只是被与grub和内核相关的软件包所覆盖。


完善!您为我免去了很多麻烦!谢谢堆!:)
XtraSimplicity

0

我现在对无处不在很恼火。我告诉15.04beta2的安装程序可以/raid10f2md设备上使用,而无需格式化。很好,我已经在该设备上完成了mkfs.xfs。我还告诉它使用现有设备/home/var/tmp md设备,而不进行格式化。 /home幸存下来,但我/var/tmp现在是空的!

我勒个去?这是存储持久性用户数据的明确定义的位置。我没有丢失任何找不到和重新下载的内容,或者没有从其他计算机再次备份的内容,但这非常酷。我不认为警告对话框甚至在谈论除根文件系统以外的分区。(我以为如果将设备安装在/var/tmp不安全的地方,我还会得到另外一个警告rm -r。)

我知道告诉安装程序有关我的其他文件系统的风险很小,而不是稍后再编辑fstab,但这只是愚蠢的做法。

因此,无论如何,Ubiquity吹走的目录列表包括/var/tmp,但不包括/home

打开https://bugs.launchpad.net/ubuntu-manual-tests/+bug/1445196

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.