Using systemd to mount a hard drive by UUID

May 21, 2020 Reading time: ~1 minute

Mounting a hard drive in systemd requires creating a .mount file in /etc/systemd/system/ folder.

I followed the instructions here --> https://www.thegeekdiary.com/how-to-auto-mount-a-filesystem-using-systemd/

My mount file is below:


[Unit]
Description=Nextcloud Data Mount

[Mount]
What=/dev/disk/by-uuid/82F6A048F6A03DF3
Where=/media/nextcloud
Options=uid=33,gid=33,fmask=0007,dmask=0007
Type=ntfs-3g

[Install]
WantedBy=multi-user.target



Adding systemd to the Pi for networking

May 20, 2020 Reading time: ~1 minute

Systemd and networking on the Raspberry Pi

I have been having problems with the Pi and networking. It seems Raspbian uses dhcpcd.conf to run the networking. While this is ok for the Pi while it is getting a DHCP address, it is no good for multiple ip addresses on the same interface. I decided to convert it to systemd.

I found this tutorial --> https://raspberrypi.stackexchange.com/questions/78787/howto-migrate-from-networking-to-systemd-networkd-with-dynamic-failover

What I did...Step 1, Step 2, skipped the rest.

I added all the ip addresses to the /etc/systemd/network/04-eth.network

    [Match]
    Name=e*
    [Network]
    #to use static ip (with your settings) toggle commenting in the next 8 lines.
    Address=192.168.0.13/24
    Address=192.168.0.14/24
    Address=192.168.0.15/24
    DNS=192.168.0.1
    [Route]
    Gateway=192.168.0.1
    Metric=19
    #DHCP=yes
    #[DHCP]
    #RouteMetric=10


LazyCoderOZ

I am a Linux guy, been around for 20+ years using Linux as my daily driver.
This is my blog on my discoveries and notes so I don't forget how I have done things :)