How to replace /home directory?

Derek Trotter expat.arizonan at gmail.com
Wed Jan 9 16:30:34 MST 2013


This should work. If the partition isn't ext4 change that to whatever it is.

/dev/sda7 /home ext4 defaults 1 1


On 01/09/2013 03:30 PM, joe at actionline.com wrote:
>> Well you could just mount the home partition in the
>> home directory and call it a day.
> Forgive my ignorance, but I don't know how to do that,
> especially since the home directory now resides in the
> root partition.
>
> I tried to mount /dev/sda7 as /home but that did not work.
> Not sure what the syntax should be.
>
>
>
> ----------------
>> On Jan 9, 2013 2:02 PM, <joe at actionline.com> wrote:
>>
>>> Just installed kubuntu 12.10 (root partition only) to replace 12.04 on
>>> one
>>> of my computers, and made sure to preserve (not write over) the
>>> pre-existing /home partition. But now I have a new /home directory
>>> inside
>>> the root (/) directory, and the original /home directory is not mounted.
>>> fdisk -l shows this:
>>>
>>> Disk /dev/sda: 100.0 GB, 100030242816 bytes
>>> 255 heads, 63 sectors/track, 12161 cylinders, total 195371568 sectors
>>> Units = sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Disk identifier: 0x282d282d
>>>
>>>     Device Boot      Start         End      Blocks   Id  System
>>> /dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
>>> /dev/sda2          206848    61794303    30793728    7  HPFS/NTFS/exFAT
>>> /dev/sda3        61796350   195371007    66787329    5  Extended
>>> /dev/sda5        61796352    67848191     3025920   82  Linux swap /
>>> Solaris
>>> /dev/sda6        67850240    87379967     9764864   83  Linux
>>> /dev/sda7        87382016   195371007    53994496   83  Linux
>>>
>>> So, what is the best procedure to replace the newly created /home
>>> directory and replace it with the previous (original) /home directory?
>>> Both are ext4 and both have the same owner and group names.
>>>
>>> Can I just add /dev/sda7 (the previous /home) to /etc/fstab (contents
>>> shown below) and will doing that delete/replace the new /home directory?
>>> Or are additional steps needed?
>>>
>>> joe at T60: cat /etc/fstab
>>> # /etc/fstab: static file system information.
>>> # / was on /dev/sda6 during installation
>>> UUID=864ca0e6-f82c-4394-b497-012083b40115 /      ext4
>>> errors=remount-ro
>>> 0   1
>>> # swap was on /dev/sda5 during installation
>>> UUID=dc56632c-3c80-4f8e-87e1-2a1d65ddc281 none   swap   sw
>>> 0   0
>>>
>>> FWIW, 'df' currently shows this:
>>> Filesystem     1K-blocks    Used Available Use% Mounted on
>>> /dev/sda6        9611492 3895244   5228008  43% /
>>> udev             1540144       4   1540140   1% /dev
>>> tmpfs             620500     820    619680   1% /run
>>> none                5120       0      5120   0% /run/lock
>>> none             1551244      80   1551164   1% /run/shm
>>> none              102400       8    102392   1% /run/user
>>>
>>> Also, what is the procedure to mount /dev/sda2 (the windows7 partition)
>>> so
>>> I can access certain files on that partition.
>>>
>>>
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>

-- 
"I get my copy of the daily paper, look at the obituaries page, and if I’m not there, I carry on as usual."

Patrick Moore



More information about the PLUG-discuss mailing list