×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Stellarmate on SSD - easier than I expected

  • Posts: 245
  • Thank you received: 56
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.
The following user(s) said Thank You: Peter Kennett, Gustav Olav Lundby
2 years 9 months ago #72535

Please Log in or Create an account to join the conversation.

  • Posts: 1000
  • Thank you received: 155
That's awesome. Can you share the exact procedure to do that?
I assume it will erase all the data on the SSD, correct?
 
Last edit: 2 years 9 months ago by Peter Kennett.
2 years 9 months ago #72538

Please Log in or Create an account to join the conversation.

  • Posts: 1000
  • Thank you received: 155
Well - that's not working. :(
I spent three hours trying to get my Esatto focuser to connect, and it refuses.   The USB drive is attached to USB0 and I cant get the the Esatto to try a different port.  I disconnected, reconnected, powered every thing off, and rebooted a doze times.  I know Linux programmers can solve this easy - but I'm not skilled in that.  I attached my MacMini and everything connected fine - even with the USB drive attached.  

:(

 
Last edit: 2 years 9 months ago by Peter Kennett.
2 years 9 months ago #72540

Please Log in or Create an account to join the conversation.

  • Posts: 245
  • Thank you received: 56
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.
 
The following user(s) said Thank You: Peter Kennett, Sanjaya Kumar
Last edit: 2 years 3 months ago by Rishi Garrod.
2 years 9 months ago #72543
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 1067
  • Thank you received: 140
@Peter
this is a bug at the moment I have the same issue with the tty USB ports, I can’t connect two of my devices, I have asked Jasem on five different occasions to sort bit nothing as of yet…..:(
If I get one connected on USB0 then the other just keeps searching and can’t find a port, then it try’s USB0 and forces the other device to then disconnect….it’s been a nightmare, had to resort to using my mount of a Bluetooth device so I can connect…..
Last edit: 2 years 9 months ago by AstroNerd.
2 years 9 months ago #72544

Please Log in or Create an account to join the conversation.

  • Posts: 1000
  • Thank you received: 155
Rishi, that's great, thanks!!
2 years 9 months ago #72556

Please Log in or Create an account to join the conversation.

  • Posts: 245
  • Thank you received: 56
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.
2 years 9 months ago #72562

Please Log in or Create an account to join the conversation.

  • Posts: 1000
  • Thank you received: 155
Thanks again Rishi. When I followed your instructions to create the data partition, it shows up in "/media/stellarmate/data"
But I don't have permissions to write to it, so I cant copy the "Pictures" folder there. The permissions state "Only Owner" can see, modify or add to it.

I just tried sudo chmod 777 /media/stellarmate/data/  and that seemed to work.

Peter
Last edit: 2 years 9 months ago by Peter Kennett.
2 years 9 months ago #72570

Please Log in or Create an account to join the conversation.

  • Posts: 1000
  • Thank you received: 155
Rishi, I followed your instructions but had a problem in that I was unable to copy the Pictures folder as you instructed. It would not copy. I then just created a new Pictures folder in /media/stellarmate/rootfs/home/stellarmate/ and then continued with the best of your instructions which seemed to work… howler, when I SMB into the Stellarmate as a guest, it still points to the empty folder within /home/stellarmate.
2 years 9 months ago #72578

Please Log in or Create an account to join the conversation.

  • Posts: 245
  • Thank you received: 56
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.
2 years 9 months ago #72596

Please Log in or Create an account to join the conversation.

  • Posts: 245
  • Thank you received: 56
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.

I will look into the SMB connection and let you know.
Last edit: 2 years 9 months ago by Rishi Garrod.
2 years 9 months ago #72597

Please Log in or Create an account to join the conversation.

  • Posts: 245
  • Thank you received: 56
It's taking a little longer than I expected. There is a samba config file, /etc/samba/smb.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.
The following user(s) said Thank You: Peter Kennett
Last edit: 2 years 9 months ago by Rishi Garrod.
2 years 9 months ago #72599

Please Log in or Create an account to join the conversation.

Time to create page: 0.878 seconds