Steam Deck

Steam Deck

Question about SSD upgrade and cloning
I'm planning to clone my SSD instead of reimaging it because I'm having serious issues with Steam OS 3.5 and would like to stay on 3.4. Could anyone confirm whether this method can help me do that? I've been told that reimaging forces you to install the latest Steam OS. Thanks in advance.
Originally posted by PopinFRESH:
atmakeoutcreek I did a bit more digging, and SteamOS 3.2+ does automatically extend the partition and filesystem for /home if there is unpartitioned space on the internal disk. So you should be fine to use a USB-C -> NVMe M.2 enclosure to clone your internal disk to the new larger SSD.

Since that video didn't fully show the process and made some assumptions that may or may not be true

  1. Install New larger SSD into USB-C NVMe M.2 drive enclosure[www.amazon.com]
  2. Reboot Steam Deck to Desktop mode
  3. Launch Konsole (and set a sudoers password if you haven't already)
  4. Connect the USB-C NMVe M.2 drive enclosure to your Steam Deck
  5. In Konsole run sudo ls /dev/disk-by* which should list all the block devices and partitions by ID, Path, etc. You are just wanting to look at which block device was assigned to your new SSD when you connected it via USB-C. Likely, it will be /dev/sda as they showed in the video if you have no other storage device connected. You should also see that your original internal SSD is /dev/nvme0n1 and has a few partitions under it (like /dev/nvme0n1p1)
  6. In Konsole use the dd utility to execute the clone; sudo dd if=/dev/nvme0n1 of=/dev/sda oflag=sync bs=1G status=progress See Notes Below for details
  7. Wait for the clone to complete; which will drop you back to the Konsole prompt
  8. Exit the Konsole and shutdown the SteamDeck
  9. Follow the iFixit Steam Deck SSD Replacement Guide to physically replace the SSD with the new SSD.
  10. Boot the SteamDeck from the new SSD and let it complete the installation verification process at boot which should automatically see the unpartitioned space at the end of the disk and will resize the home partition and filesystem accordingly to fill that space

Breaking down the dd command below so you can understand what the options are doing and what you are executing so you aren't blindly running a command that is data destructive if done incorrectly.

sudo dd if=/dev/nvme0n1 of=/dev/sda oflag=sync bs=1G status=progress

  • sudo - this is you telling the system to elevate your users privileges to execute the "following command" as super user (e.g. an admin); thus Super User DO
  • dd - is the actual utility/command and stands for disk/data duplicator
  • if= - stands for Input File and is where you are specifying the "file" to be taken as input to be written to the output file
  • /dev/nvme0n1 - this is the path to the file you are specifying to take as input; in this case we are pointing the input file to the block device of your internal SSD which we verified earlier; Note: we are targeting the block dev itself, not one of its partitions so /dev/nvme0n1 rather than /dev/nvme0n1p1
  • of= - stands for Output File and is where you are specifying the "file" to be written to as output for the block duplication; Note: it will not prompt you or hold your hand, whatever path you put here will just be destroyed and overwritten so double check your command before hitting enter.
  • /dev/sda - this is the path to the file you are specifying to write the output blocks to; in this case we are pointing the output to the block device of your new SSD that is connected via USB enclosure which we verified earlier
  • oflag=sync - this is an optional flag telling the command how to handling writing the output to the file. In this case we are specifying to do so synchronously so that the storage I/O subsystem makes use of the normal write buffers, e.g. the memory (this will be substantially faster than direct I/O)
  • bs=1G - this is specifying the Block Size which is telling the command how much data to read in as a block to then be written out. The safest option for this is to set this to the actual block size of the storage medium / filesystem to avoid "overrun" at the end of the filesystem if you were doing a 1:1 size clone; in this case I've specified to use a 1 Gigabyte block size because the source disk is more than 1GB smaller than the destination disk and we have more than 2GB of available memory (RAM) in the system to use for buffering I/O. This is simply to speed up the data duplication; and you can use other values like 128M as shown in that video to specify a smaller block size.
  • status=progress - this is also an optional directive telling the command to post the progress to the standard output (STDOUT) so the command will show a progress indicator on the command line as it is running rather than just sitting there doing its thing with no output looking like it is "frozen" until the command completes.

Good luck, and if you have any other questions feel free to ask.
< >
Showing 1-11 of 11 comments
PopinFRESH Nov 18, 2023 @ 7:41pm 
Doing a block level clone is going to duplicate exactly what you currently have and yes you can do that to upgrade the SSD.

If you do it manually, e.g. via the dd utility or similar method you will need to handle modifying the partition table and extending the file systems if it’s a larger disk. Other utilities can try to do that for you.

EDIT: SteamOS 3.2+ (at least, might be earlier than 3.2) will automatically extend partition 8 and extend the ext4 filesystem for the /home mount point to fully use the unpartitioned space.
Last edited by PopinFRESH; Nov 19, 2023 @ 4:51am
atmakeoutcreek Nov 18, 2023 @ 7:54pm 
Originally posted by PopinFRESH:
Doing a block level clone is going to duplicate exactly what you currently have and yes you can do that to upgrade the SSD.

If you do it manually, e.g. via the dd utility or similar method you will need to handle modifying the partition table and extending the file systems if it’s a larger disk. Other utilities can try to do that for you.
Hey thanks for the quick reply! Sorry I'm not sure what you mean with the second paragraph. For context I'm planning to follow this tutorial: https://youtu.be/fxaWqF4s-mg?si=NTnnf4ENc3_kFut2
Are there additional steps I need to do to make sure my Deck stays on Steam OS 3.4?
Last edited by atmakeoutcreek; Nov 18, 2023 @ 7:54pm
PopinFRESH Nov 18, 2023 @ 8:19pm 
Not additional steps to stay on SteamOS 3.4; what that video doesn’t show is that is actually upgraded the space. What he did will not have changed the available space. He would have ended up with a 256GB partition table on the 1TB disk with 768GB of empty unused space.

You’d likely need to extend the partition table to the end of the disk and then grow the ext4 filesystem for the /home/deck/ mount point. I don’t believe that SteamOS will automatically do that and given that video doesn’t even show the additional capacity I wouldn’t consider it a good guide.

I know there are several discussions on this topic where various cloning utilities have been linked which can handle extending the filesystems for you.
atmakeoutcreek Nov 18, 2023 @ 8:24pm 
Originally posted by PopinFRESH:
Not additional steps to stay on SteamOS 3.4; what that video doesn’t show is that is actually upgraded the space. What he did will not have changed the available space. He would have ended up with a 256GB partition table on the 1TB disk with 768GB of empty unused space.

You’d likely need to extend the partition table to the end of the disk and then grow the ext4 filesystem for the /home/deck/ mount point. I don’t believe that SteamOS will automatically do that and given that video doesn’t even show the additional capacity I wouldn’t consider it a good guide.

I know there are several discussions on this topic where various cloning utilities have been linked which can handle extending the filesystems for you.

I see! I'll go ahead and check out those discussions. Thanks a lot!
Coffee Nov 18, 2023 @ 8:26pm 
I did mine over the network.
The author of this thread has indicated that this post answers the original topic.
PopinFRESH Nov 19, 2023 @ 4:24am 
atmakeoutcreek I did a bit more digging, and SteamOS 3.2+ does automatically extend the partition and filesystem for /home if there is unpartitioned space on the internal disk. So you should be fine to use a USB-C -> NVMe M.2 enclosure to clone your internal disk to the new larger SSD.

Since that video didn't fully show the process and made some assumptions that may or may not be true

  1. Install New larger SSD into USB-C NVMe M.2 drive enclosure[www.amazon.com]
  2. Reboot Steam Deck to Desktop mode
  3. Launch Konsole (and set a sudoers password if you haven't already)
  4. Connect the USB-C NMVe M.2 drive enclosure to your Steam Deck
  5. In Konsole run sudo ls /dev/disk-by* which should list all the block devices and partitions by ID, Path, etc. You are just wanting to look at which block device was assigned to your new SSD when you connected it via USB-C. Likely, it will be /dev/sda as they showed in the video if you have no other storage device connected. You should also see that your original internal SSD is /dev/nvme0n1 and has a few partitions under it (like /dev/nvme0n1p1)
  6. In Konsole use the dd utility to execute the clone; sudo dd if=/dev/nvme0n1 of=/dev/sda oflag=sync bs=1G status=progress See Notes Below for details
  7. Wait for the clone to complete; which will drop you back to the Konsole prompt
  8. Exit the Konsole and shutdown the SteamDeck
  9. Follow the iFixit Steam Deck SSD Replacement Guide to physically replace the SSD with the new SSD.
  10. Boot the SteamDeck from the new SSD and let it complete the installation verification process at boot which should automatically see the unpartitioned space at the end of the disk and will resize the home partition and filesystem accordingly to fill that space

Breaking down the dd command below so you can understand what the options are doing and what you are executing so you aren't blindly running a command that is data destructive if done incorrectly.

sudo dd if=/dev/nvme0n1 of=/dev/sda oflag=sync bs=1G status=progress

  • sudo - this is you telling the system to elevate your users privileges to execute the "following command" as super user (e.g. an admin); thus Super User DO
  • dd - is the actual utility/command and stands for disk/data duplicator
  • if= - stands for Input File and is where you are specifying the "file" to be taken as input to be written to the output file
  • /dev/nvme0n1 - this is the path to the file you are specifying to take as input; in this case we are pointing the input file to the block device of your internal SSD which we verified earlier; Note: we are targeting the block dev itself, not one of its partitions so /dev/nvme0n1 rather than /dev/nvme0n1p1
  • of= - stands for Output File and is where you are specifying the "file" to be written to as output for the block duplication; Note: it will not prompt you or hold your hand, whatever path you put here will just be destroyed and overwritten so double check your command before hitting enter.
  • /dev/sda - this is the path to the file you are specifying to write the output blocks to; in this case we are pointing the output to the block device of your new SSD that is connected via USB enclosure which we verified earlier
  • oflag=sync - this is an optional flag telling the command how to handling writing the output to the file. In this case we are specifying to do so synchronously so that the storage I/O subsystem makes use of the normal write buffers, e.g. the memory (this will be substantially faster than direct I/O)
  • bs=1G - this is specifying the Block Size which is telling the command how much data to read in as a block to then be written out. The safest option for this is to set this to the actual block size of the storage medium / filesystem to avoid "overrun" at the end of the filesystem if you were doing a 1:1 size clone; in this case I've specified to use a 1 Gigabyte block size because the source disk is more than 1GB smaller than the destination disk and we have more than 2GB of available memory (RAM) in the system to use for buffering I/O. This is simply to speed up the data duplication; and you can use other values like 128M as shown in that video to specify a smaller block size.
  • status=progress - this is also an optional directive telling the command to post the progress to the standard output (STDOUT) so the command will show a progress indicator on the command line as it is running rather than just sitting there doing its thing with no output looking like it is "frozen" until the command completes.

Good luck, and if you have any other questions feel free to ask.
atmakeoutcreek Nov 19, 2023 @ 6:06am 
PopinFRESH, thank you so for the detailed guide! So useful and informative, will definitely follow it once my new SSD and enclosure arrive. Much appreciated!
atmakeoutcreek Nov 22, 2023 @ 2:32am 
Hi again @PopinFRESH so I tried cloning with your step-by-step guide and it doesn't seem to be working. I'm not sure what's wrong but the Deck is not detecting the SSD enclosure in Dolphin or KDE Partition Manager but it shows up when i enter lsblk.

And when I try executing the clone it says "error writing no space left"

Here's a copy of what I did in Konsole:

(1)(deck@hasnadeck ~)$ sudo ls /dev/disk-by* [sudo] password for deck: ls: cannot access '/dev/disk-by*': No such file or directory (2)(deck@hasnadeck ~)$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 476.9G 0 disk └─sda1 8:1 0 16M 0 part nvme0n1 259:0 0 57.6G 0 disk ├─nvme0n1p1 259:1 0 64M 0 part ├─nvme0n1p2 259:2 0 32M 0 part /efi ├─nvme0n1p3 259:3 0 32M 0 part ├─nvme0n1p4 259:4 0 5G 0 part / ├─nvme0n1p5 259:5 0 5G 0 part ├─nvme0n1p6 259:6 0 256M 0 part /var ├─nvme0n1p7 259:7 0 256M 0 part └─nvme0n1p8 259:8 0 47G 0 part /var/tmp /var/log /var/lib/systemd/coredump /var/lib/flatpak /var/lib/docker /var/cache/pacman /srv /root /opt /home (deck@hasnadeck ~)$ sudo dd if=/dev/nvme0n1 of=/dev/sda oflag=sync bs=1G status=progress 5368709120 bytes (5.4 GB, 5.0 GiB) copied, 22 s, 241 MB/s dd: error writing '/dev/sda': No space left on device 6+0 records in 5+0 records out 6151483392 bytes (6.2 GB, 5.7 GiB) copied, 27.1736 s, 226 MB/s (1)(deck@hasnadeck ~)$

Would really appreciate any help. Thank you.
atmakeoutcreek Nov 22, 2023 @ 5:54am 
OK after much troubleshooting and researching I managed to successfully clone my SSD and keep my Steam OS on 3.4.11.

I followed this Reddit thread https://www.reddit.com/r/SteamDeck/comments/y4x6am/tutorial_cloning_steam_deck_ssd_via_enclosure/

And I think this fixed "error writing no space left":
sudo rm /dev/sda

The dd command that I ended up using is a little different. It took a while to copy my 64gb drive to the new 512gb one, around half an hour. No errors though!

Then I followed the iFixit tutorial to swap the SSD, including draining the battery to 25% and putting it in battery storage mode first (better safe than sorry).

When I turned my SD back on, voila! It's the same exact copy of my old SSD. All games, settings, plugins, and even CryoUtilities still intact. And most importantly, still Steam OS 3.4.11.

No issues so far and very happy with the result. Thanks for all the help, everyone! :steamthumbsup:
VGMASTER89 Feb 14, 2024 @ 7:15pm 
Can confirm that this method from PopinFRESH is still working as of February 2024! Thanks!
K2-XT Jun 7, 2024 @ 4:35pm 
Thank you so much PopinFresh for pointing out that the home partition expands to fill the space once booted, you're completely correct!
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Nov 18, 2023 @ 7:35pm
Posts: 11