Boot from usb stick instead of SD card

Hi,

Simple question: how can I keep my current system running but use a usb stick instead of the SD card the PI3b+ is booting from?

Dietpi userdata is on an external HDD but I now want to replace the SD card.

What would I have to do to NOT reconfigure my system and keep using it as is?

Do I have to clone the sd card onto the usb stick or can I just put a new dietpi image on the usb stick and the system configuration/software comes from the still existing user data from the HDD?

Is this approach of using an usb stick over an SD card recommended or not?

I am just aware of the SD card max amount of write cycles so I would like to have a more stable and reliable system in the end.

Sorry for the amount of questions. Hope to get them answered here before I fix something that isn’t broken :wink:

Thanks
T

Simply migrate your SD card to USB flash drive. You can have a look to our blog post as a starting point. Moving a running DietPi system to a USB stick/disk or an onboard eMMC – DietPi Blog

Have a look to our blog post.

Yes you need to clone the SD card

No this will not work. All application will be missing. DietPi userdata holds the current data but not the application itself.

Yes, it is highly recommended. Another option would be to use an emmc module. For RPI there is the so called RaspiKey available but might be expensive. Around 20-25 € for a 16GB card. It’s a module that will be connected to SD card slot.

Yes, that’s correct information

Hope I answered most of your questions.

Of course there is a blog post. :grinning:

Didn’t know about that one. Excellent post.

I will digest and get on it.

Many thanks for the swift reply. A questions answered for now

T

FWIW: Here are my notes for what turned out to be a simple installation. Hope it can help others.

Host: NanoPi Neo3

  • Download DietPi image for Neo3 from DietPi website
    • Extract to *.img
  • Use Rufus to flash to *.img
    • 8 GB SD card
    • 64 GB USB stick
  • For BOTH SD card & USB stick:
    • Open /boot/dietpiEnv.txt with Notepad++
    • Change
      rootdev=UUID=fd......98
      to
      rootdev=/dev/sda1
  • Insert both SD card & USB stick → Neo3
  • Power up
  • SSH in (dietpi.lan, login: root, pass: dietpi
  • Wait while it goes through first time procedure
  • Set new PW
  • Fix Need Reboot loop
    • root@DietPi:~# dietpi-drive_manager
    • skip
    • Mount the SD Card (/dev/mmcblk0p1)
    • cp -r /boot/* /mnt//boot/
    • reboot