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-20-2024, 10:59 AM   #1
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Rep: Reputation: Disabled
How to copy Mint to USB?


Hello,

Systemback didn't work for me on LinuxMint, copying the partition via Gparted from another system in order to paste it later into the USB ... I could never manage it, and I was not able to find a 'dd' command that in reasonable time could do it -- there was one, which I don't remember now, that did it, but in seven hours ...

How to copy Mint to USB?

Thanks for any advice.

EDIT:

Any other way to install with 'dd' somewhat more reasonable, fast, this was the one i used:

Code:
sudo dd if=/dev/nvme0n1p5 of=/dev/sda

Last edited by Camello; 02-20-2024 at 02:50 PM.
 
Old 02-20-2024, 11:25 AM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,113
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
Are you trying to make a snapshot of your installed Mint install using dd?

https://linuxmint-installation-guide...timeshift.html
 
Old 02-20-2024, 01:31 PM   #3
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
I tried that too, I found it incomprehensible, it doesn't put anything inside the USB (formatted gpt > ext4); moreover in case it does work (I'm still trying ...) How can I do anything with it if the system is supposedly broken, it doesn't exist?. Thanks.

Editar:

Alguna otra forma de instalar con 'dd' algo más razonable, rápida, esta fue la que usé:

Code:
sudo dd if=/dev/nvme0n1p5 of=/dev/sda

Last edited by Camello; 02-20-2024 at 02:52 PM.
 
Old 02-20-2024, 09:47 PM   #4
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
Hold on. That naming convention for nvme is a partition. The sda is the whole drive. You probably can fsck that sda or even mount it but you can't boot it or install it.
 
Old 02-21-2024, 03:30 AM   #5
___
Member
 
Registered: Apr 2023
Posts: 139
Blog Entries: 1

Rep: Reputation: Disabled
Maybe https://superuser.com/questions/1186...able-usb-stick
Or maybe https://itsfoss.community/t/move-an-...usb-drive/8673

Last edited by ___; 02-21-2024 at 03:32 AM.
 
Old 02-21-2024, 06:44 AM   #6
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
Clonezilla...? we have to be computer engineers to understand this tool.

It seems the only possible way out to me is via 'dd' but I don't know how to configure the command. In the Gparted I see that the USB appears as /dev/sda (58.59 GIB)

If this information can help to clarify how do I have to configurate the whole command ...

please, just tell me ...


Code:
kaos@kaos-Inspiron-3583:~$ LANG=C sudo fdisk -l
[sudo] password for kaos:    
Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: PC SN520 NVMe WDC 256GB                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D3C3AE91-35A3-4FC3-8778-09C16F235FCF

Device             Start       End   Sectors  Size Type
/dev/nvme0n1p1      2048   3002367   3000320  1.4G EFI System
/dev/nvme0n1p2   3002368   5984255   2981888  1.4G Linux swap
/dev/nvme0n1p3   5984256  88997887  83013632 39.6G Linux root (x86)
/dev/nvme0n1p4  88997888 184377343  95379456 45.5G Linux filesystem
/dev/nvme0n1p5 184377344 286046207 101668864 48.5G Linux filesystem
/dev/nvme0n1p6 286046208 410208317 124162110 59.2G Linux filesystem


Disk /dev/sda: 58.59 GiB, 62914560000 bytes, 122880000 sectors
Disk model: ProductCode     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FED293A4-E9B5-4743-9669-4ED00CC71129

Device     Start       End   Sectors  Size Type
/dev/sda1   2048 122877951 122875904 58.6G Microsoft basic data
kaos@kaos-Inspiron-3583:~$
Thanks.

EDIT: ... and how do i have to formate the USB (it is now as gpt > FAT32)

More information:

I found an instruction from where in my case I could create ... -- but they do not say anything about how to formate the USB (?).

Code:
# dd bs=1M if=/dev/nvme0n1p6 of=/dev/sda1
Code:
keos@kaos:~$ sudo -i
[sudo] contraseña para keos: 
root@kaos:~# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    1  58.6G  0 disk 
└─sda1        8:1    1  58.6G  0 part 
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p1 259:1    0   1.4G  0 part /boot/efi
├─nvme0n1p2 259:2    0   1.4G  0 part [SWAP]
├─nvme0n1p3 259:3    0  39.6G  0 part 
├─nvme0n1p4 259:4    0  45.5G  0 part 
├─nvme0n1p5 259:5    0  48.5G  0 part /
└─nvme0n1p6 259:6    0  59.2G  0 part 
root@kaos:~# dd bs=1M if=/dev/nvme0n1p6 of=/dev/sda1
EDIT:

*The above two commands were tried without any result; the USB was formatted in all possible ways ... I have Mint installed on two machines on both machines always the same output: "no space available ..." (space left over, USB has 60GB).

Code:
~$ sudo dd if=/dev/sda2 of=/dev/sdb1
dd: escribiendo en '/dev/sdb1': No queda espacio en el dispositivo
122877953+0 registros leídos
122877952+0 registros escritos
62913511424 bytes (63 GB, 59 GiB) copied, 33160.5 s, 1.9 MB/s
:~$

Last edited by Camello; 02-22-2024 at 03:54 AM. Reason: More information
 
Old 02-23-2024, 11:47 AM   #7
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
I took another USB, this time of 128GB:

keos@kaos:~$ sudo -i
[sudo] contraseña para keos:
root@kaos:~# dd if=/dev/nvme0n1p6 of=/dev/sda1 bs=4M status=progress
63560482816 bytes (64 GB, 59 GiB) copied, 2567 s, 24.8 MB/s
15156+1 records in
15156+1 records out
63571000320 bytes (64 GB, 59 GiB) copied, 2601.3 s, 24.4 MB/s
root@kaos:~#

Gparted > Copy/Paste and the system is already instaled!.
 
Old 02-24-2024, 08:02 AM   #8
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
So you copied partition 6 (which I think is not mounted because p3,p4,p6 are not mounted) to the 1st partition of sda1. So you have a copy of that filesystem on a non-bootable drive. If the target is larger, you probably cannot reclaim that space. The filesystem will only as big as the source because dd is an exact copy.

So it is better to partition the target disk, mkfs (so it uses the whole partion), mount it, copy the data over (tar/rsync/). I prefer dump/restore because you don't have to remember the flags for links and hard links.

But I ask, what do your WANT? A dd copy of a whole disk has to be adjusted to boot (grub and fstab) unless it replaces the drive. You are making dd copies of parts of disks. Those are 2 different things.

Last edited by elgrandeperro; 02-24-2024 at 09:05 AM.
 
Old 02-24-2024, 10:54 AM   #9
Camello
Member
 
Registered: Apr 2021
Location: USA
Distribution: MX-LINUX
Posts: 218

Original Poster
Rep: Reputation: Disabled
Once copied it to the USB, (dd) I resized it (in the USB), made it smaller and then pasted it into the system partition of my PC ... -- reboot, update-grub, into another system ... and there it was already in the installed menu, I opened it, looked at it carefully ... an exact copy!.

*When I say I installed it was just ¨as a test¨ to see if it worked, later I deleted it from the PC and I only keep it now as a backup.

Thanks for your commentaries.
 
  


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
[SOLVED] Copy to USB stick slows down the more I copy GPGAgent Linux - Newbie 17 06-12-2022 09:24 AM
[SOLVED] Copy files to a usb stick and automatically encrypt or encrypt files/folders and copy them to usb bmxakias Programming 8 03-14-2020 06:44 PM
[SOLVED] Copy /home dir. old laptop (Mint 19.1 XFCE) to new laptop (Mint 19.1 XFCE)? Klaas Vaak Linux - Laptop and Netbook 15 05-05-2019 08:54 AM
Want to change how pasted files are named "(copy)," "(another copy)," "(3rd copy)" L a r r y Linux - Desktop 3 08-24-2013 03:39 PM

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

All times are GMT -5. The time now is 05: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