How to retain data in the/home partition during Ubuntu reinstallation
Author: jandy
In Windows, only disk C can be formatted during Reinstallation, so that data in other partitions can be retained. The Ubuntu system is also supported, as long as a/home partition is generated during system installation. You canPartition is a Windows C drive. When Ubuntu is reinstalled, only the "/" partition is formatted. If "/home" is not formatted, the data in "/home" can be retained.
I. Back up data. Reference: http://ubuntuabc.com/123? P = 92
Although this reinstallation won't theoretically damage your file, sometimes unexpected situations (such as misoperations or System Bugs) may lead to data loss. Therefore, we strongly recommend that you back up your important files.
Ii. Delete the old configuration file
The configuration information of Ubuntu is stored in the user's main folder, which is a folder or file starting with ".". Press "Ctrl + H" to display the configuration information.
Because I don't want to keep the old system settings and software settings, and want to install a new system, I want to delete the old configuration file. If you want to keep the previous settings, skip this step.
To delete a configuration file, follow these steps:
1. Start the system with a CD and enter live CD.
2. Access the local hard disk from the places menu; otherwise, the local hard disk cannot be seen in the File Manager.
3. Run the "sudo Nautilus" command on the terminal to open the file browser as an administrator.
4. Press Ctrl + H to display hidden files.
5. Delete the "Lost + found" and ". Trash-0" folders in the hard drive/home partition.
6. Delete all folders and files starting with "." in the "username" folder. ("Username" is your user name)
Iii. reinstalling the system
The previous steps are the same as those for general installation.
The focus is on "prepare hard disk space", that is, partitioning. Select "manually specify partition (advanced )".
Based on the partition size, "/dev/sda1" is the original "/" partition. Select "/dev/sda1" and click "change.
Do not change the original partition capacity. Select "ext4 Log File System" in the drop-down list on the right, and select "Format this partition "; select "/" for "mount point" and click "OK ".
"/Dev/sda5" is the original swap partition. Select "/dev/sda5" and click "change.
Do not change the original partition capacity. Select "swap space ". You do not need to select a formatting or mount point.
"/Dev/sda6" isThe original "/home" partition. Select "/dev/sda6" and click "change.
Do not change the original partition capacity;What is the original file system? What is the current file system!Do not select "Format this partition "!Select "/home" as the mount point ".
Check,Note: Do not select format after "/home,The file system (type) used is the same as the original one. Click "forward ".
The subsequent steps are the same as regular installation. Simply follow the on-screen prompts. Note the following:
You can enter any name when entering your identity;But the login name must be the same as before.
It may take some time for the installation. If the screen turns black, it may be because the keyboard and mouse are not able to work for a long time and the screen protection is started. When you move the mouse, it will be restored. Do not be nervous, or force the shutdown.
After the installation is complete, restart the computer as prompted. /Home files will be intact.
Address: http://ubuntuabc.com/123? P = 23 from: ubuntuabc
-
For non-commercial reprint, please register the author name and add a source link. for commercial use, please contact the author.
(Original address:
Http://ubuntuabc.com/123? P = 23)