Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-26-2020, 03:25 PM
|
#1
|
LQ Newbie
Registered: Nov 2010
Posts: 5
Rep:
|
dd command to clone a smaller nvme to a larger one.
Was wondering the best way to make use of the dd command for cloning a smaller nvme ssd to a larger one.
as root I entered, the following dd command.
Code:
dd if=/dev/nvme0n1 of=/dev/nvme1n1 status=progress
The command finished but the target drive wouldn't boot. I looked up some stuff about legacy BIOS booting issues vs UEFI but I am not sure that is the problem.
I successfully cloned two drives that were the same brand and model before. However now that one is larger I am having an issue, perhaps.
I am doing this booting to a Live Debian USB.
|
|
|
03-26-2020, 03:38 PM
|
#2
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
Some folks use sync command in that. Might have to use gparted to see if the drive is OK or even expand it.
dd command is sometimes too literal. Naming conventions get lost in loaders and other name issue. dd is good for exact.
Guess you could easily try clonezilla for this.
Is it uefi ?
|
|
|
03-26-2020, 03:39 PM
|
#3
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,533
|
Did you remove the target or the source before the post-clone boot attempt? One or the other must have UUID and likely other adjustments in place before next attempt with both installed for both to function normally afterward, if at all. Each must be unique in labeling and UUIDs on the ESP and root filesystems at a minimum. The difference in size should not make a difference, unless possibly the larger was previously in service partitioned in GPT mode and not first before cloning wiped, in which case the end of disk and front of disk partition tables would now be inconsistent with each other.
|
|
|
03-26-2020, 03:44 PM
|
#4
|
LQ Newbie
Registered: Nov 2010
Posts: 5
Original Poster
Rep:
|
Solved
It worked this time. The only thing I changed was to put the source drive into an external enclosure and the target drive in the laptop... before it was reversed. Well what ever happened it is Solved.
|
|
|
03-26-2020, 03:44 PM
|
#5
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,533
|
Quote:
Originally Posted by jefro
Is it uefi ?
|
Could it not be?  Lack of UEFI support in conjunction with support for NVME doesn't seem likely in practice, if not unconditionally. I've never attempted MBR partitioning on an NVME device.
|
|
|
03-26-2020, 06:14 PM
|
#6
|
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
|
If it's ext2/3/4 you could dd the whole drive and repartition and resize2fs to expand the partition. Otherwise rsync and some edits would be more effective IMO. The rsync route would avoid existing fragmentation of files. For usb sticks just an edit to the /etc/fstab to know it's new partitions UUID. And installing grub plus configuration, or use an existing grub to boot the new home. Lots of routes, even the one that worked for you. Could just be that your route put the new home in a different nvme slot. Or the fact that your UUID's were not "UNIQUE", since it's an exact copy with dd. And removing / reformatting the OLD drive fixed it.
|
|
|
03-26-2020, 07:44 PM
|
#7
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
"Could it not be" My systems need to have uefi enabled to access that media but I can't say all do.
|
|
|
03-27-2020, 12:16 AM
|
#8
|
LQ Newbie
Registered: Nov 2010
Posts: 5
Original Poster
Rep:
|
I should note that even though I cloned the drive I wasn't able to take advantage of the drive's larger space. So I am now using the dd command to make an image of the drive. I will expand the image to a the larger drive using Clonezilla. So I will see if I can make use of the drive's space in its entirety.
|
|
|
03-27-2020, 12:50 AM
|
#9
|
LQ Newbie
Registered: Nov 2010
Posts: 5
Original Poster
Rep:
|
Also I am not sure I can use the dd created image. I think I have to use a Clonezilla created image. I mean as far as using the full space on the drive.
Last edited by onojk123; 03-27-2020 at 01:24 AM.
|
|
|
03-27-2020, 01:50 AM
|
#10
|
LQ Newbie
Registered: Nov 2010
Posts: 5
Original Poster
Rep:
|
Ultimately Clonezilla was the solution for me. Using Clonezilla I created an image from the first drive and then restored that image to a larger drive. The extra space showed up as a swap partition. I removed the swap partition, which created free space which I then formatted. I am now able to use that space. I got the larger drive without having to reinstall Debian from scratch, Goal achieved.
|
|
|
All times are GMT -5. The time now is 03:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|