Repartiton/Reinstall Procedure?

Asked by Douglas Brown

Reference to earlier reinstall threads indicated that the "/home" directory was on a partition separate from the "/root" partition, allowing reformatting of the /root partition without, hopefully, changing the /home files during the reinstall. My disk has a primary partition for all the files on that partition, with a separate swap partition. In planning a reinstall, I assume that the safest way would be to repartiton my HDD to place the /home files onto a second partition, then following the process for reinstall into the now separate /root partition, backing up /home before just to be safe.

My system, after getting back to the x server, is still acting strangely: suspend and hibernate modes do not recover, and the boot procedure is quite different than before. Expect to consider doing this during the coming upgrade to 11.04, but having trashed this machine once already, trying to "fix" my Nvidia driver, I'm not keen on doing it again in trying to fix the remaining problems.

BTW, I'm now using the Nvidia_96 driver, what is the 10.10 default? That is what Nvidia driver files in Synaptic should I be using?

System: AMD 3 core, Nvidia 8600GT video card, ubuntu 10.10.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Solved by:
marcus aurelius
Solved:
Last query:
Last reply:
Revision history for this message
Douglas Brown (drphysic) said :
#1

Note that I probably have placed this in the wrong thread, sorry to all those who will take issue...

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2

Your question about the Nvidia driver version is a separate topic; you will have best results by posting a separate question about it.

As for the main topic...what exactly is your question? Are you asking for instructions creating a separate /home partition, moving your files to it, and using it when you reinstall Ubuntu?

Revision history for this message
Douglas Brown (drphysic) said :
#3

I unfortunately used to have access to a big tech support group, so didn't have to rely on my 1970's System Manager's training for an HP9000 HPUNIX system, so before I embark on some major tweaking of this system, having learned that lesson earlier this week, so yes, I would like to confirm the process as outlined: repartition, relocate /home directories to the new partition, then a custom reinstall that re-formatted the /root partition... with some independent assurance that I won't trash the system.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

sounds fine, you should also have a data backup so you can easily just wipe clean, repartition, reinstall then restore the data from backup

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#5

@actionparsnip: Does Ubiquity support importing user accounts these days? If not, then there's an important point about UID's (since they might be assigned differently in the new system, rendering users' home folders inaccessible, or accessible to the wrong users instead of the right ones).

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

If the account has the same name and the same UUID it will be fine, you can always boot to root recovery mode and recursively chown the data to the user to be sure (Before the user logs in). This will then make the data be usable as usual. If you keep the first username you create the same as the first username you have now then you will have no issues and can use sudo to chown the other data to the other users you may have

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#7

@actionparsnip: I'll take that as a "no" then, regarding ubiquity importing user accounts?

As an alternative to recursive chown'age, you could create the accounts on the new system, change their UID's to match what they were on the previous system (i.e. what they are right now), and then (from a live CD, or the recovery console) delete the contents of the /home partition, and, only then (and still from the live CD or recovery console), populate the /home partition with the files taken from the old system.

This would also address the issue that many people have had, where they get an error trying to create the user accounts on the new system, because something (i.e. their old home folders) already exists where their home folders need to be created.

@Douglas: If you require a less technical explanation of this, please let us know.

Another, more advanced alternative would be to replace /etc/passwd with the old /etc/passwd file, which will give you your user accounts with their original UID's, home directory paths, login shells, and primary group memberships. (If their primary groups not present in the default installation, you'll have to bring over /etc/group as well). You'll have set their passwords before they can log on (since the passwords themselves are stored in /etc/shadow, assuming the default local authentication scheme). If you're installing a different OS or version than the old system, there might be new default entries in /etc/passwd (and /etc/group), so you should perform a diff first, and if necessary, manually merge the files. If you don't know what this stuff means, you're probably better off not using the method described in this paragraph.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#8

Actually, in Ubuntu (and most Linux distros), but not most other Unix-like systems, each user has their own primary group. (In other systems, users tend to have "staff" as their primary group.) Therefore, if you use the advanced method described in the last paragraph of my previous post, you always need to bring the /etc/group file over as well as /etc/passwd.

Revision history for this message
marcus aurelius (adbiz) said :
#9

you can get instructions on how to move /home to its own partition by typing just that in google: "move /home to it's own partition". it's the first link that pops up. and yes, you can reinstall ubuntu and the /home partition will not be touched, unless you do something crazy that causes it to be damaged.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

Yes, moving /home to its own partition is pretty easy.

Issues start arising when you want a newly installed system to *use* the /home partition from a previous installation. That's what most of the discussion here has been about.

Revision history for this message
Best marcus aurelius (adbiz) said :
#11

@eliah
actually, it's not messy at all, if you use manual partitioning during setup. i've done it several times. but that is best left for advanced users.

@douglas brown
if you're not familiar with manual partitioning, your best bet is to copy everything from the /home partition and move them back after you do the re-install

Revision history for this message
Douglas Brown (drphysic) said :
#12

To all, thanks for the informative discussion, I could follow almost all of it, even if Unix has gotten so much more complicated than it was 30 years ago. Have done manual partitioning on Linux and Windows systems, so know the issues and precautions. Remain amazed at the quality of support you folks provide us ancient users.

DRB

Revision history for this message
Douglas Brown (drphysic) said :
#13

Thanks marcus aurelius, that solved my question.