Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
ant
Posts: 355
Joined: 2011-11-09 00:15

What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#1 Post by ant »

Hello.

What's the best and easy way to copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 to an old fast 115 GB SSD (going to wipe it clean)? Yes, SSD is smaller but my Debian's installation only uses about 8 GB. I installed Debian use the whole 320 GB drive. I will still be using the same 13 yrs. old PC. My HDD's df and /etc/fstab can be found in https://pastebin.com/raw/zAJM6Npc.

Thank you for reading and hopefully answering soon. :)
Last edited by ant on 2022-05-19 19:11, edited 2 times in total.



User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#4 Post by canci »

arochester wrote: 2022-05-19 14:57 reddit
That's all I needed to know.
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

ant
Posts: 355
Joined: 2011-11-09 00:15

Re: What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#5 Post by ant »

canci wrote: 2022-05-19 15:53
arochester wrote: 2022-05-19 14:57 reddit
That's all I needed to know.
?

ant
Posts: 355
Joined: 2011-11-09 00:15

Tried Gparted & Clonezilla methods...

#6 Post by ant »

I booted gparted's ISO to resize my HDD's Debian's drive to 100 GB instead of 320 GB. And then, I booted Debian bullseye v11.3's netinstaller to do a basic installation with its single partition with the same defaults like I did in HDD. I didn't install its GUI. Just the basic stuff for quick and easy setups.

I tested both Debian installations, and they booted fine. I booted Clonezilla's ISO and copied HDD's Debian partition to SSD successfully and quickly. I rebooted to SSD, but it still booted to HDD. What happened and how to fix it? :(

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Tried Gparted & Clonezilla methods...

#7 Post by bester69 »

ant wrote: 2022-05-21 05:50 I booted gparted's ISO to resize my HDD's Debian's drive to 100 GB instead of 320 GB. And then, I booted Debian bullseye v11.3's netinstaller to do a basic installation with its single partition with the same defaults like I did in HDD. I didn't install its GUI. Just the basic stuff for quick and easy setups.

I tested both Debian installations, and they booted fine. I booted Clonezilla's ISO and copied HDD's Debian partition to SSD successfully and quickly. I rebooted to SSD, but it still booted to HDD. What happened and how to fix it? :(
You need to create same partitions in order to match fstab configuration (editting created partitions in SSD and edit UUID of each partiton in order to match fstab source hdd disk).. in SSD disk devices partition has differente nomenclature so you cant use /dev/sdaX nomenclatures in fstab but /dev/nvme0nXpX... then, you dont forget to do chroot to restore system and install grub in SDD and update-grub next..:

In SDD disk, after restored backup system:
sudo mount /dev/nvme0n1 /tmp/root
sudo mount --bind /dev /tmp/root/dev
sudo mount --bind /dev/pts /tmp/root/dev/pts
sudo mount --bind /proc /tmp/root/proc
sudo mount --bind /sys /tmp/root/sys
sudo chroot /tmp/root
grub-install /dev/nvme0n1 ;; update-grub



As a learning task I suggest you to use fsarchiver insteed of clonezilla partition (its very very easy to use and very safe backup to appluy) .. cos its quite faster as you only copy/restore filesystem files inteed whole partition.. so you dont need to create a bigger target partition neither in order to transfer partitions.. fsarchiver also allows you to make hot backup safely if you know what you are doing (stopping database services first)... system backup takes 20 or 30 minits and same for restoring cos you only move system files in compressed mode..
IVE NEVER USED CLONEZILLA!! for system backup but fsarchiver.. with always totally success :arrow:
https://www.fsarchiver.org/

for making a fsarchiver backup you just need two easy command lines.:
Backup
fsarchiver savefs -Av -s 2400 $fsmount/backup.fsa /dev/sda1 \
--exclude=/home


Restore
fsarchiver restfs $fsmount/backup.fsa id=0,dest=/dev/nvme0n1p1

where sda1 is your source hdd partition and nvme0n1p1 your sdd target partition
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#8 Post by p.H »

ant wrote: 2022-05-21 05:50 I booted Debian bullseye v11.3's netinstaller to do a basic installation
That was totally useless. This installation was overritten when your cloned the HDD to the SSD.
Just like when you format a USB drive before writing an ISO-hybrid image on it with dd or the like.
ant wrote: 2022-05-21 05:50 I rebooted to SSD, but it still booted to HDD. What happened and how to fix it?
Cloning duplicated UUIDs.
Possible deduplication include :
- Remove or unplug the HDD. I would test this first to check that the SSD can boot on its own.
- Delete partitions on the HDD.
- Change / and swap UUIDs on the SDD or HDD and all its system config files (/etc/fstab, /boot/grub/grub.cfg, /etc/initramfs-tools/conf.d/resume + update-initramfs). man tune2fs swaplabel.
Last edited by p.H on 2022-05-21 09:19, edited 1 time in total.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#9 Post by bester69 »

p.H wrote: 2022-05-21 07:58
ant wrote: 2022-05-21 05:50 I booted Debian bullseye v11.3's netinstaller to do a basic installation
That was totally useless. This installation was overritten when your cloned the HDD to the SSD.
Just like when you format a USB drive before writing an ISO-hybrid image on it with dd or the like.
ant wrote: 2022-05-21 05:50 I rebooted to SSD, but it still booted to HDD. What happened and how to fix it?
Cloning duplicated UUIDs.
Possible deduplication include :
- Remove or unplug the HDD. I would test this first to check that the SSD can boot on its own.
- Delete partitions on the HDD.
- Change / and swap UUIDs on the SDD or HDD and all its system config files (/etc/fstab, /boot/grub/grub/cfg, /etc/initramfs-tools/conf.d/resume + update-initramfs). man tune2fs swaplabel.
Yes, you cant have both disks connected at same time with same UUID partitions cos system will always see just one of them...Insteed of deleting HDD partitions you can recreate a new UUID for them with gparted.. perhaps that was the problem he was having :)
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

ant
Posts: 355
Joined: 2011-11-09 00:15

Re: What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#10 Post by ant »

p.H wrote: 2022-05-21 07:58
ant wrote: 2022-05-21 05:50 I rebooted to SSD, but it still booted to HDD. What happened and how to fix it?
Cloning duplicated UUIDs.
Possible deduplication include :
- Remove or unplug the HDD. I would test this first to check that the SSD can boot on its own.
- Delete partitions on the HDD.
- Change / and swap UUIDs on the SDD or HDD and all its system config files (/etc/fstab, /boot/grub/grub.cfg, /etc/initramfs-tools/conf.d/resume + update-initramfs). man tune2fs swaplabel.
Yep, physically disconnecting HDD made SSD boot correctly. I think I'll leave the HDD disconnected for now. Let's see how this old SSD goes. I might erase HDD for something else. Changing UUIDs sounds complex. :/

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#11 Post by sunrat »

ant wrote: 2022-05-23 01:10... Changing UUIDs sounds complex. :/
It's one tiny command. Search the internet.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: What's da best & easy way 2 copy/move my old slow 320 GB SATA HDD's updated Debian bullseye v11.3 from a HDD 2 SSD?

#12 Post by p.H »

It's a tiny command if you only change the UUIDs. But it takes more than this if you want to keep a bootable system.

Post Reply