Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
sb hermit
Dec 13, 2016





There's a crazy boot mechanism called "gpio boot mode" that has big red flashing light caveats and could completely make your rpi unusable but it could fit the bill if you want to put kodi on the sd card and raspbian on a usb thumb drive.

:siren:but it will brick your rpi without significant work so I really don't recommend it:siren:

let us know if you actually try it though. It looks dope.

Adbot
ADBOT LOVES YOU

sb hermit
Dec 13, 2016





Oldstench posted:

First, thanks everyone for the advice. Second, if the linux nerd poo poo comment rubbed anyone the wrong way, I apologize. I just meant it as in "I'm as stupid as a bag of grass clippings" and know I won't be able to do any serious clever poo poo to make this work. Klyith's suggestion seems the most straightforward, so I'll give that a shot.

To be honest, I would have felt really bad if you really did try "gpio boot mode" and end up turning your raspberry pi 3b+ into a paperweight. Especially because they're still hard to find nowadays!

sb hermit
Dec 13, 2016





cruft posted:

I've been dieting, okay? Trying to make it down to "large Linux nerd".

:same:

sb hermit
Dec 13, 2016





representatives at my local raspberry pi distributor (microcenter) have said that the local university (uc irvine) has been frequently snapping up all available supply of 3b+ pis and 4 pis of all shapes and stripes.

Demand is incredibly high and the chip shortage is very real.

sb hermit
Dec 13, 2016





GreenBuckanneer posted:

is it still impossible to buy a pi4 at msrp?

I see amazon selling them for $150 and lmao gently caress that

You may be able to buy a bundle or something but buying a bare rpi4 at msrp seems exceedingly difficult unless you can pick up a used one from a friend.

sb hermit
Dec 13, 2016





Depending on your requirements, you may be able to pick up a raspberry pi 400 for $99 and shipping. It's a 4GB rpi 4 (more or less) with a built in keyboard. If you're serious about this route than make sure the minor differences between the 400 and the standard pi4 aren't dealbreakers.

sb hermit
Dec 13, 2016





Hadlock posted:

Fell down a hole Saturday(?) night trying to compile out of date drivers for a usb wifi stick and debugging gcc error messages, finally decided to order USB wired Ethernet thing for $10, 27,000 5 star reviews, Ubuntu fired right up

Installed xfce4, rebooted and it did an honest to god kernel panic, I don't think I've seen one of these since compiling gentoo Linux for i586 from scratch back in 2000



looks like a bad driver. Either it doesn't understand the parameters it's getting from the dongle or the dongle itself is messed up and sending junk to it.

Have you tried using it on a desktop or laptop? And if so, what distribution does it use?

sb hermit
Dec 13, 2016





Hadlock posted:

It's this thing https://www.amazon.com/gp/aw/d/B00MYT481C with an AX88772A pretty much the gold standard

I rebooted and since then no issues, booted into xfce4 after about 3-5 minutes so not gonna worry about it

Xfce4 performance is in the 0.25fps range. Maybe worse. I'll have to do some more checking. Clockwork has a version of Raspbian that will play doom at > 5fps on a D1 so something is off still

Ran out of time to try more lighter weight wm. Can't figure out what DISPLAY needs to be for xwindow to boot

Oh, you're using the risc-V. Good luck with that! I figure those kinds of things would probably be decent as a headless server but graphics will be a bit tough until a good video core gets released.

The occasional panic can't be helped, I guess.

Do you plan on installing a watchdog?

sb hermit
Dec 13, 2016





it was only now when I realized that you had circled the hardware name

but I've been out of the driver development business for awhile and it didn't click

I have an audio driver (mic and speaker) for rpi that I want to forward port to a newer version. It uses dkms and doesn't work with newer kernels out of the box because they must've changed the audio API at some point. Guess it's as good a project as any to keep my skills up to date.

sb hermit
Dec 13, 2016





they probably want to get a lot of chips out on this revision so that they can work on both the manufacturing kinks and a new asic at the same time before they go full throttle. As long as people are buying these risc-Vs, might as well sell 'em!

I bet there are plenty of embedded development folks that still want to get their hands on these things because RPIs are even more rare than Bigfoot these days. Particularly for university courses and whatnot.

sb hermit
Dec 13, 2016





https://ubuntu.com/blog/canonical-enables-ubuntu-on-starfives-visionfive-risc-v-boards

Previously, Ubuntu had promised support for a RISC-V board that goes for about $179.

https://www.phoronix.com/news/Ubuntu-22.10-Sipeed-LicheeRV

Well, for those of you who are looking to do RISC-V on the cheap, Ubuntu 22.10 is going to support a $17 board that's 1 GHZ and 512 MB RAM.

I imagine that real solutions would use yocto or buildroot to build a cut-down version of an OS for production use but an Ubuntu image would certainly be useful for prototyping.

sb hermit
Dec 13, 2016





ickna posted:

If your application can work with a read-only file system then that isn’t as big of a deal

Building a read-only file system is a good idea and would probably work better with an embedded-oriented distribution like yocto or buildroot.

sb hermit
Dec 13, 2016





Mantle posted:

How does Ubuntu promise all the applications in the distro are going to work? Are they really taking responsibility for compiling every application? Or does it cause a split where different applications are supported on different architectures?

I expect them to probably cross compile and test the main packages, which is but a small subset of the total packages available to the average ubuntu user on x86.

Many of the commonly used services and software are in the universe and multiverse repositories.

sb hermit
Dec 13, 2016





Hadlock posted:

I am running Ubuntu on my D1 (first gen allwinner RISC-V) powered mango pi. The problem with the D1 is that it has the most rudimentary 2D graphics subprocessor, or at least the graphics leave a lot to be desired. I forget the 2d graphics subprocessor tech they're using, but I think when I checked it dates back to the 1990s. That is not an exaggeration

These D1 chips are good for validating your code/toolchain compiles/runs RISC-V but there's no functional GPU in the D1

Haven't tried attaching to the RISC-V X server from my laptop yet though

Looking forward to the D2 or second gen chips though

Yeah, graphics tech feels like it would be just as hard as cpu tech, so I'm not surprised that it's not seeing any love until the cpu becomes stable. There's work on some open source gpu cores but it could take awhile until a truly free core becomes available. On the other hand, maybe they could incorporate PowerVR or something, since they seem to really want to be a part of the RISC-V ecosystem. At any rate, updating a cpu to have both compute and graphics cores is gonna be a tough task for a fledgling system.

sb hermit
Dec 13, 2016





https://arstechnica.com/gadgets/2022/10/still-cant-buy-a-raspberry-pi-board-things-arent-getting-better-anytime-soon/

Engineered so well, and with all this fantastic support, that commercial companies are snapping up all the product for their own solutions and/or prototypes or whatever

Makes a much stronger case for an open riscV solution that anyone can fab

sb hermit
Dec 13, 2016





cruft posted:

I've been transcoding videos for the last week or so on the Raspberry Pi 4. All four cores are pegged at 100% and I'm even offloading h264 encoding onto the hardware.

The case it's in is a gigantic heat sink. Like, the case is 100% heat sink. No fan. It's stayed under 70 degrees the entire time: right now it's at 66. GeekPi aluminum case in case anybody's interested.

If that's 66F then that's amazing. If that's 66C then that's also amazing but I had no idea that raspberry pis could run so hot and still be comfortable. I know that AMDs and Intels only start to worry at 80C but I had considered ARMs to be a bit more fragile.

sb hermit
Dec 13, 2016





cruft posted:

Heh. 66C. The CPU starts to throttle itself when it hits 80, so there's a nice bit of thermal overhead here. I imagine I'd see a few more degrees in summer, but I still won't need a fan.

If I get any more rpi 4b, I'll have to pick that up. Seems really useful.

sb hermit
Dec 13, 2016





cruft posted:

Here's what I've found:

  • Alpine Linux using this guide
  • Flatcar Container Linux using this guide (I failed to get it working)
  • Fedora CoreOS (guide)
  • Fedora Silverblue (homepage: this may have been obviated by Fedora CoreOS)
  • OpenSUSE MicroOS (home)
  • NixOS (home)
  • GNU Guix (home: seems like a desktop distro)

I'd use Flatcar if I could--I like it a lot--but after a Saturday morning I wasn't able to get it to boot.

I've used Fedora CoreOS at work and freaking hated it: one of my co-workers calls it "Fecos" now to express disdain.

I have a high regard for Alpine: I actually based my own specialty embedded Linux distribution off of some concepts Alpine pioneered. This might be a good way for me to go.

MicroOS looks intriguing. CoreOS used to be The poo poo for container OS. Then Red Hat bought them and almost overnight it changed to some weird ostree bonkers thing that now needs rpm somehow, so a fork sprung up called Flatcar that was the original CoreOS. Then Microsoft bought Flatcar. So I guess MicroOS is openSUSE's offering of the same basic idea, so they can stay in the game. I'm not crazy about it using NetworkManager, and I'm not positive "we use btrfs snapshots a lot" is the read-only / I'm after, but I need to read more, because it also says it's not altered during runtime.

I've played with NixOS before. It feels a lot like a research OS, where they invented a bunch of stuff that didn't exist at the time, and now there are better alternatives. Having to learn the "nix" tool seems like maybe something I don't want to invest time in.

GNU Guix looks like a desktop distro.
:nice:, thanks for this!

I'm tempted to roll my own with buildroot/yocto but embedded linux can be a bit of a grind.

sb hermit
Dec 13, 2016





cruft posted:

You might give openwrt a spin if you're thinking of this route. I should have listed it as another read-only / distro.

I never saw it as a distro. Thanks!

sb hermit
Dec 13, 2016





AlternateNu posted:

There's an Arduino thread?

Fake Edit: What a terrible page snipe. :negative:

I think it's this:

https://forums.somethingawful.com/showthread.php?threadid=3505424

sb hermit
Dec 13, 2016





https://www.pine64.org/baseboard/

https://forum.pine64.org/showthread.php?tid=760

The pine64 is supposed to be somewhat compatible with rpi headers but caveat emptor

if you want a riscV board then you can try the vision V

https://www.tomshardware.com/news/visionfive-riscv-board

sb hermit
Dec 13, 2016





A pi-specific power supply will supply a bit more than 5v, usually 5.1v, to account for variances in cable quality. A 5.1v power supply is a good indication that it was built with the raspberry pi in mind.

You can try switching out the cables for something thicker or better quality.

Also, if you only occasionally get the low voltage warning, you can try using a governor that doesn't change power consumption, like powersave or performance.

sb hermit
Dec 13, 2016





Dicty Bojangles posted:

I saw that and am so tempted… I drunkenly ordered a Zero W without any particular project in mind a couple weeks ago that finally arrived, and have spent the time trying to figure out what’s worth doing with the thing.

If you don't have a mini hdmi adapter and a usb otg adapter (with the correct dimensions! otherwise it's worthless) then you may want to consider picking them up.

The zero w doesn't use standard hdmi (the pi 4 uses hdmi micro, which is also incompatible), so you'd need it for display

The zero w also doesn't have standard usb ports, so you'll need the otg cable to plug a keyboard into it.

One nice thing about pi zero is that it takes very little power, so you can generally plug it into any usb slot and it works (the standard pi stuff tends to draw too much power). I'm working on some firmware that automatically plays movies when it's connected to a tv (since the tv can provide output via hdmi and power on the service port). Maybe you could use a bluetooth joypad and use it to play old console games?

sb hermit
Dec 13, 2016





there are a lot of projects out there that convert a pi zero to a handheld gaming device but the additional hardware costs money

likely you could just get by with, as I mentioned, connecting it to a tv and then connecting a joypad via bluetooth

sb hermit
Dec 13, 2016





Thanks Ants posted:

CIFS is not NFS

just want to repeat this

they are wildly different filesystems

it's dead simple to use and is a fine option if you have a secure network (i.e. you are't running it over the internet)

but it doesn't really do security. unless you use kerberos and a lot of other elbow grease and candle light, nfs doesn't even support encryption or logins. the most that pre nfs4 can do is only allow access to certain shares via the ip address of the client.

Anyways, since CIFS (aka SMB) works, just stick with that. It's what most small networks use without any issues.

sb hermit
Dec 13, 2016





maybe the user doesn't have read and write permissions on the directory on that share

can that share be mounted and viewed when using the same user and password on a standard computer?

sb hermit
Dec 13, 2016





Death of Prime posted:

It can. I can even find the folder when in the GUI and file explorer. All my PCs see it and access it as well.

Sorry, it's just that a lot of stuff seems a bit confusing.

For this listing:


it looks like /mnt/share was mounted with //192.168.1.247/volume1

However, it didn't show the full permissions and ownership (like with ls -l)

Do you mind getting another screenshot? Also, can you look into the "Shared Videos" directory as root, or change permissions?

Also, for this listing:

Death of Prime posted:

share is the folder I'm trying to get into


was /mnt/share mounted as //192.168.1.247/volume1/'Shared Videos' ?

I just want to make sure because it helps with the mental model I'm building of how your setup is laid out and would really help to address an inconsistency

EDIT: fixed a share name

sb hermit
Dec 13, 2016





maybe I should get a synology, I've heard good stuff about them

the only thing I have within reach is a qnap, I think

sb hermit
Dec 13, 2016





Death of Prime posted:

I'm doing this remote and can't grab screen shots but here are the results


The command I used to mount
sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.1.247:/volume1/'Share Videos' /mnt/share

When I try and cd to the directory /mnt/share I get the below error
pi4@raspberrypi:/mnt $ cd share
-bash: cd: share: Permission denied

ls-I command give me this
pi4@raspberrypi:/mnt $ ls -l
total 4
d--------- 1 root root 62 Apr 16 17:52 share
drwxr-xr-x 2 root root 4096 May 18 17:51 share2

Thanks! NFS is different than CIFS. If you've used NFS with your other clients, then this would be a good start. But if you used CIFS or SMB, it may be worth using that instead. Just a heads up.

Anyways, we can keep using NFS for now. The security won't be great but it can be a start. First, you will want to go into the synology nfs settings and set squash to "no mapping". If it does what I think it does, then this will allow root to access your files. I pulled the UI information from here:

https://kb.synology.com/en-ph/DSM/help/DSM/AdminCenter/file_share_privilege_nfs?version=7

Next, you can try mounting again and see if things look a bit better:

code:
sudo mount -t nfs4 -o proto=tcp,port=2049,no_root_squash 192.168.1.247:/volume1/'Share Videos' /mnt/share
However, if this doesn't work, then please do the following:

code:
sudo mount -t nfs4 -o proto=tcp,port=2049,no_root_squash 192.168.1.247:/volume1 /mnt/share

sudo ls -lAd /mnt/share/'Shared Videos'
This will let us know who owns that directory and what its permissions are.

As you know, NFS doesn't use usernames and passwords (modern NFS uses kerberos for user authentication, security, and mapping which is a five thousand word post on its own) so buckle up for some more debugging.

sb hermit
Dec 13, 2016





tuyop posted:

What do you get with your ls -l when you add a umask?
code:
sudo mount -t nfs4 -o proto=tcp,port=2049,umask=002 192.168.1.247:/volume1/'Share Videos' /mnt/share
If that’s no good, op, you need to change your nfs settings from this post

To squash all to root and try that out.

ah, you beat me to it

yeah, disabling root squash on the server (which is the synology in this case) should really help things.

adding the umask could help as well

sb hermit
Dec 13, 2016





it depends on what you're doing and what your resources are

if your systems and resources are already configured for nfs and you have the infrastructure for it, it's good, particularly for servers that talk to each other (like for storing databases, or whatnot)

if you have older unix systems, then it's still good

if you want to run virtual machines and store the disk images over NFS, it's a well supported use case

anytime you have unix systems talking to unix systems (or linux talking to linux), the test cases and scenarios will assume NFS

but it can be a big learning curve. NFSv4, in particular, has a lot of pitfalls and changes that NFSv3 and earlier did not.

On the other hand, SMB and CIFS are great if you have a lot of end user clients (desktops, tablets, laptops, etc) talking to a file server. Even modern Macintoshes will use CIFS for Time Machine (in the past, they supported AFP and AppleTalk only, which was mac specific). If you have a network with actual real users on desktops, you should use CIFS to have them talk to the file server. If you have servers talking to each other or to dedicated SANs, then the use case for NFS is bigger. It all depends on your requirements.

sb hermit
Dec 13, 2016





in general, SMB and CIFS are interchangeable but CIFS is the modern term and SMB is the older term.

sb hermit
Dec 13, 2016





Death of Prime posted:

I get this error with the new mnt command


I also changed the mapping


If you don't mind, can you try again with your old mnt command?

Disabling squash mapping should hopefully fix more access configuration issues.

If you still encounter issues, and "sudo chmod 755 /mnt/share" doesn't work, then please try this:

code:
sudo mount -t nfs4 -o proto=tcp,port=2049,no_root_squash 192.168.1.247:/volume1 /mnt/share

sudo ls -lAd /mnt/share/'Shared Videos'

sudo ls /mnt/share/'Shared Videos'
If this still doesn't work then we may have to try using a lower nfs version number or seeing if some synology web ui option was overlooked.

sb hermit
Dec 13, 2016





Subjunctive posted:

Running a database over NFS sounds like a great way to lose data, slowly.

well yeah

https://www.postgresql.org/docs/9.0/creating-cluster.html

sb hermit
Dec 13, 2016





Death of Prime posted:

Using my original mount command with. I can now see the folders inside "Shared Videos' but still cant get into the directory.


Using the new one suggested


Great! This is some good progress. The permissions that were set on Shared Videos shoud have allowed you to look inside, so these errors are likely because of nfs4 specific stuff or the permissions on /mnt/share are restrictive.

From your previous post, it looks like /mnt/share had some restrictive permissions on it. We can loosen it up a bit with:

code:
ls -lAd /mnt/share
sudo chmod ugo+x /mnt/share
ls -lAd /mnt/share
ls -lAd /mnt/share/'Shared Videos'
All the "ls" commands are to help us understand the state of things, how they change, and if the changes are persistent.

If things work eithout errors, hopefully you can do

code:
ls -l /mnt/share/'Shared Videos'
and see some more stuff. You'll particularly want to note the read permissions on the files that you want to use. In this case, if you are encountering issues, then posting the output of the above (ls -l /mnt/share/'Shared Videos') would be helpful.

We'll be getting into more hairy issues at this point, because it's likely your userid number on the pi will not match what's on the synology. If you're just reading files, and the permissions are ok, then this will be irrelevant. Otherwise, either we can patch around it with an earlier version of nfs, use idmapd, or something else. I'm not entirely sure about how to wrangle idmapd in this case (my systems use a centralized user database so the userid numbers are in sync) but we can work through it. Or we can try using squash, now that we see progress.

sb hermit
Dec 13, 2016





Death of Prime posted:

share is the folder I'm trying to get into


This was the previous set of permissions I was referring to earlier.

Keep in mind that root, as the superuser, is not subject to any access permissions whatsoever so they can (generally, with few caveats) see any directory or file regardless of what the permissions on them are.

Also, if it's much easier for you to copy and paste output instead of screenshots, then feel free to do so. But I highly suggest using code blocks (such as the ones in my posts) because fixed-width text makes some kinds of output much easier to understand.

sb hermit
Dec 13, 2016





Death of Prime posted:

No errors till the end when I try and open the directory. I would like it to read/write because I'm using sabnzbd on the pi and sending files to the Synology

code:
pi4@raspberrypi:~ $ sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.1.247:/volume1 /mnt/share
pi4@raspberrypi:~ $ ls -lAd /mnt/share
drwxr-xr-x 1 root root 736 May 22 11:22 /mnt/share
pi4@raspberrypi:~ $ sudo chmod ugo+x /mnt/share
chmod: changing permissions of '/mnt/share': Read-only file system
pi4@raspberrypi:~ $ ls -lAd /mnt/share
drwxr-xr-x 1 root root 736 May 22 11:22 /mnt/share
pi4@raspberrypi:~ $ ls -lAd /mnt/share/'Shared Videos'
d--------- 1 root root 62 Apr 16 17:52 '/mnt/share/Shared Videos'
pi4@raspberrypi:~ $ ls -l /mnt/share/'Shared Videos'
ls: cannot open directory '/mnt/share/Shared Videos': Permission denied

Ok, let's try a submount which should hopefully get past the read-only filesystem issue.

code:
sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.1.247:/volume1/'Share Videos' /mnt/share

ls -lAd /mnt/share
sudo ls -l /mnt/share
ls -l /mnt/share
The first ls command is to see if the permissions are correct and if my mental model of your permissions layout is consistent.

The second ls command is to see who owns the subdirectories of the 'Share Videos' directory, which could help in figuring out if we could mount them as subvolumes as necessary and see how the permissions are set up. It has to be run as root so that the command succeeds and it also acts as a form of sanity check.

The third ls command is so that you can check how things work as the pi4 user instead of root. If that command succeeds then I suggest trying to see if you can access other files and directories and "kick the tires" so to speak.

From looking at an earlier post of yours:

Death of Prime posted:

pi4@raspberrypi:/mnt/share $ sudo mount -t cifs -o username=MYUSERNAME,password=MYPASSWORD //192.168.1.247/volume1/'Shared Videos' /mnt/share
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

I did use my actual username and password

I suspect that USERNAME on the synology is not "pi4". I just want to let you know that we may have to create a new user with this exact USERNAME so that you can write files later. You may also need to install an nfs package (possibly nfs-common?) to get idmapd, and also set your nfs domain correctly. We can cross that bridge once you get read access working. See:

https://kb.synology.com/en-id/DSM/help/DSM/AdminCenter/file_winmacnfs_nfs?version=7

sb hermit
Dec 13, 2016





tuyop posted:

Do you have an explanation for what's gone wrong here? My mind is kind of blown that the cifs mount just didn't work.

By the way, I've been going with NFS because it's what the OP seems to want to do. CIFS behaves much more differently.

In this case, nfs has a configuration file called "exports" which defines how directories are exported. The configuration details change in subtle but incredibly significant ways between NFSv3 and NFSv4... one lf them is allowing submounts. So in NFSv4, you can mount a subdirectory of an export instead of the export itself, and this is actively encouraged (look for "fsid=0") in modern manpages for the exports file.

In this case, the top-level mount (Volume1) is probably exported read-only, but its subvolumes (the shared videos directory) are probably configured to be shared read/write.


OP, if you have the nfs package installed, you can type:
code:
sudo /sbin/showmount -e 192.168.1.247
which should give you the active configuration. You can install the nfs package with:
code:
sudo apt-get install nfs-common

sb hermit
Dec 13, 2016





cruft posted:

I've never heard of idmapd before. Does idmapd map usernames to UIDs so that pi4(uid 1001) files on the server are owned by pi4(uid 4993) on the client?

Back in my day we'd just sync the password files using NIS, which I guess is YP now.

I think so. idmapd is an nfsv4 thing. I am not that familiar with it but hopefully the tooling has improved enough for me to use it easily.

NIS is so 70s. LDAP support has been around since the 90s and even Microsoft picked it up for Active Directory so it's the current hotness. I've been using it on all my systems since the 90s and I almost got Darwin (the mac os x kernel) working with it.

Adbot
ADBOT LOVES YOU

sb hermit
Dec 13, 2016





Flipperwaldt posted:

OP had a problem with cifs and has been a sport playing along with the nfs troubleshooting because it was suggested that that would be useful. I don't understand how, but then there's a lot that goes over my head.

I'm sure if they want to go back to trying CIFS, we'll all be happy to help out.

Both have their advantages and disadvantages. I don't mind offering a hand with either of them.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply