Re-install of Arch on a larger drive

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re-install of Arch on a larger drive

arch general mailing list-2
Hi all-

I currently have Arch running on a 250GB drive, and I'm going to be
moving to a 500GB drive.

I'm looking for 'best practices' when it comes to the migrating as much
as possible during the re-install.

It appears that I can migrate my installed packages (standard and AUR
repos) via:

pacman -Qqe > pkglist.txt

and then on the new install, I can use the pkglist.txt generated
previously to:

pacman -S - < pkglist.txt

In addition, by backing up and migrating much of my /home partition (to
include 'hidden' config files, anything else I could do to make the
process fast and as close to the current install as possible?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
I'm just curious really, but any particular reason you can't back up your
personal files and do a clean install?

On Sat, Mar 17, 2018 at 5:25 PM, Trey Sizemore via arch-general <
[hidden email]> wrote:

> Hi all-
>
> I currently have Arch running on a 250GB drive, and I'm going to be
> moving to a 500GB drive.
>
> I'm looking for 'best practices' when it comes to the migrating as much
> as possible during the re-install.
>
> It appears that I can migrate my installed packages (standard and AUR
> repos) via:
>
> pacman -Qqe > pkglist.txt
>
> and then on the new install, I can use the pkglist.txt generated
> previously to:
>
> pacman -S - < pkglist.txt
>
> In addition, by backing up and migrating much of my /home partition (to
> include 'hidden' config files, anything else I could do to make the
> process fast and as close to the current install as possible?
>
> Thanks!
>
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
On Sat, 2018-03-17 at 17:59 -0400, Dorian C via arch-general wrote:
> I'm just curious really, but any particular reason you can't back up
> your
> personal files and do a clean install?
>

I will be doing a clean install.  I want to mirror the same setup as
the current install, just on a bigger hard drive.
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Jens John
In reply to this post by arch general mailing list-2
On Sat, Mar 17, 2018 at 05:25:36PM -0400, Trey Sizemore via arch-general wrote:
> anything else I could do to make the process fast and as close to the
> current install as possible?

Yes. Do not reinstall but migrate your file system contents 1:1 to the
new disk using rsync. The advantage is that the file system contents and
therefore system configuration stay the same and you don't have to waste
time putting stuff together afterwards.

I used/recommend a procedure similar to [1]. The principle is basically
the same as a reinstall but instead of bootstrapping from a bare bones
system you substitute your existing file systems. I don't see any
benefit of doing it differently unless your existing install is broken
in some way.

The most time was taken up by copying 512G of file system contents over
a SATA<>USB3 bridge to the new SSD. If you can put both the old and the
new drive on a SATA bus, you'll be done in no time.

[1] https://wiki.archlinux.org/index.php/migrate_installation_to_new_hardware#Top_to_Bottom
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
On Sat, 2018-03-17 at 23:24 +0100, Jens John wrote:

> On Sat, Mar 17, 2018 at 05:25:36PM -0400, Trey Sizemore via arch-
> general wrote:
> > anything else I could do to make the process fast and as close to
> > the
> > current install as possible?
>
> Yes. Do not reinstall but migrate your file system contents 1:1 to
> the
> new disk using rsync. The advantage is that the file system contents
> and
> therefore system configuration stay the same and you don't have to
> waste
> time putting stuff together afterwards.
>
> I used/recommend a procedure similar to [1]. The principle is
> basically
> the same as a reinstall but instead of bootstrapping from a bare
> bones
> system you substitute your existing file systems. I don't see any
> benefit of doing it differently unless your existing install is
> broken
> in some way.
>
> The most time was taken up by copying 512G of file system contents
> over
> a SATA<>USB3 bridge to the new SSD. If you can put both the old and
> the
> new drive on a SATA bus, you'll be done in no time.
>
> [1] https://wiki.archlinux.org/index.php/migrate_installation_to_new_
> hardware#Top_to_Bottom

Thanks Jens.  But does the fact that I'm going from a 250GB to 500GB
(and different partition sized) complicate this procedure?
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Fons Adriaensen-2
In reply to this post by arch general mailing list-2
On Sat, Mar 17, 2018 at 05:25:36PM -0400, Trey Sizemore via arch-general wrote:
 

> pacman -Qqe > pkglist.txt
>
> and then on the new install, I can use the pkglist.txt generated
> previously to:
>
> pacman -S - < pkglist.txt
>
> In addition, by backing up and migrating much of my /home partition (to
> include 'hidden' config files, anything else I could do to make the
> process fast and as close to the current install as possible?

The trick with pkglist may work, but I never tried it.

If you do a fresh install, you can copy over you /home partition
and any others that only contain user data and nothing related
to the system.

To save some download time, and assuming your current system is
up to date, you can copy /var/cache/pacman/pkg to your new system
after the basic install (just before you do the pacman -Syu and
eventually pacman -S - < pkglist.txt).

Ciao,

--
FA
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Ralf Mardorf-4
In reply to this post by arch general mailing list-2
On Sat, 17 Mar 2018 18:40:33 -0400, Trey Sizemore wrote:
>On Sat, 2018-03-17 at 23:24 +0100, Jens John wrote:
>> Do not reinstall but migrate your file system contents 1:1 to the
>> new disk using rsync.

Why using such an advanced tool for a simple copy?

Run a Linux from a live media and simply do a

  sudo cp -a /from/source/mountpoint /to/target/mountpoint

>But does the fact that I'm going from a 250GB to 500GB (and different
>partition sized) complicate this procedure?

It doesn't matter, don't confuse the copy (or any sync) command, with
something like the dd command.

Since you don't migrate to other hardware, appart from the drive, you
even don't need to fix a graphics driver or something like that, you
only need to reinstall the bootloader after coping all files.
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Ralf Mardorf-4
On Sun, 18 Mar 2018 04:03:41 +0100, Ralf Mardorf wrote:

>On Sat, 17 Mar 2018 18:40:33 -0400, Trey Sizemore wrote:  
>>On Sat, 2018-03-17 at 23:24 +0100, Jens John wrote:    
>>> Do not reinstall but migrate your file system contents 1:1 to the
>>> new disk using rsync.    
>
>Why using such an advanced tool for a simple copy?
>
>Run a Linux from a live media and simply do a
>
>  sudo cp -a /from/source/mountpoint /to/target/mountpoint
>  
>>But does the fact that I'm going from a 250GB to 500GB (and different
>>partition sized) complicate this procedure?    
>
>It doesn't matter, don't confuse the copy (or any sync) command, with
>something like the dd command.
>
>Since you don't migrate to other hardware, appart from the drive, you
>even don't need to fix a graphics driver or something like that, you
>only need to reinstall the bootloader after coping all files.  

Oops, perhaps you need to fix fstab, your bootloader's config and
similar files, assuming you are one of those UUID users. If you tend to
use labels instead of UUIDs, you even don't need to fix those
files. After copying the files just use the same label for the new
partition, you used for the partition on the old drive.
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
I also planning to do that and found this:

https://wiki.archlinux.org/index.php/disk_cloning#Using_e2image

It only copies the used blocks to the new partition

Ralf Mardorf <[hidden email]> schrieb am So., 18. März 2018, 04:14:

> On Sun, 18 Mar 2018 04:03:41 +0100, Ralf Mardorf wrote:
> >On Sat, 17 Mar 2018 18:40:33 -0400, Trey Sizemore wrote:
> >>On Sat, 2018-03-17 at 23:24 +0100, Jens John wrote:
> >>> Do not reinstall but migrate your file system contents 1:1 to the
> >>> new disk using rsync.
> >
> >Why using such an advanced tool for a simple copy?
> >
> >Run a Linux from a live media and simply do a
> >
> >  sudo cp -a /from/source/mountpoint /to/target/mountpoint
> >
> >>But does the fact that I'm going from a 250GB to 500GB (and different
> >>partition sized) complicate this procedure?
> >
> >It doesn't matter, don't confuse the copy (or any sync) command, with
> >something like the dd command.
> >
> >Since you don't migrate to other hardware, appart from the drive, you
> >even don't need to fix a graphics driver or something like that, you
> >only need to reinstall the bootloader after coping all files.
>
> Oops, perhaps you need to fix fstab, your bootloader's config and
> similar files, assuming you are one of those UUID users. If you tend to
> use labels instead of UUIDs, you even don't need to fix those
> files. After copying the files just use the same label for the new
> partition, you used for the partition on the old drive.
>
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Jens John
In reply to this post by arch general mailing list-2
On Sat, Mar 17, 2018 at 06:40:33PM -0400, Trey Sizemore via arch-general wrote:
>Thanks Jens.  But does the fact that I'm going from a 250GB to 500GB
>(and different partition sized) complicate this procedure?

Absolutely not.

You are going to partition the new drive (and possibly create the LUKS
container, and/or LVM) according to the increased capacity of the new
drive. Then, you'll copy only the contents of the old file systems over
to the new file systems while preserving all attributes (the rsync flags
are important). Thus, the target file systems on the new drive can be
bigger or even smaller, dependent only on the data volume stored on your
existing file systems.

I linked to the wiki page previously because all steps of the procedure
are covered by it, somewhere.
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Jens John
In reply to this post by Ralf Mardorf-4
On Sun, Mar 18, 2018 at 04:13:55AM +0100, Ralf Mardorf wrote:
> Oops, perhaps you need to fix fstab, your bootloader's config and
> similar files, assuming you are one of those UUID users. If you tend to
> use labels instead of UUIDs, you even don't need to fix those
> files. After copying the files just use the same label for the new
> partition, you used for the partition on the old drive.

Even simpler, when reinstalling the bootloader to MBR or EFI, while
being in the live environment, this can be taken care of with genfstab
[1].

[1] https://wiki.archlinux.org/index.php/installation_guide#Fstab
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
In reply to this post by arch general mailing list-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Sat, 2018-03-17 at 17:25 -0400, Trey Sizemore via arch-general
wrote:
> Hi all-
>
> I currently have Arch running on a 250GB drive, and I'm going to be
> moving to a 500GB drive.

why not just `dd if=/dev/olddrive of=/dev/newdrive` and then grow the
filesystems in it change UUIDs in fstab, done?

- --

Greetings

Ricardo Band

 https://   www.ricardo.band
mailto:// [hidden email]
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEhyzgFNiV8yZuI1T5Gp1lfQa1gg4FAlquixkACgkQGp1lfQa1
gg4AWQ/+IQ/5CUDxv5xrGfGSKt30R+noI5QCUuvSY9TkL8b8JgvcTBBh3ZIks/Rm
NSuaxZtFP9rTDOJ4st/JkMT83r/I+2X2uPudlajYmGyjTLBNQvqmbwQXdP2sKGfI
2M6tjD8KGIU5HFZQqu7M0fjAoWSQqzkmyVn6DYZE8542Ga/imR5Xb90SIzDH1AyB
17Ecu44w2DB+ubw5cgpW05w4dAoPffWy/xLA4iyHKXk1ZjrUQ+mtkH3LZHMtF7DK
vukv8RyPPJBiqGERN07DmVRGJP+842Sco4rojcIIJjjKN3PX6EoxhG+1uWWVwLe8
od2f2QohJEzExiBstEBLZ9uAGmEVRdg+XqrzF69GWiFcWxOw8B6LMi0wj3aVPcVi
ZsfjshOqs0KaKn7QNNS+SFbFyx8I4DrRwC/NJ2YXzieyraP7r08CFIwv1rNQjxrN
ZEug8Y0EZ2D8byOqlVdz3Jxg6UIU2RI3LDW8QA776NIVFE6TeonfidZCMW4xuYE1
Z+9Y5IsfSNkzPXoRbnD8cgBHuaXwEhKQ3Xs5aP7cMwY6IcleKRM9svuc0RzVbiDu
czkgabMKOeHWN6GdWOAu0s42ZxG46r7vv/uMJp6nScc5eOy4FyC/YKV3C1FMNhmn
BPyVLVm6BG5Lt12QqfKxSnEWPVHYrTphfXnMQ0CNwAnNpcUcouY=
=Wp0S
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Ralf Mardorf-4
On Sun, 18 Mar 2018 16:51:53 +0100, Ricardo Band via arch-general wrote:
>On Sat, 2018-03-17 at 17:25 -0400, Trey Sizemore wrote:
>> Hi all-
>>
>> I currently have Arch running on a 250GB drive, and I'm going to be
>> moving to a 500GB drive.  
>
>why not just `dd if=/dev/olddrive of=/dev/newdrive` and then grow the
>filesystems in it change UUIDs in fstab, done?

The "dd" command is inappropriate, a "cp -a" is the most reasonable
solution. However, UUIDs are still an issue, the average desktop
computer user should consider to prefer a lable over an UUID.
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
On Sun, 18 Mar 2018 17:30:27 +0100
Ralf Mardorf <[hidden email]> wrote:

> On Sun, 18 Mar 2018 16:51:53 +0100, Ricardo Band via arch-general wrote:
> >On Sat, 2018-03-17 at 17:25 -0400, Trey Sizemore wrote:  
> >> Hi all-
> >>
> >> I currently have Arch running on a 250GB drive, and I'm going to be
> >> moving to a 500GB drive.    
> >
> >why not just `dd if=/dev/olddrive of=/dev/newdrive` and then grow the
> >filesystems in it change UUIDs in fstab, done?  
>
> The "dd" command is inappropriate, a "cp -a" is the most reasonable
> solution. However, UUIDs are still an issue, the average desktop
> computer user should consider to prefer a lable over an UUID.

Why is it inappropriate? It should work fine, and work with no other changes.
Even the UUIDs/Labels would be the same that way.
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Ralf Mardorf-4
In reply to this post by Ralf Mardorf-4
BTW. what colour do you like?
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

Ralf Mardorf-4
In reply to this post by arch general mailing list-2
On Sun, 18 Mar 2018 11:33:19 -0500, Doug Newgard via arch-general wrote:
>On Sun, 18 Mar 2018 17:30:27 +0100 Ralf Mardorf wrote:
>> The "dd" command is inappropriate, a "cp -a" is the most reasonable
>> solution. However, UUIDs are still an issue, the average desktop
>> computer user should consider to prefer a lable over an UUID.  
>
>Why is it inappropriate? It should work fine, and work with no other
>changes. Even the UUIDs/Labels would be the same that way.

If so, don't beat around the bush, simply provide the command that does
it all :).
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
On Sun, 18 Mar 2018 17:46:21 +0100
Ralf Mardorf <[hidden email]> wrote:

> On Sun, 18 Mar 2018 11:33:19 -0500, Doug Newgard via arch-general wrote:
> >On Sun, 18 Mar 2018 17:30:27 +0100 Ralf Mardorf wrote:  
> >> The "dd" command is inappropriate, a "cp -a" is the most reasonable
> >> solution. However, UUIDs are still an issue, the average desktop
> >> computer user should consider to prefer a lable over an UUID.    
> >
> >Why is it inappropriate? It should work fine, and work with no other
> >changes. Even the UUIDs/Labels would be the same that way.  
>
> If so, don't beat around the bush, simply provide the command that does
> it all :).

If you need more than what Ricardo Band already posted, you're beyond help.
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
I've moved or cloned my general-use Arch system between disks more times
than I can count. This is what LVM is for. If you're not using LVM (or
BTRFS), I recommend you start, but in the meantime, the simplest solution
when moving between systems is to dd the contents of each partition from
the source disk to the destination disk, and then expand filesystems as
necessary:

sudo dd if=/dev/sdx1 of=/dev/sdy1 bs=1M oflag=direct
sudo fsck -f /dev/sdy1
sudo resize2fs /dev/sdy1

Paul

On 18 March 2018 at 17:08, Doug Newgard via arch-general <
[hidden email]> wrote:

> On Sun, 18 Mar 2018 17:46:21 +0100
> Ralf Mardorf <[hidden email]> wrote:
>
> > On Sun, 18 Mar 2018 11:33:19 -0500, Doug Newgard via arch-general wrote:
> > >On Sun, 18 Mar 2018 17:30:27 +0100 Ralf Mardorf wrote:
> > >> The "dd" command is inappropriate, a "cp -a" is the most reasonable
> > >> solution. However, UUIDs are still an issue, the average desktop
> > >> computer user should consider to prefer a lable over an UUID.
> > >
> > >Why is it inappropriate? It should work fine, and work with no other
> > >changes. Even the UUIDs/Labels would be the same that way.
> >
> > If so, don't beat around the bush, simply provide the command that does
> > it all :).
>
> If you need more than what Ricardo Band already posted, you're beyond help.
>
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
On Mon, 19 Mar 2018 09:17:02 +0000
Paul Gideon Dann via arch-general <[hidden email]> wrote:

> I've moved or cloned my general-use Arch system between disks more
> times than I can count. This is what LVM is for. If you're not using
> LVM (or BTRFS), I recommend you start, but in the meantime, the
> simplest solution when moving between systems is to dd the contents
> of each partition from the source disk to the destination disk, and
> then expand filesystems as necessary:
>
> sudo dd if=/dev/sdx1 of=/dev/sdy1 bs=1M oflag=direct
> sudo fsck -f /dev/sdy1
> sudo resize2fs /dev/sdy1
>
> Paul
>

Thanks.  I'll give it a try and also go back to using LVM.


--
Cheers,
Trey
----
 
There is an innocence in admiration; it is found in those to whom
it has not yet occurred that they, too, might be admired some day.
                 --Friedrich Nietzsche
 
Linux mint-desktop 4.10.0-38-generic x86_64
 06:43:24 up 17:12,  1 user,  load average: 0.10, 0.32, 0.75
Reply | Threaded
Open this post in threaded view
|

Re: Re-install of Arch on a larger drive

arch general mailing list-2
In reply to this post by arch general mailing list-2
On 3/19/18, Paul Gideon Dann via arch-general
<[hidden email]> wrote:
> I've moved or cloned my general-use Arch system between disks more times
> than I can count. This is what LVM is for. If you're not using LVM (or
> BTRFS), I recommend you start

Which aspect is easier/improved with LVM?
12