guides's People
Forkers
hydra3333 phamnuhuyentrang blknit koseng zfzhong mrwright313 zy015240 ilkeroralkasim ppsilv alex-t-stark antton joaoaimiranda alienhost vincent1890 jofegoor kkatayama bbc4cdd ricardomiguelcardoso ptesny thfrei moto-ctrl tml3nr magonzalez112 shayana18 astrolemonadeguides's Issues
netbot Zero - Bookworm changes
Add network manager instructions.
Check initrd stuff
netboot0 - dtparam=sd_poll_once=on
Add instruction for including "dtparam=sd_poll_once=on" to config.txt to avoid potential CPU overhead of repeatedly check for the presence of an SD card.
Upadte for removal of default use in RPiOS
netboot0 include zero 2 W
Guides as source
First thanks, for those excellent guides!
I wonder if there is any chance to have them available on a website where we can directly link to individual chapters? Currently, I see no way of pointing someone to specific information.
Typo Boot.pdf 4.1.1
Advatages
BTW thanks for all great guides!
mass storage gadget - present a text file
Is it possible to present just a normal text file to the USB host?
I want to pass a script so the user can go sh /dev/something
.
(And the script will execute commands passed by serial.)
Thank you.
netboot0 nft nat instructions are wrong
Replace bullseye instructions in point 3 section 4.4 with:
nft add table nat
nft -- add chain nat prerouting
nft -- add chain nat postrouting
nft add rule ip nat postrouting oifname "eth0" counter masquerade
Migration of NAS user passwords...
As suggested at
https://forums.raspberrypi.com/viewtopic.php?p=1987314#p1987314
here is an issue to add the user and password migration instructions
- Edit the /etc/passwd on the new system and paste the entries for the users copied from the same file on the old system
- Same for /etc/shadow
- Copy the file /var/lib/samba/private/passdb.tdb from the old to the new system
- sudo systemctl restart smbd
as in
https://forums.raspberrypi.com/viewtopic.php?p=1987216#p1987216
to nas.pdf maybe as Section 11.4 or maybe not.
ethernetgadget.pdf (gadget plugged into Pi connected to wireless repeater)
When ethernet gadget is plugged into a Pi that is connected to wireless repeater, its nameserver is set to localhost (/etc/resolve.conf), and name resolution on the gadget does not work:
https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=306121&p=1912854#p1912787
There might be a better solution, I just added a valid nameserver IP address to the ethernet gadget, and that worked.
As you highlighted, using internet nameserver cannot resolve name of wireless repeater and other computers of internal network. The Pi the ethernet gadget is plugged in uses the wireless repeater as DNS server, perhaps the ethernet gadget can do so as well? Alternatively perhaps the Pi where the gadget is plugged into can forward the gadget DNS requests ...
nas.pdf Typo
Great guide!
In section 6.2.1, sudo usemod -L username
should be sudo usermod -L username
smb1 query re samba and "building a Pi based nas"
Hello.
In 2.4 it mentions bullseye has smb v1 disabled.
Does that mean I don't need to install smb v1 on Win10 clients nor install wssd on the Pi ?
mass storage gadget - present a text file
Is it possible to present just a normal text file to the USB host?
I want to pass a script so the user can go sh /dev/something
.
(And the script will execute commands passed by serial.)
Thank you.
g_ether bookworm
Add network manager
nas.pdf
NFS troubleshooting add to check whether all packages including nfs-kernel-server are installed.
ethernet gadget - add instructions for sharing the Pi's network connection with the USB host
Run a command not a program?
I have read the entire pdf, and associated forums where people have specific problems. All I want is for a specific gpio pin (17) to start in mode "a3" on boot. I can get the pin when set as an output to not trigger on boot, as it is "on" when booted and I have a script that sets it to not on on boot. However, simply adding "@reboot raspi-gpio set 17 a3" does not actually set the pin to a3 mode unless I run that command inthe command window as raspi-gpio set 17 a3...
Is there a simple way to just write in the command into the boot config.txt file i am running?
thank you for your time and efforts!
Intentional delay
Hi, thanks for the guide, it's very helpful.
I've been using the mass-storage-gadget guide and found that the script in section 5.3.4 would not work every time.
ls: write error: Device or resource busy
I added an intentional delay before the last line and it seems to work reliably now.
#!/bin/bash
# /sbin/modprobe g_mass_storage file=/dev/mmcblk0p3
modprobe libcomposite
mkdir -p /sys/kernel/config/usb_gadget/mygadget
cd /sys/kernel/config/usb_gadget/mygadget
echo 0x1d6b > idVendor
echo 0x0104 > idProduct
echo 0x0100 > bcdDevice
echo 0x0200 > bcdUSB
mkdir -p strings/0x409
echo "1234567890" > strings/0x409/serialnumber
echo "me" > strings/0x409/manufacturer
echo "My USB Device" > strings/0x409/product
mkdir -p configs/c.1/strings/0x409
echo "Config 1: Mass Storage" > configs/c.1/strings/0x409/configuration
echo 250 > configs/c.1/MaxPower
mkdir -p functions/mass_storage.usb0
echo 0 > functions/mass_storage.usb0/lun.0/cdrom
echo 0 > functions/mass_storage.usb0/lun.0/ro
echo /dev/mmcblk0p3 > functions/mass_storage.usb0/lun.0/file
ln -s functions/mass_storage.usb0 configs/c.1/
sleep 1 # required to make the following line work
ls /sys/class/udc > UDC
Hope this helps somebody.
typo in 7.2.2
"t" missing in last command "sudo netfilter-persistent save", also netfilter-persistent needs to be installed via apt.
Mass Storage Gadget - minor typo
Ref: USB Mass Storage Gadget
A Beginner's Guide
Section 7.2 Changing The Backing Store On The Fly, on page 30 -
"The risks and dangers are the same as those when disconnection any drive "
Perhaps that should be 'disconnecting' ?
ethernet guide - forum reported issues
Add software RAID to NAS guide?
Consider adding software RAID to the NAS guide.
ethernet gadget - bullseye and iptables
Bullseye has dropped iptables in favour of nftables.
boot.pdf chapter 5.1.2 or 5.1.2.3
Maybe you could add a comment, that the Path key is ignored on startup, when you execute the file manually it works. This is critical for apps which rely on data in the working directory.
Detailed information here: https://forums.raspberrypi.com/viewtopic.php?t=292120
As a workaround you can define a shell script, which first changes the directory and then executes the file, also described in the link above:
Exec=sh -c "cd /home/pi/folder; /home/pi/folder/script"
fstab remove noatime from network/cifs mount options
Suggestion for the Bookworm guide 'journalctl' section
I'd suggest adding a few journalctl aliases to section 5.1. These obviously aren't complete, but will help people move forward instead of reflexively installing rsyslog.
For example:
alias jc='journalctl --boot' #Pager journal of current boot
alias jca='journalctl' #Undecorated journalctl operates on all boots, not just current boot
alias jcf='journalctl --follow' #Follow end of journal
alias jcg='journalctl --boot --grep' #From current boot for specified message string
alias jcr='journalctl --list-boots' #List all the system boots
To look at the log from the previous boot, one would do sudo jc -1
. More generally, to look at the Nth previous boot, sudo jc -N
run at startup bookworm
Wayland autostart
Python venvs
USB boot zero - bullseye & iptables
Bullseye has dropped iptables in favour of nftables
cron bookworm
python venvs
Setting dtoverlay=dwc2 at runtime?
Hi thagrol.
I'm writing a simple command for the the Rasperry Pi USB On-The-Go functionality, so you can do echo "type Hello!" | gadget
and the like.
I was wondering if it's possible to have the script configure everything at runtime, so you don't need to put dtoverlay=dwc2,dr_mode=peripheral
and modules-load=dw2,g_hid
in the /boot files.
I know there's modprobe
and there seems to be a dtoverlay
util on Rasperry Pi Os but not elsewhere (my Pi is on Void Linux).
I also found this page, where (right at the bottom) they use the /sys file system: https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/guides/dt-overlays.md.html
Here's my little project is here if you're interested: https://git.sr.ht/~geb/gadget
Mass storage device - libcomposite approach error
Hello, when executing the last line of the libcomposite approach to using my Pi Zero W as a USB mass storage gadget, I get the following error:
‘’’
root@pi:/sys/kernel/config/usb_gadget/mygadget# ls /sys/class/udc > UDC
ls: write error: Invalid argument
‘’’
Do you have any tips for resolving this issue?
Minor additions to Bookworm vs Bullseye guide
-
Quick Wifi connection setup with nmcli:
nmcli con add type wifi con-name FSL ssid FSL wifi-sec.key-mgmt wpa-psk wifi-sec.psk MixedFruitS@l@d save yes
-
Possibly a new section for
Firmware management differences
(i.e. location of config.txt, cmdline.txt etc.):Firmware size/mountpoint differences Bullseye: First partition of SD containing the firmware is mounted on `/boot` , sized at 256M Bookworm: First partition of SD containing the firmware is mounted on `/boot/firmware` sized at 512M
-
Headless logging optimization across all Pi's and OS version:
For purely headless setups, the order of the 2 console options in the cmdline.txt is very important: the last of the options should be the serial console, so that all boot messages are redirected to serial console. The default setup causes the messages to be directed to /dev/tty1:
Code:... console=tty1 console=ttyAMA0,115200 ...
-
A way of combining venv activation and python invocation into single shell command - helps when using multiple venv for tasks without affecting the parent shell environment:
bash -c "source $VENV_ROOT/bin/activate ; python $PYTHON_SCRIPT"
where the example of
VENV_ROOT
is/home/pi/.venv/
and example of 'PYTHON_SCRIPTis '/home/pi/SomeProgram.py
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.