<?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=4740&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / how to clone a partition with os installed?]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=4740</link>
		<description><![CDATA[The most recent posts in how to clone a partition with os installed?.]]></description>
		<lastBuildDate>Sat, 25 Dec 2021 19:57:37 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: how to clone a partition with os installed?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33468#p33468</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><div class="quotebox"><cite>felixed wrote:</cite><blockquote><div><p># install bootloader from within new system, it&#039;s important *****!!!!!</p><div class="codebox"><pre><code>grub-install /dev/nvme1n1p6
update-grub</code></pre></div></div></blockquote></div><p>For non-UEFI systems it is strongly recommended to install GRUB&#039;s core.img to the block device rather than the partition.</p></div></blockquote></div><p>Thanks, my mistake. I changed the command and of course I do not install it to a partition.</p>]]></description>
			<author><![CDATA[dummy@example.com (felixed)]]></author>
			<pubDate>Sat, 25 Dec 2021 19:57:37 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33468#p33468</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone a partition with os installed?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33446#p33446</link>
			<description><![CDATA[<p>clonezilla is another package/livecd for cloning drives/partitions.</p>]]></description>
			<author><![CDATA[dummy@example.com (xinomilo)]]></author>
			<pubDate>Fri, 24 Dec 2021 21:02:28 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33446#p33446</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone a partition with os installed?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33443#p33443</link>
			<description><![CDATA[<div class="quotebox"><cite>felixed wrote:</cite><blockquote><div><p># install bootloader from within new system, it&#039;s important *****!!!!!</p><div class="codebox"><pre><code>grub-install /dev/nvme1n1p6
update-grub</code></pre></div></div></blockquote></div><p>For non-UEFI systems it is strongly recommended to install GRUB&#039;s core.img to the block device rather than the partition. If it is installed to the partition it can be &quot;lost&quot; during fsck operations and is generally more fragile. GRUB itself will give a warning about this if it is attempted.</p><p>And it&#039;s also best to update the <a href="https://wiki.debian.org/debconf" rel="nofollow">debconf</a> database with the new location rather than running <span class="bbc">grub-install</span> manually:</p><div class="codebox"><pre><code>dpkg-reconfigure grub-pc
update-grub</code></pre></div><p>EDIT: I did post a manual method earlier but changed my mind and deleted it. Here it is again but without the manual partitioning bit because I decided that was too likely to wreck the system if the wrong device was given...</p><p>So this presumes you have already partitioned and formatted the new drive, which is identified hereafter as <span class="bbc">/dev/sdX</span> — replace <span class="bbc">X</span> with the correct letter and use <span class="bbc">lsblk -f</span> to check (it will show which partitions are already mounted).</p><p>First mount the two partitions (this presumes the first partition is for <span class="bbc">/</span> and the second is for <span class="bbc">/home</span>, correct as needed):</p><div class="codebox"><pre><code>mount /dev/sdX1 /mnt
mkdir /mnt/home
mount /dev/sdX2 /mnt/home</code></pre></div><p>Then copy the system over:</p><div class="codebox"><pre><code>apt install rsync
rsync -aAXHv --exclude={&quot;/dev/*&quot;,&quot;/proc/*&quot;,&quot;/sys/*&quot;,&quot;/tmp/*&quot;,&quot;/run/*&quot;,&quot;/mnt/*&quot;,&quot;/media/*&quot;,&quot;/lost+found&quot;} / /mnt
sync</code></pre></div><p>Wait for the <span class="bbc">sync</span> command to return the prompt to ensure the copy buffers are all flushed to the drive.</p><p>Now generate a new fstab and chroot into the system to install &amp; configure the bootloader:</p><div class="codebox"><pre><code>apt install arch-install-scripts
genfstab -U /mnt &gt; /mnt/etc/fstab
arch-chroot /mnt
dpkg-reconfigure grub-pc
update-grub</code></pre></div><p>Finally exit the chroot and un-mount&#160; the drive:</p><div class="codebox"><pre><code>exit
umount /mnt/home
umount /mnt</code></pre></div><p>That&#039;s it.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Fri, 24 Dec 2021 18:50:15 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33443#p33443</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone a partition with os installed?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33441#p33441</link>
			<description><![CDATA[<p>I&#039;m using fsarchiver for years. It&#039;s not installed by default, but included in standard sources. Never had any problem. </p><p>Some tips to use it (you need tune2fs and a super grub disk too):</p><p># ***&#160; save partition sdb1 to /media/XXX/partition12345.fsa ***<br /># <br /># clear trash + apt-get clean<br /># run maintenance system, unmount sdb1 (safer, but I never had any trouble when saving the running system itself)<br /># <br /># save: <br /># -o (overwrite without question) <br /># -j2 (use 2 CPU cores) <br /># -A -a (save mounted partition) <br /># -v (show process information)<br /># -z3 (compression strength between 1 and 9, replaced by -Z[x])<br />#<br /># as root</p><div class="codebox"><pre><code>fsarchiver savefs -o -j2 -A -a -v -z3 /media/XXX/partition12345.fsa /dev/sdb1</code></pre></div><p>#<br /># *** restore to /dev/nvme1n1p6 ***<br /># <br /># run any Linux with fsarchiver installed or remain within running system<br />#<br /># mkfs - partition type, usually unnecessary<br />#<br /># as root </p><div class="codebox"><pre><code>fsarchiver restfs -o -j2 -v /media/XXX/partition12345.fsa id=0,dest=/dev/nvme1n1p6</code></pre></div><p># ,mkfs=ext2<br /># <br /># when installing onto the same computer it needs a new UUID before mounting!</p><div class="codebox"><pre><code>tune2fs -U random /dev/nvme1n1p6</code></pre></div><p># mount<br /># get UUIDs</p><div class="codebox"><pre><code>blkid</code></pre></div><p># change UUIDs in /etc/fstab of restored system<br /># reboot into restored system by super grub disk / Rescatux (did I mention before that you need it?)<br /># install bootloader from within new system, it&#039;s important *****!!!!!</p><div class="codebox"><pre><code>grub-install /dev/nvme1n1
update-grub</code></pre></div><p># change boot device in BIOS</p>]]></description>
			<author><![CDATA[dummy@example.com (felixed)]]></author>
			<pubDate>Fri, 24 Dec 2021 18:24:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33441#p33441</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone a partition with os installed?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33435#p33435</link>
			<description><![CDATA[<p>I would boot from a live CD/DVD/USB system and use <strong><a href="https://packages.debian.org/stable/partclone" rel="nofollow">partclone</a></strong> to clone the partitions. I would use Refracta or the Devuan live DVD and install partclone using apt. Alternatively, you could use the GParted live CD, which comes with partclone. However, the GParted live CD seems a little rough around the edges, and is based on Debian Sid, so I&#039;d recommend that you <em>not</em> use it.</p><p>Download links for Devuan:<br /><a href="https://www.devuan.org/get-devuan" rel="nofollow">https://www.devuan.org/get-devuan</a></p><p>Download links for Refracta:<br /><a href="https://get.refracta.org/" rel="nofollow">https://get.refracta.org/</a></p><p>Info about the GParted live CD:<br /><a href="https://gparted.org/livecd.php" rel="nofollow">https://gparted.org/livecd.php</a></p><p>Download links for the GParted live CD:<br /><a href="https://sourceforge.net/projects/gparted/files/gparted-live-stable/" rel="nofollow">https://sourceforge.net/projects/gparte … ve-stable/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (pcalvert)]]></author>
			<pubDate>Fri, 24 Dec 2021 15:12:06 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33435#p33435</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone a partition with os installed?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33433#p33433</link>
			<description><![CDATA[<p>You could use refractasnapshot and refractainstaller for this.</p><div class="quotebox"><blockquote><div><p>refractasnapshot-base/stable 10.2.12 all<br />&#160; tool to create a live-CD from the running system</p><p>refractasnapshot-gui/stable 10.2.12 all<br />&#160; tool to create a live-CD from the running system</p><p>refractainstaller-base/stable 9.6.0 all<br />&#160; tool to install a running live-CD to hard drive.</p><p>refractainstaller-gui/stable 9.6.0 all<br />&#160; tool to install a running live-CD to hard drive.</p></div></blockquote></div><p>Install either cli tool and or gui and read the documentation.</p>]]></description>
			<author><![CDATA[dummy@example.com (hevidevi)]]></author>
			<pubDate>Fri, 24 Dec 2021 05:22:04 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33433#p33433</guid>
		</item>
		<item>
			<title><![CDATA[how to clone a partition with os installed?]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33432#p33432</link>
			<description><![CDATA[<p>hey guys</p><p>I&#039;ve an existing SSD with devuan 4 installed.&#160; and i just purchased another SSD and would like to clone my existing devuan 4 os and /home partition.&#160; is there an easy way to achieve this?</p><p># 1 SSD<br />/root&#160; partition has 20G, /home partition is 35G<br /><span class="bbc"><br />erdos@htpc-devuan:~$ df -h<br />Filesystem&#160; &#160; &#160; Size&#160; Used Avail Use% Mounted on<br />udev&#160; &#160; &#160; &#160; &#160; &#160; 2.0G&#160; &#160; &#160;0&#160; 2.0G&#160; &#160;0% /dev<br />tmpfs&#160; &#160; &#160; &#160; &#160; &#160;394M&#160; 2.6M&#160; 391M&#160; &#160;1% /run<br />/dev/sda1&#160; &#160; &#160; &#160; 19G&#160; 8.5G&#160; 8.8G&#160; 50% /<br />tmpfs&#160; &#160; &#160; &#160; &#160; &#160;5.0M&#160; 4.0K&#160; 5.0M&#160; &#160;1% /run/lock<br />tmpfs&#160; &#160; &#160; &#160; &#160; &#160;1.2G&#160; 258M&#160; 914M&#160; 23% /dev/shm<br />/dev/sda5&#160; &#160; &#160; &#160; 35G&#160; &#160;19G&#160; &#160;15G&#160; 57% /home<br />tmpfs&#160; &#160; &#160; &#160; &#160; &#160;394M&#160; &#160;16K&#160; 394M&#160; &#160;1% /run/user/1000</span></p><p>new SSD is 256G,&#160; and I plan to use 64G for root partition, and rest for /home partition.</p>]]></description>
			<author><![CDATA[dummy@example.com (erdos)]]></author>
			<pubDate>Fri, 24 Dec 2021 04:23:55 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33432#p33432</guid>
		</item>
	</channel>
</rss>
