LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   keep "/home" after reinstallation? (https://www.linuxquestions.org/questions/linux-newbie-8/keep-home-after-reinstallation-228580/)

Boby 09-09-2004 09:31 AM

keep "/home" after reinstallation?
 
Hello!

I want to reinstall my Fedora Core 2, but keep my /home directory untouched because I have a lot of data witch I don't want to loose. I do not have another hdd to save it there. So, is it possible to format and reinstall Fedora with leaving my /home untouched? I thought that formatting all partitions but not /home, in the installation...whould do the trick...but I'm not sure. Maybe someone has done it before. Or another trick would be great to.
Please help me with this!

Thank you!
Boby

scuzzman 09-09-2004 09:35 AM

This is why it's important to have your /home as a seperate partition. In short, cut up your drive and make a partition and copy all the data there. Or, burn it all to a CD/multiple floppies. Outside of this, I think you're pretty much screwed.

Boby 09-09-2004 09:43 AM

These are my partitions:
/
/boot
/home
/usr
/var

will it work if I format only /, /boot, /usr, /var ? Or do you mean to have /home on an other hdd?

Boby

acid_kewpie 09-09-2004 10:11 AM

that'll be fine. just tell it not to touch /home. you might want to do it a slightly different way to feel safer, and totally ignore /home through the whole installation, and let /home be a normal directory on /. then just add it to /etc/fstab yourself, and it'll mount just fine. One note though, you, as a user are represented by a UID and as a group by the GID. These defaults might not be carried between distros. for example most distro's start user id's at 500, but i *think* BSD starts from 1000... so the UID would differ and so the files would no longer appear to be yours. if the does happen it's no biggie, you can use chown to alter the files, or use useradd (or edit /etc/passwd directly) to change your own UID.

Gkarfield 09-09-2004 10:41 AM

hey man , I have different partitions. I used it in windows ands kept that in mind.

I have one for / (and home etc)

and separate disks (partitions) for storage, ( hda5 hda6), so whatever I do at / (like new format) I don't touch my data, that are stored in other partitions.

Boby 09-09-2004 04:26 PM

OK guys...I've done it! Througt the installation I formatted all partitions but didn't touched my /home.
Everything worked fine. When I log in as normal user, I have another /home/boby . This directory is in my / partition. All I want now is to use my /home partition (not directory, it's the old one that I kept) instread of the new /home directory that was newly created for user boby. I'll post here my partitions, /etc/fstab and /etc/mtab

df -T
Code:

[root@localhost modem]# df -Th
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/hda5    ext3    6.5G  506M  5.7G  9% /
/dev/hda1    ext3    99M  5.9M  88M  7% /boot
none        tmpfs    63M    0  63M  0% /dev/shm
/dev/hda3    ext3    12G  4.2G  6.8G  38% /usr
/dev/hda7    ext3    6.8G  117M  6.3G  2% /var
/dev/hda2    ext3    49G  46G  413M 100% /home

fdisk -l
Code:

[root@localhost modem]# fdisk -l

Disk /dev/hda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1          13      104391  83  Linux
/dev/hda2              14        6387    51199155  83  Linux
/dev/hda3            6388        7917    12289725  83  Linux
/dev/hda4            7918        9726    14530792+  f  W95 Ext'd (LBA)
/dev/hda5            7918        8769    6843658+  83  Linux
/dev/hda6            8770        8834      522081  82  Linux swap
/dev/hda7            8835        9726    7164958+  83  Linux

/etc/fstab
Code:

[root@localhost modem]# cat /etc/fstab
LABEL=/                /                      ext3    defaults        1 1
LABEL=/boot            /boot                  ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs  defaults        0 0
none                    /proc                  proc    defaults        0 0
none                    /sys                    sysfs  defaults        0 0
LABEL=/usr              /usr                    ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
/dev/hda6              swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1            /mnt/cdrom1            udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy            auto    noauto,owner,kudzu 0 0

/etc/mtab
Code:

[root@localhost modem]# cat /etc/mtab
/dev/hda5 / ext3 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/hda1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/hda3 /usr ext3 rw 0 0
/dev/hda7 /var ext3 rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0



Thank you!
Boby

cincindie 10-02-2004 06:08 PM

Just delete your new home directory, and create a symbolic link to your old home partition.


All times are GMT -5. The time now is 01:06 PM.