<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=30&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Moving /home to a separate partition after installation.]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=30</link>
		<description><![CDATA[The most recent posts in Moving /home to a separate partition after installation..]]></description>
		<lastBuildDate>Sat, 08 Jul 2017 10:42:14 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Moving /home to a separate partition after installation.]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=3198#p3198</link>
			<description><![CDATA[<p>You can just boot single-user to do all this.</p>]]></description>
			<author><![CDATA[dummy@example.com (Ged)]]></author>
			<pubDate>Sat, 08 Jul 2017 10:42:14 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=3198#p3198</guid>
		</item>
		<item>
			<title><![CDATA[Re: Moving /home to a separate partition after installation.]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=168#p168</link>
			<description><![CDATA[<div class="quotebox"><cite>Malinas wrote:</cite><blockquote><div><p>Hi edbarx,</p><p>Since you mention using a Live CD starting from step 7, why not do everything from the Live CD?</p></div></blockquote></div><p>Modifying my method as a result of understanding the reasons behind it is a good thing that I fully encourage. I cannot and I do not intend to shackle independent problem solving.</p>]]></description>
			<author><![CDATA[dummy@example.com (edbarx)]]></author>
			<pubDate>Thu, 08 Dec 2016 13:34:33 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=168#p168</guid>
		</item>
		<item>
			<title><![CDATA[Re: Moving /home to a separate partition after installation.]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=152#p152</link>
			<description><![CDATA[<p>Hi edbarx,</p><p>Since you mention using a Live CD starting from step 7, why not do everything from the Live CD? I think it also makes it easier for the preparation of the partitions, since it&#039;s not possible to shrink some FS (ext4, for instance) online. And if during the reboot the /home does not mount correctly, it&#039;s still possible to log in as root and fix the /etc/fstab.</p>]]></description>
			<author><![CDATA[dummy@example.com (Malinas)]]></author>
			<pubDate>Wed, 07 Dec 2016 19:35:48 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=152#p152</guid>
		</item>
		<item>
			<title><![CDATA[Moving /home to a separate partition after installation.]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=102#p102</link>
			<description><![CDATA[<p><strong>Warning:</strong><br />Please note that this procedure can easily result in permanent data loss. Be sure to have a backup before taking the plunge. Other than that, enjoy! <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>If you have installed Devuan to one partition and you are regretting that fact, be informed that you can easily assign a separate partition for /home, or any other directory you deem deserve to be transferred to a separate partition. This can be done without reinstalling because conventional GNU/Linux doesn&#039;t hide its operational &#039;secrets&#039; from its users. <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>If not already present create a directory under /mnt, say my_home:</p><div class="codebox"><pre><code>mkdir /mnt/my_home
cd /mnt/my_home</code></pre></div><p>The first thing to do is obviously to find enough free space for the new partition. Then, use a tool (gparted) to format the new partition to some native Linux filesystem like ext3 or ext4. Other filesystems exist but you have to inform yourself about the pros and cons in using them instead of ext3 and ext4. Once you have a separate formatted partition, you will need to copy the contents of the /home directory to the new partition. This can be done using various CLI tools under root. You can use cp -a and rsync. I use cp -a although in&#160; the past I used rsync. Make sure to mount the new partition before attempting to write to it and pay special attention to the mount point you will be using because you don&#039;t want to corrupt the existing partition.</p><p>Let us say, the new partition to hold the contents of /home is /dev/sda10:</p><p><strong>The Procedure:</strong></p><ol class="decimal"><li><p>To mount the partition:</p><div class="codebox"><pre><code># mount /dev/sda10 /mnt/my_home</code></pre></div></li><li><p>To copy /home to the new partition:</p><div class="codebox"><pre><code># cp -a /home/* /mnt/my_home</code></pre></div></li><li><p>Unmount the partition:</p><div class="codebox"><pre><code># umount /mnt/my_home</code></pre></div></li><li><p>After that, you will need to edit the /etc/fstab file so that at boot the new partition is mounted on /home. This can be done by adding a new entry to the file as root. To find the uuid of the partition, use the blkid command to list the uuids of the partitions.</p></li><li><p>Add the new entry to the fstab file as shown:</p><div class="codebox"><pre><code>UUID=the_long_long_uuid  /home           ext4    defaults,noatime        0       2</code></pre></div><p>Save the file.</p></li><li><p>Reboot to test&#160; whether the installation uses the new partition. Use mount without parameters for that.</p></li><li><p>When you are 100% sure that the installation is using the new partition, you can delete the data under /home which is hidden when /home is used as a mount point. <strong>Don&#039;t do this while your installation is running, instead use a LiveCD for that. Be cautious because you can easily delete your valuable data especially if you dare to do this procedure without making a backup. A backup is very strongly recommended.</strong></p></li><li><p>Using a Live Devuan CD, issue this command as root although it shouldn&#039;t be necessary to be root. </p><ol class="alpha"><li><p>Create a temporary directory under mount for the Live Linux CD session as follows:</p><div class="codebox"><pre><code>mkdir /mnt/my_devuan_installation</code></pre></div></li><li><p>Mount the root partition of the installation of which you want to purge the contents of /home.</p><div class="codebox"><pre><code>mount /dev/sda2 /mnt/my_devuan_installation</code></pre></div><p>I assumed /dev/sda2 contains the blessed installation.</p></li><li><p>Perform the dangerous cleanup:</p><div class="codebox"><pre><code>rm -rf /mnt/my_devuan_installation/home/*</code></pre></div></li><li><p>Unmount the partition:</p><div class="codebox"><pre><code># cd /
umount /mnt/my_devuan_installation</code></pre></div></li></ol></li></ol><p><span class="bbu">NOTE:</span><br />This same procedure can be used to transfer any directory to a dedicated partition. However, different mount parameters have to be used in /etc/fstab because /home does not have the same permissions as system directories and you don&#039;t want to render your system insecure or unusable.</p><p>Enjoy! <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (edbarx)]]></author>
			<pubDate>Mon, 05 Dec 2016 07:24:31 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=102#p102</guid>
		</item>
	</channel>
</rss>
