LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-04-2021, 07:27 PM   #1
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
To move an installed distro on a partition into another


How can we move a perfectly installed distro on a partition into another which is readily prepared to sufficiently contain the OS' size ?

Last edited by BudiKusasi; 02-04-2021 at 07:47 PM.
 
Old 02-04-2021, 09:14 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
You did not provide much information, but this article may help, if your distro uses GRUB: https://www.linuxjournal.com/content...ition-or-drive
 
3 members found this post helpful.
Old 02-05-2021, 11:39 AM   #3
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 375
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
clonezilla
 
Old 02-07-2021, 02:29 PM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by BudiKusasi View Post
How can we move a perfectly installed distro on a partition into another which is readily prepared to sufficiently contain the OS' size ?
It is best to use a backup/clone utility that preserves the Volume UUID, since Grub and other boot loaders typically default to looking for the partition with same UUID it was configured to look for.

I use Image for UEFI, but there are other backup utilities that do similar/same. It will make a compressed image of all allocated space, it will not include free space. A Linux installation using 10GB of space in a 200GB partition typically renders an image file around 4GB. Then create new partition of same or larger size anywhere on the drive and plaster the image there.
On an EFI system, I don't need to do anything else with many Linux, just go ahead and boot it and expand the file system if the partition was enlarged. If I need to move it to a smaller partition, I shrink it first using Gparted Live for Linux and Windows disk management for Windows etc.

Some Linux however, will require the need to boot another installed OS or a live Linux to reinstall the boot loader in order to boot it after it's been relocated. All depends on your system setup/firmware (for UEFI).

EDIT: BTW, in the past, Windows was required to be first OS on first drive, or it's boot partition if it's separate. Not sure if that still applies with GPT partitioning.

Last edited by Brains; 02-07-2021 at 03:17 PM.
 
Old 02-08-2021, 06:07 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
BTW, in the past, Windows was required to be first OS on first drive, or it's boot partition if it's separate. Not sure if that still applies with GPT partitioning.
That hasn't been the case since windows 95 but windows boot files still need to be on a primary partition. Discussed at the two links below. With GPT, all partitions are primary.

https://en.wikipedia.org/wiki/Disk_partitioning

https://www.sevenforums.com/installa...partition.html
 
Old 02-08-2021, 10:40 AM   #6
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by yancek View Post
That hasn't been the case since windows 95
You need to re-evaluate that statement.

The need to install windows first has always been the case until UEFI installs became common and even now it is easiest to install windows first to avoid having its installer overwrite (reformat) your efi partition
 
Old 02-08-2021, 04:07 PM   #7
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Not too long ago, here in this forum, members were complaining about having two WinRE partitions. The easiest way to install Linux on a Windows machine was to shrink Windows partition creating a gap between Windows 10 and the WinRE partition to house Linux. Then a cumulative update came around, shrunk Windows some more and created a new WinRE partition right beside Windows where it was expected to be.

Again, not sure if that is still the case as I don't see any complaints regarding extra WinRE partitions anymore. But Microsoft has it's rules, I don't know of any computer manufacturer that offers out of the box multi-boot computers. So if you are not multi-booting, Windows rules are not an issue.
 
Old 02-08-2021, 06:19 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
You did not provide much information, but this article may help, if your distro uses GRUB: https://www.linuxjournal.com/content...ition-or-drive
Code:
$ sudo cp -a /path/to/source/* /path/to/destination
I've replaced many hard drives like this, plain 'cp -a' does the job. Not sure why they use '-afv' in their example. This method has advantages over imaging, the new partition(s) can be different size and use different filesystem. Faster, too.
 
Old 02-08-2021, 07:36 PM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by Emerson View Post
[CODE]Not sure why they use '-afv' in their example.
cp options.
-a == archive
-v == verbose
-f == force

verbose if I want to see the file names as the copy progresses.
force to remove & replace a destination file if it cannot be overwritten.
archive to keep timestamps, ownership and other attributes.

Pretty self explanatory.
 
Old 02-08-2021, 08:00 PM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
You have a definite talent to miss the point and make useless posts.

I didn't say I do not know what these switches do, I said I see no reason to use -v and -f.
 
Old 02-09-2021, 12:54 AM   #11
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Emerson View Post
You have a definite talent to miss the point and make useless posts.

I didn't say I do not know what these switches do, I said I see no reason to use -v and -f.
The way I understand it, and my recollections of such are vague but in the past it was necessary to use the -f option to avoid having to confirm for every file separately. This is not required anymore, at least for root/sudo anyway.

At least that's what I'm led to believe, but recently I got stumped working from Gentoo live installer which has no desktop and no user account, it boots to a root prompt. It was asking for confirmation of every file being dealt with and I was like: WTF?. Took a good 10 minutes to figure out I needed the -f option that I haven't used in years from a root prompt.

And the -v option...
No different than a disco ball, lots of amazement in front of your eyes. People pay good money for disco balls, don't cost nothing to add the -v option.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using mv to move the contents of one directory into another apachedude Linux - Software 13 01-16-2009 08:57 AM
Help with deleting a linux distro partition to install another linux distro instead gexecuter Linux - Newbie 1 08-04-2007 04:44 PM
installed FC 3 on another partition but can not mount that partition. MurX Fedora 15 02-01-2006 05:28 AM
How to move NIS server into another machine? mkaczm Linux - Networking 0 04-27-2004 05:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration