How to clone steamos to a new nvme
Short info about me
Im a linux software creater who makes cloning tools for arch ubuntu and debian
E.g squashfs, isos and .imgs

Ive been attempting to cloning my current steamos setup with dd and e2image onto a new nvme drive i plan todo this so i dont need steamos's annoying install scripts when it should be 5 minute transfer

So far im stuck with no boot entries
Wonderinf if anyone else has any ideas or guides todo this process
< >
Viser 1-6 af 6 kommentarer
Clone partition table:
sgdisk --backup=table.sgdisk /dev/nvme0n1
sgdisk --load-backup=table.sgdisk /dev/nvme1n1

Clone partitions (ESP, root, etc):
dd if=/dev/nvme0n1pX of=/dev/nvme1n1pX bs=4M status=progress

Mount target system:
mount /dev/nvme1n1p3 /mnt
mount /dev/nvme1n1p1 /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt

Reinstall systemd-boot:
bootctl install

Update boot entry:
blkid # get UUIDs
nano /boot/loader/entries/steamos.conf # update root=UUID=

Optional: update /etc/fstab if UUIDs changed
aarondsouza 11. juni kl. 18:06 
Oprindeligt skrevet af Nicusor Dan:
Clone partition table:
sgdisk --backup=table.sgdisk /dev/nvme0n1
sgdisk --load-backup=table.sgdisk /dev/nvme1n1

Clone partitions (ESP, root, etc):
dd if=/dev/nvme0n1pX of=/dev/nvme1n1pX bs=4M status=progress

Mount target system:
mount /dev/nvme1n1p3 /mnt
mount /dev/nvme1n1p1 /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt

Reinstall systemd-boot:
bootctl install

Update boot entry:
blkid # get UUIDs
nano /boot/loader/entries/steamos.conf # update root=UUID=

Optional: update /etc/fstab if UUIDs changed

Thank you mate i will try that next
but im using partclone and other tools now todo a full system back into a .img.xz with the 8 partitions so will see after
Pepe 12. juni kl. 8:17 
ddrescue should make a proper clone.

Make an empty "mapfile" (call it whatever, mapfile is fine) on the USB stick of your live distro. Mapfile is kind of a log file used in case errors occur, used for recovery attempts, but that's the case of a bad disk. In your case, the map file should be empty or relatively small (a header or something), that's why it will fit on your USB or ramdisk, if you boot in RAM.

https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Examples

The first example should do it.

Later Edit: It won't be fast, though. The whole disk is being cloned. There are some examples on cloning partitions, but that won't copy any kind of file system headers.
Sidst redigeret af Pepe; 12. juni kl. 8:56
aarondsouza 12. juni kl. 10:48 
Oprindeligt skrevet af Pepe:
ddrescue should make a proper clone.

Make an empty "mapfile" (call it whatever, mapfile is fine) on the USB stick of your live distro. Mapfile is kind of a log file used in case errors occur, used for recovery attempts, but that's the case of a bad disk. In your case, the map file should be empty or relatively small (a header or something), that's why it will fit on your USB or ramdisk, if you boot in RAM.

https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Examples

The first example should do it.

Later Edit: It won't be fast, though. The whole disk is being cloned. There are some examples on cloning partitions, but that won't copy any kind of file system headers.

Okay ill take that info problem is i cant find nothing that supports cloning these fat16 partitions and the user above suggested things for debian without asking what im on 😅🤦‍♂️
Sidst redigeret af aarondsouza; 12. juni kl. 10:54
aarondsouza 12. juni kl. 11:00 
Oprindeligt skrevet af Nicusor Dan:
Clone partition table:
sgdisk --backup=table.sgdisk /dev/nvme0n1
sgdisk --load-backup=table.sgdisk /dev/nvme1n1

Clone partitions (ESP, root, etc):
dd if=/dev/nvme0n1pX of=/dev/nvme1n1pX bs=4M status=progress

Mount target system:
mount /dev/nvme1n1p3 /mnt
mount /dev/nvme1n1p1 /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt

Reinstall systemd-boot:
bootctl install

Update boot entry:
blkid # get UUIDs
nano /boot/loader/entries/steamos.conf # update root=UUID=

Optional: update /etc/fstab if UUIDs changed

It dont evan work have you evan tested your method there is no mount points for dev ect in the partitions you clearly missed stuff like pts but overall your are partially correct .....
Sidst redigeret af aarondsouza; 12. juni kl. 11:03
aarondsouza 12. juni kl. 11:07 
Oprindeligt skrevet af Nicusor Dan:
Clone partition table:
sgdisk --backup=table.sgdisk /dev/nvme0n1
sgdisk --load-backup=table.sgdisk /dev/nvme1n1

Clone partitions (ESP, root, etc):
dd if=/dev/nvme0n1pX of=/dev/nvme1n1pX bs=4M status=progress

Mount target system:
mount /dev/nvme1n1p3 /mnt
mount /dev/nvme1n1p1 /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt

Reinstall systemd-boot:
bootctl install

Update boot entry:
blkid # get UUIDs
nano /boot/loader/entries/steamos.conf # update root=UUID=

Optional: update /etc/fstab if UUIDs changed

Your method dont work ... .
< >
Viser 1-6 af 6 kommentarer
Per side: 1530 50