重新安装OpenBSD操作系统过程中保留个人数据的探索
发表于 : 2012-02-18 20:02
重新安装OpenBSD操作系统过程中保留个人数据的探索
Welcome to the OpenBSD/i386 5.0 installation program.
(I)nstall, (U)pgrade or (S)hell? i
And with that, we reach our first question. You have the three options shown:
Install: load OpenBSD onto the system, overwriting whatever may have been there. Note that it is possible to leave some partitions untouched in this process, such as a /home, but otherwise,
assume everything else is overwritten.
以下仅针对安装过程中选择(I)nstall步骤
一、最重要的一步,进入旧系统查看OpenBSD分区情况,如disklabel wd0,记录到纸上,打印出来最安全。
二、重装过程中,在disklabel步骤
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a]
此时必须输入E或者C(E工作量少),一旦选择A,接下来的步骤将会格式化整个OpenBSD slice,所有数据都丢失。
后面的过程中,以保留/home分区的数据为例(其他分区数据也可以用这种方法保留),必要条件有两个
1. 必须保证原来属于/home的空间没有被分配到其他分区中
2. 不能mount point /home,可在安装成功reboot系统后在/etc/fstab中添加回来
具体一些,看以下示意
> a n (假设n分区将分给/home)
offset: [103185472] Enter (确定/home分区的start开始处与重装之前一致)
size: [208985472] Enter (确定/home分区的总大小与重装之前一致)
mount point: [none] Enter (不能输入任何信息,若输入/home,则该分区数据都会被格式化)
>
BTW,bsd.rd的installer应该做出改进,让用户重装系统时保留数据更便捷安全。
一下内容发送给了[email protected]
when re-install how to make "leave some partitions untouched" simple
http://www.openbsd.org/faq/faq4.html
says
Install: load OpenBSD onto the system, overwriting whatever may have been there.
Note that it is possible to leave some partitions untouched in this process, such as a /home,
but otherwise, assume everything else is overwritten.
NOTE for re-installers: The new installer will not clear your old disklabel if you chose "(C)ustom Layout",
but you will need to re-specify each mount point using the 'm' option in disklabel(8).
when re-install OpenBSD, if we want to keep original /home's data, are following steps the key point?
1) let the space belong to original /home partition untouched.
2) not set /home mount point, add /home to /etc/fstab after install
If I have more than one partitions to leave untouched, to save more steps & time,
I choose "(E)dit auto layout" rather than "(C)ustom Layout",delete some partitions, add some partitions and leave mount point untouched.
the steps are not simple and error-prone, should we improve the installer ?
before the step " Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] "
we add some step, for example:
Keep some partitions untouched? [yes] Enter
Partitions' mount point? ('?' for list) [/home] ## Note that multiple mount point can be listed, separated by spaces.
...
Welcome to the OpenBSD/i386 5.0 installation program.
(I)nstall, (U)pgrade or (S)hell? i
And with that, we reach our first question. You have the three options shown:
Install: load OpenBSD onto the system, overwriting whatever may have been there. Note that it is possible to leave some partitions untouched in this process, such as a /home, but otherwise,
assume everything else is overwritten.
以下仅针对安装过程中选择(I)nstall步骤
一、最重要的一步,进入旧系统查看OpenBSD分区情况,如disklabel wd0,记录到纸上,打印出来最安全。
二、重装过程中,在disklabel步骤
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a]
此时必须输入E或者C(E工作量少),一旦选择A,接下来的步骤将会格式化整个OpenBSD slice,所有数据都丢失。
后面的过程中,以保留/home分区的数据为例(其他分区数据也可以用这种方法保留),必要条件有两个
1. 必须保证原来属于/home的空间没有被分配到其他分区中
2. 不能mount point /home,可在安装成功reboot系统后在/etc/fstab中添加回来
具体一些,看以下示意
> a n (假设n分区将分给/home)
offset: [103185472] Enter (确定/home分区的start开始处与重装之前一致)
size: [208985472] Enter (确定/home分区的总大小与重装之前一致)
mount point: [none] Enter (不能输入任何信息,若输入/home,则该分区数据都会被格式化)
>
BTW,bsd.rd的installer应该做出改进,让用户重装系统时保留数据更便捷安全。
一下内容发送给了[email protected]
when re-install how to make "leave some partitions untouched" simple
http://www.openbsd.org/faq/faq4.html
says
Install: load OpenBSD onto the system, overwriting whatever may have been there.
Note that it is possible to leave some partitions untouched in this process, such as a /home,
but otherwise, assume everything else is overwritten.
NOTE for re-installers: The new installer will not clear your old disklabel if you chose "(C)ustom Layout",
but you will need to re-specify each mount point using the 'm' option in disklabel(8).
when re-install OpenBSD, if we want to keep original /home's data, are following steps the key point?
1) let the space belong to original /home partition untouched.
2) not set /home mount point, add /home to /etc/fstab after install
If I have more than one partitions to leave untouched, to save more steps & time,
I choose "(E)dit auto layout" rather than "(C)ustom Layout",delete some partitions, add some partitions and leave mount point untouched.
the steps are not simple and error-prone, should we improve the installer ?
before the step " Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] "
we add some step, for example:
Keep some partitions untouched? [yes] Enter
Partitions' mount point? ('?' for list) [/home] ## Note that multiple mount point can be listed, separated by spaces.
...