LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2012, 04:39 PM   #1
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Reinstaling but keeping /home intact


...so, can this be done? Of course, this is Linux...

Hi gang!
Okay, most know that I run Arch Linux, and I'm extatic about it. However, the next upgrade fails. There is one clean option: reinstallation. But, inquisitive about the outer edges... I'd like to know if Arch Linux allows a reinstall without having to reformat the harddrive...
The scheme is simpel
/dev/sda1 - the boot batrition, mounted as /dev/sda3/boot
/dev/sda2 - I think..that's the swap
/dev/sda3 - the patient to be operated on
/dev/sda4 - the home planet of the users(s), mounted under /dev/sda3/home

It's the last one I'd like to keep intact, and doing a reinstrall only in sda3
Can it be done?
Of course, I'd only venture into the pool if 1) after a backup and if 2) there's water

Thanks Gang!

Thor
 
Old 07-18-2012, 06:26 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Never used arch but I don't see any reason you wouldn't be able to as your / is a separate partition/filesystem from /home/. Unless, arch linux has some wierd method of installation which is drastically different from red hat installs you can do this without worry(as long as you have good backups).
 
1 members found this post helpful.
Old 07-18-2012, 06:27 PM   #3
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
When you install you will be given the option to partition. Simply mount your existing /home as /home and you are good to go.
 
Old 07-18-2012, 08:18 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Never used Arch, but most other distros wouldn't have a problem with this. Just make sure you set the partition layout manually. Set up your partitions the same as before, and if its anything like the installation of other distros you should be able to choose which partitions do/do not get formatted. You'd simply set up the mount location for each partition the same as before, and tell it to format all of them but /home.

You could also just do your installation normally, except just leave /home alone (no pun intended). Then once you're up and running, it would be easy enough to move /home from wherever the install put it back onto your dedicated partition. I do this all the time when setting up a new system with a hardware RAID (that needs a custom kernel module which I dont wan't to futz with during install) that I want to use for /home.

Last edited by suicidaleggroll; 07-18-2012 at 08:23 PM.
 
Old 07-18-2012, 08:30 PM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Arch
Posts: 10,021

Rep: Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199Reputation: 3199
So without trying to hijack Thor's question, if we assume there are several users stored in the home directory, what is the process for setting them all back up?

Are you able to simply backup the /etc/passwd and /etc/group files and copy them back so users are not locked out?
Or are you required to re-add, using a script I would guess, all the users with passwords they will need to change?
 
Old 07-18-2012, 10:07 PM   #6
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 541

Rep: Reputation: Disabled
I think you may also need /etc/shadow too, but if you simply want the data that belongs to those users (not including the username's and such), then all you need to back up is /home.
 
Old 07-18-2012, 10:36 PM   #7
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 164

Rep: Reputation: 18
Related issue here.
I just botched an update into an LVM/Raid system. I can't boot into it anymore, but I can mount the Raid/LVM set and copy out /home. See my recent thread at http://www.linuxquestions.org/questi...nd-4175417478/


Is that good enough if I want to copy /home into a completely new system?

Here's the hard part. There's a /home/.encryptfs/<eachUser> set of directories. The password for those directories is known only by "the system", the passphrase is known only to each user. If I copy /home into a new Ubuntu installation, or whatever, would the users be able to access their (old) encrypted files simply by signing in to the new system?
So, question to TommyC7, would copying /home be good enough for users that have encryption directories? or maybe their entire /home/user that is encrypted?

Should this be a separate thread?
I'm guessing you can't do what TommyC7 suggests (if ArchLinux does this, same as Ubuntu). Because if you could, it would be a large hole in the encryption security.
 
Old 07-19-2012, 02:36 AM   #8
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766

Original Poster
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Thanks for all these helpful replies.

@Kustom42 - well, I'd proceed after a verified backup to an exernal drive. There's only my data so that should be easyy enough...
@Roken - if I mount /home dont I risk the partitioner "getting to the good stuff"? Unless you neams mounting /dev/sdq3/home as itself...
@suicidaleggroll - I stretched the OS partition before with PartedLive...but I suppose that's not an issue...
@grail and @linuxStudent11 - thanks for joining in! Your questione could help all over.
@TommyC7 - maybe the simpliest option...

I'll fire up a redundant PC here that has Arch on the disk and give these suggestions a go! But...it'll have to be for the weekend...this could be a lengthy process...

Thor
 
Old 07-19-2012, 03:07 AM   #9
Roken
Member
 
Registered: Oct 2011
Location: Warrington, UK
Distribution: Arch local, Debian on VPS, several RPIs.
Posts: 300
Blog Entries: 1

Rep: Reputation: 55
You aren't going to repartition your /home drive/partition. You will simply mount it in /home on your new Arch installation. You can do this either during installation (probably the better option since Arch specific configs in /home will be properly written, or you can do it after the event by amending fstab. If you choose the latter you will probably need to merge the new /home directory created by Arch with your existing /home partition first to avoid problems.

When I moved to Arch I used the former without issue.
 
1 members found this post helpful.
Old 07-19-2012, 04:46 AM   #10
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766

Original Poster
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Okay, now this:

Quote:
When I moved to Arch I used the former without issue.
is most reassuring.
No formatting, just installing and (manually) mount the home partition in the home folder...this I can do

Thanks

Thor
 
  


Reply

Tags
reinstalling


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
keeping GRUB MBR intact in reinstall of Windows on dual boot system miker00lz Linux - General 2 11-20-2011 05:02 AM
[SOLVED] Keeping configuration intact after reboot snake eyes Linux - Software 1 10-06-2010 06:42 AM
Increasing HDD size while keeping data intact WojtekO Linux - Server 1 06-15-2010 09:47 PM
[SOLVED] Installing Slackware Linux/LILO but keeping things intact on Lenovo notebook dimm0k Slackware 10 05-29-2010 11:48 PM
[SOLVED] Reinstall. Access same /home directory as before keeping permissions (UID) intact MaxIBoy Linux - General 4 12-14-2009 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration