Page 1 of 1

My second RPi Question

Posted: Sat 09 Jan 2021 6:32 pm
by Nottub
Forgive a second dumb question from me. :bash:

After much heartache and much head scratching, I've been playing around with an old RPi to get a usb drive to permanently mount. And I succeded in mounting it to the 'mnt' location. :o

I've now started from scratch again and tried to mount it to the 'home/pi' location and amended the 'fstab' with 'UUID=D8#######$$$$$DA /home/pi/ssd auto nofail,uid=1000,gid=1000,noatime 0 0'

However since it auto mounts to that location by default after boot, how can I check if the process I have set up to mount at startup, is actually working (the drive icon still appears on the desktop, whereas when in the mnt location it didn't). :?:

My ultimate aim is to move CumulusMX onto an SSD and to auto start on powerup of the RPi. The intention is to reduce the strain on the Micro SD Card.

Sadly I can't use the old RPi to run CumulusMX as it's too old for Mono.


thanks

Nottub

Re: My second RPi Question

Posted: Sat 09 Jan 2021 9:14 pm
by jlmr731
what is the output of df -h
should show each drive something like
/dev/sda1 221G 39G 171G 19% /
/dev/sdb1 11G 11G 11G 0% /home/pi/ssd

as you see the second line would show your new mount so as long as there is a second drive as in sdb you got it working

also lsblk should also show your drives the df -h show space on the drive

Re: My second RPi Question

Posted: Sat 09 Jan 2021 9:28 pm
by Nottub
Thanks Jeff, I'll try that tomorrow and post back.

I get the impression from your post that the single drive would show up twice sda1, and sdb1.

One from the mount at start settings I have applied, and a second from the Pi auto mount. If I see both then all is well?

Forgive my lack of knowledge, I'm at a very early stage.


Thank you

Nottub

Re: My second RPi Question

Posted: Sat 09 Jan 2021 9:49 pm
by jlmr731
no a single drive will only once as in sda the a after sd would be drive 1 and if you have b, c , d .... those are other drives
Now you might have /dev/sda1 /dev/sda2 .... those numbers are partitions of a drive
I was guessing you have an sd card in it then adding the second drive to get the output i described
but as you are adding that second drive and making a mount point it will show that on the other drive
Not to worry one learns by doing, and reading.. there is always someone to help

Re: My second RPi Question

Posted: Sat 09 Jan 2021 11:02 pm
by water01
Have you tried Berryboot. This will use your SD card as the initial boot mechanism and then switch to to the external drive to load quite a few versions of Linux (you choose) https://www.berryterminal.com/doku.php/berryboot.

I use mine to boot up a Kodi installation.

Re: My second RPi Question

Posted: Sun 10 Jan 2021 10:17 am
by Nottub
Jeff,

The output of def -h is:

Filesystem Size Used Avail Use% Mounted on
/dev/root 59G 3.1G 53G 6% /
devtmpfs 184M 0 184M 0% /dev
tmpfs 216M 0 216M 0% /dev/shm
tmpfs 216M 3.2M 213M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 216M 0 216M 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 46M 207M 18% /boot
/dev/sda1 2.0G 66M 1.9G 4% /home/pi/Cumulusmx
tmpfs 44M 4.0K 44M 1% /run/user/1000

Now I can see that '/dev/sda1', which is my 2gb pen drive is connected (I did call the folder Cumulusmx rather than SSD) so its there. But how do I know it's there because of auto mount, or there because of the steps I took to manually mount it at boot, or doesn't it matter?

I know that with Cumulus set to start at boot it won't start if the pen drive is added after boot.

I haven't rigged this up with my new RPi yet as I haven't ordered the SSD yet, until I can master these settings.

The output of lsblk is:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 1.9G 0 disk
└─sda1 8:1 1 1.9G 0 part /home/pi/Cumulusmx

mmcblk0 179:0 0 59.5G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 59.2G 0 part /


Thanks

Nottub

Re: My second RPi Question

Posted: Sun 10 Jan 2021 10:19 am
by Nottub
David, thanks for this.
Have you tried Berryboot. This will use your SD card as the initial boot mechanism and then switch to to the external drive to load quite a few versions of Linux (you choose) https://www.berryterminal.com/doku.php/berryboot.

I use mine to boot up a Kodi installation.
I'll check it out.

May be too much for me at my stage of knowledge though.


Kind regards

Nottub

Re: My second RPi Question

Posted: Sun 10 Jan 2021 10:45 am
by water01
Very easy to use. Install the image on your card, put that in your Pi and attach all other peripherals including USB Disk, and a network cable or Wifi (you will need a mouse for the initial setup) and then boot. It automagically picks up the config and then asks you where you want to install your images and should give you the option to use the USB Disk (usually SDA1/SD1 but may be different). Once done it then asks what operating Linux system you want to install (there is quite a choice) and after you have done that you are up and running.

You can, if you wish, install multiple distributions on the USB Disk and select a default. That will boot automatically unless you choose to override the default at boot (you will need a mouse attached to do that).

Re: My second RPi Question

Posted: Sun 10 Jan 2021 2:05 pm
by jlmr731
Nottub wrote: Sun 10 Jan 2021 10:17 am
Now I can see that '/dev/sda1', which is my 2gb pen drive is connected (I did call the folder Cumulusmx rather than SSD) so its there. But how do I know it's there because of auto mount, or there because of the steps I took to manually mount it at boot, or doesn't it matter?
OK yes i see it is there (didnt know how raspi did there file system so was wrong to say sda was a boot drive, thats the mmc****) so yes its mounted but how to tell if it will auto mount, just reboot and see if it comes back up (as it should your fstab file look right)
good luck with your new setup when you get it, there are many here with pis that will help if you have problems

Re: My second RPi Question

Posted: Mon 11 Jan 2021 7:49 pm
by Nottub
Hi all,

Just seeking a logic check here.

My SSD has arrived, but not the Sata connecting cable, that's due on Thursday. In the meantime I've been considering how to swap cumulus over from running off the micro sd card, to running on the SSD.

What I'm aiming to achieve Is the new SSD to be called 'Cumulus MX' and to mount this at boot, into the 'home/pi' directory. That's where the existing CumulusMX is running from.
So...
1) Using Filezilla copy all existing CumulusMX files and folders to a back up location on my pc.
2)Delete CumulusMX from the Pi.
3) Mount the SSD, which is called CumulusMX into the home/pi directory and ensure it mounts on boot.
4) Copy all files back into the SSD.

I'm hoping that Cumulus will continue to start at boot (as now) because the location of the. exe file effectively is in the same location, with the cumulus.service file remaining as it is in the /etc/systemd/system/ directory.

Any thoughts?

It's my primative logic that came up with this. Forgive me if I'm way off the mark but I could see this working.

Thank you

Nottub

Re: My second RPi Question

Posted: Tue 12 Jan 2021 2:08 am
by Cortmalaw
If you have bought a new RPi (tell us which model?) and an SSD, the simplest way by a million miles is as follows:

When running the Raspberry OS installer, plug in the SSD instead of an SD card. It will then install everything onto the SSD (and does it VERY quickly!).
Plug the SSD into the RPi, and it will boot from the SSD. You don't need an SD card at all.

If you want to transfer any Cumulus data across, then yes, use Filezilla to copy it from RPi booted with the SD card to your PC, then copy it onto the RPi booted from SSD.

All the things you have just learned about mount points etc are still valid - it's just that the SSD and not the SD card will be the 'main location'

Re: My second RPi Question

Posted: Tue 12 Jan 2021 12:34 pm
by Nottub
Thanks to all of you for your invaluable help over these past few weeks.

With these connectd up this morning I have achieved my objectives. Image

This was a completely new adventure for me and, at times a steep learning curve. However I now have an SSD auto mounting to my Pi4 (4gb), in the home/pi/ directory. So chuffed it works.

Just got to get a case for the Pi now, but hey, that's the easy bit (says he).

Shall have to delve into using my IP camera better than I am currently (Live stream to Pi, with VLC taking snapshots every 15 mins to coincide with the Cumulus ftp uploads). Just need to investigate how to change file names to a static one. But that's another day.

So my move from an old Weather Monitor II to a cabled VP2, with sensors sited separately (as close to Met Office Guidance as possible), and a better looking piece of software i.e. CumulusMX, I am content.

It's been challenging at times, especially the new Pi and its quirky operation (in comparison to Windows). To be honest I quite enjoyed the challenge.

So for now thank you all.


Best wishes

Nottub