How to use "moved root" on new installation on openHABian?

Now it happened to me: The SD card stopped working.

I once moved the root to a SSD, but how can I use the SSD, where my “old” system resides, on a new openHABian installation? Is there any tutorial?

I took a look into the openhabian-config, but there is only a “move to SSD” (including formatting the SS) menu entry - but there’s no not “use existing SSD root” as an option…and in the forum I didn’t find this question.

I have very basic knowledge in Linux, so if I need to change some system files I should be able to manage it :slight_smile:

Thank you!

Never mind, I connected the SSD on my PC, copied the files - and copied all back over to the new installation. When everything runs, I make a new “move” to the SSD to get away from the SD card (which was a good idea in the past otherwise my installation would have been lost)

1 Like

Just for the records: This way will screw the access rights, because the system runs under the user and group “openhab” but files uploaded via samba uses “openhabian”.

Solution:

sudo chown -R openhab:openhab /var/lib/openhab2

Hi,

to use an existing SSD or USB-stick that contains a move root with a new installation, you only have to edit /boot/cmdline.txt and point root to /dev/sda1

To do that, enter

sudo nano /boot/cmdline.txt
... change the line root=... to root=/dev/sda1
leave nano with crtl-x
YES to save

Reboot and you’re done

1 Like

Thanks, @peter_juenger I‘m going to do that right now.
@ThomDietrich: How about adding this functionality in openhabian-config?

Thank you all for your support,
Boby

"Unable to mount root fs"
Now my Raspi isn’t booting anymore :-/
Looks like I need to reinstall the system