Rishi Garrod replied to the topic 'Roll Back' in the forum. 3 months ago

When I was still using SD I just made sure I always had a copy of the current version on a SD card. Then I could do an update and know I could simply swap back to the previous version on the other SD card.

Read More...

Rishi Garrod replied to the topic 'How to properly backup PI4?' in the forum. 3 months ago

I am sure it would work fine to another SSD drive but I have a few SD cards laying around that are now redundant so this is an ideal use for them.

I really feels its making a big difference running from SSD. Far more responsive and SD card are far more likely to suffer failures than SSD drives.

Read More...

Rishi Garrod replied to the topic 'How to properly backup PI4?' in the forum. 3 months ago

I have recently moved to an SSD. I have moved the "Pictures" folder to a separate partition. I went looking for a backup solution and found rpi-clone. A great script which copies partitions and creates bootable images.
To get rpi-clone:
$ git clone  github.com/billw2/rpi-clone.git
$ cd rpi-clone
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin
$ cd rpi-clone
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

I make the backup to a SD card. I am only going to backup the first 2 partitions, boot and root.
I used:
sudo rpi-clone -f2 /dev/mmcblk0

The gives me a bootable copy on an SD card which I can put back on the SSD usinfg rpi-clone if I need to.

Read More...

For me the whole point of the extra partition was to make a backup of the Stellarmate image easy when its on the SSD. I went looking for a backup solution and found rpi-clone. A great script which copies partitions and creates bootable images.
To get rpi-clone:

$ git clone https://github.com/billw2/rpi-clone.git
$ cd rpi-clone
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

I make the backup to a SD card. I am only going to backup the first 2 partitions, boot and root.
I used:
sudo rpi-clone -f2 /dev/mmcblk0
For me the whole point of the extra partition was to make a backup of the Stellarmate image easy when its on the SSD. I went looking for a backup solution and found rpi-clone. A great script which copies partitions and creates bootable images.
To get rpi-clone:
$ git clone https://github.com/billw2/rpi-clone.git
$ cd rpi-clone
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

I make the backup to a SD card. I am only going to backup the first 2 partitions, boot and root.
I used:
sudo rpi-clone -f2 /dev/mmcblk0
For me the whole point of the extra partition was to make a backup of the Stellarmate image easy when its on the SSD. I went looking for a backup solution and found rpi-clone. A great script which copies partitions and creates bootable images.
To get rpi-clone:
$ git clone https://github.com/billw2/rpi-clone.git
$ cd rpi-clone
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

I make the backup to a SD card. I am only going to backup the first 2 partitions, boot and root.
I used:
sudo rpi-clone -f2 /dev/mmcblk0
For me the whole point of the extra partition was to make a backup of the Stellarmate image easy when its on the SSD. I went looking for a backup solution and found rpi-clone. A great script which copies partitions and creates bootable images.
To get rpi-clone:
$ git clone https://github.com/billw2/rpi-clone.git
$ cd rpi-clone
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

I make the backup to a SD card. I am only going to backup the first 2 partitions, boot and root.
I used:
sudo rpi-clone -f2 /dev/mmcblk0
 
This enabled my to make a bootable clone to a 32GB SD card. More importantly I can clone this back onto a SSD in case of failure. I always copy my imaging data from Pictures at the end of each session so it doesn't require backing up.
This enabled ey to make a bootable clone to a 32GB SD card. More importantly I can clone this back onto a SSD in case of failure. I always copy my imaging data from Pictures at the end of each session so it doesn't require backing up.

This enabled my to make a bootable clone to a 32GB SD card. More importantly I can clone this back onto a SSD in case of failure. I always copy my imaging data from Pictures at the end of each session so it doesn't require backing up.
This enabled ey to make a bootable clone to a 32GB SD card. More importantly I can clone this back onto a SSD in case of failure. I always copy my imaging data from Pictures at the end of each session so it doesn't require backing up.
 

Read More...

Not really sure what was giving me a problem changing the SMB share. I think it was a permissions issue.

Anyway changing the "Pictures" share (SMB) is very simple.

In the folder /etc/samba you will find a file called smb.conf. We need to edit this.

sudo nano /etc/samba/smb.conf

Scroll down to the end of the file and your will find a section called [Pictures]
modify it to contain your new path: path = /media/stellarmate/data/Pictures

^X Y to save the file

Now we need to restart samba:
sudo smbcontrol smbd reload-config

Now you should be able to view the Pictures folder on your Mac or PC.

 

Read More...

It's taking a little longer than I expected. There is a samba config file, /etc/samba/samba.conf, at the end you see a section [Pictures] which has the path. I changed it to the new path, restarted samba but the Mac refuses to see it. I can change to any sub folder in the "home" folder but not the new Pictures folder on the new partition.

I am not a real Linux expert myself but this has to be something simple. I will let you know when I have worked it out.

Read More...

I forgot I did change the permissions. I did it by changing the owner to stellarmate:
sudo chown -R stellarmate:stellarmate Pictures but your method works fine too.

How do you make the SMB connection? We will need to change the folder it points too.

Read More...

I forgot I did change the permissions. I did it by changing the owner to stellarmate:
sudo chown -R stellarmate:stellarmate Pictures but your method works fine too.

How do you make the SMB connection? We will need to change the folder it points too.

Read More...

Thanks Peter.

So to move your Pictures folder to the newly created partition there are two methods. I think the Linux guys will go for a Soft Link. Since they know all about that stuff I will focus on the other method which involves modifying the XDG configuration. This is simply telling the OS where various standard folders are like "Pictures".

First copy the Pictures Folder from its current location (in the Home Folder /home/stellarmate) to the new partition (/media/stellarmate/rootfs/home/stellarmate/Pictures). Use the File Manager if you are not comfortable with the command line.

Type the following at a command prompt:
xdg-user-dirs-update --set PICTURES /media/stellarmate/data/Pictures

My path may not match your so ensure you replace "/media/stellarmate/data/Pictures" with the path to your new Pictures folder.

One more step. We need to create a file called .config/user-dirs.conf.
Enter the following in a command prompt.
cd ~
sudo nano .config/user-dirs.conf (yes the "." is meant to be there, it makes a file/folder hidden in Linux)
Type the following in the file:

enabled=False
filename_encoding=UTF-8

Save using Ctrl X, Yes

then reboot:

sudo reboot

Now the OS will know that your Pictures folder is on your new partition.

Read More...

Maybe as an "easy" fix you can attach your SSD to USB1?

This is the process I followed.

So first I updated everything:

sudo apt update
sudo apt full-upgrade
sudo rpi-update

Then a reboot:

sudo reboot

Then an update of the bootloader:

sudo rpi-eeprom-update -d -a

Then a reboot:

sudo reboot

Now I am ready to change the boot order. For this I use the raspi-config utility:

sudo raspi-config

Select Boot Options
Select Boot ROM version
Select Latest then press OK
Choose No to Reset boot ROM to defaults
Select OK to end this section

Now we are sure we are using the latest boot ROM.
Next we are going to change the boot order.

Select Boot Order

Choose USB boot first, OK.
Do not reboot!

Now use the SD card copier (make sure your USB SSD drive is attached to a USB 3 port) and copy from the SD card to the USB drive.
This step deletes everything on your USB SSD
Now you can reboot and the RPI should boot from the USB (if the USB drive is not attached it will boot from the SD card).

sudo reboot

This process will have created a boot (/boot) partition and a root (/) partition on the SSD. The root partition will be the size of the whole remaining disk. If you want to make a backup from time to time this is not handy as it will take an age to copy and you will need a lot of storage (another SSD just as big) to make a backup. To solve this we need to shrink the root (/) partition. I used a tool called GParted. To install and run it do the following:

sudo apt-get install -y gparted

Now it gets a bit messy because we want to modify the partition we are currently using and that is not possible. So you must shutdown the RPi, disconnect the USB SSD drive and reboot, this will boot from the SD card (makes a nice check to ensure that still works as a backup). Once rebooted you can connect the USB SSD again.

Now start the partitioning tool:

sudo gparted (or select it from the System Tools menu)
Select the SSD drive in the dialog box on the right had side. It should be something like /dev/sda
In the partition table you should see:
/dev/sda1 and /dev/sda2. /dev/sda1 is the boot partion which we will leave alone. We are interested in /dev/sda2

Select /dev/sda2
Right mouse click and select "Unmount" (otherwise we can't change it).
Right mouse click and select "Resize/Move". I made mine 60GB.
Once this is done there will be free space available. From the Partition menu choose "New". The default is that it will use all the remaining disk. Give it a label (I called my "data") and select OK. Now you have everything ready to change the partition (nothing has actually happed yet). You will see a green check box just under the menu, when you are confident everything is OK press the green check mark. Now the actual changes will be made.

You should now have something that looks a little like this:
Maybe as an "easy" fix you can attach your SSD to USB1?

This is the process I followed.

So first I updated everything:

sudo apt update
sudo apt full-upgrade
sudo rpi-update

Then a reboot:

sudo reboot

Then an update of the bootloader:

sudo rpi-eeprom-update -d -a

Then a reboot:

sudo reboot

Now I am ready to change the boot order. For this I use the raspi-config utility:

sudo raspi-config

Select Boot Options
Select Boot ROM version
Select Latest then press OK
Choose No to Reset boot ROM to defaults
Select OK to end this section

Now we are sure we are using the latest boot ROM.
Next we are going to change the boot order.

Select Boot Order

Choose USB boot first, OK.
Do not reboot!

Now use the SD card copier (make sure your USB SSD drive is attached to a USB 3 port) and copy from the SD card to the USB drive.
This step deletes everything on your USB SSD
Now you can reboot and the RPI should boot from the USB (if the USB drive is not attached it will boot from the SD card).

sudo reboot

This process will have created a boot (/boot) partition and a root (/) partition on the SSD. The root partition will be the size of the whole remaining disk. If you want to make a backup from time to time this is not handy as it will take an age to copy and you will need a lot of storage (another SSD just as big) to make a backup. To solve this we need to shrink the root (/) partition. I used a tool called GParted. To install and run it do the following:

sudo apt-get install -y gparted

Now it gets a bit messy because we want to modify the partition we are currently using and that is not possible. So you must shutdown the RPi, disconnect the USB SSD drive and reboot, this will boot from the SD card (makes a nice check to ensure that still works as a backup). Once rebooted you can connect the USB SSD again.

Now start the partitioning tool:

sudo gparted (or select it from the System Tools menu)
Select the SSD drive in the dialog box on the right had side. It should be something like /dev/sda
In the partition table you should see:
/dev/sda1 and /dev/sda2. /dev/sda1 is the boot partion which we will leave alone. We are interested in /dev/sda2

Select /dev/sda2
Right mouse click and select "Unmount" (otherwise we can't change it).
Right mouse click and select "Resize/Move". I made mine 60GB.
Once this is done there will be free space available. From the Partition menu choose "New". The default is that it will use all the remaining disk. Give it a label (I called my "data") and select OK. Now you have everything ready to change the partition (nothing has actually happed yet). You will see a green check box just under the menu, when you are confident everything is OK press the green check mark. Now the actual changes will be made.

You should now have something that looks a little like this:

  



Reboot with the SSD attached and you should be done!

Have to start work now. I will explain how I moved the Pictures folder this evening.

Now I have written down all the steps I realise it's maybe not for the faint hearted (those of you who are not linux geeks) but I hope it will help.
 

Read More...

Thanks, great tip.

I had a Samsung T5 (500GB) spare so I decided to give it a try.
I did a few extra steps ensuring I had updated everything including the bootloader before I started.
After I had copied my SD card to the SSD the root partition was the size of the remaining disk. I used "GParted" to shrink the partition to 60GB to make it easier to copy. Then I created a new partition with the rest of the disk space and moved the Pictures folder to that partition.

Read More...