Skip to content

Commit 41f1dc6

Browse files
Update rpi.md
1 parent b6632ae commit 41f1dc6

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

docs/rpi.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,34 @@
1-
# RPi
1+
# :simple-raspberrypi: RPi
22

3-
## Raspberry Pi 4 boot from usb
3+
## [Raspberry Pi 4 boot from usb][1]
44

55
```shell
66
# to get vendorId and deviceId
77
$ dmesg
88
$ sudo nano /boot/cmdline.txt
99
usb-storage.quirks=152d:1561:u console=serial0,115200 console=tty1 root=PARTUUID=fcf4cb94-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
10+
$ echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
11+
```
12+
13+
```shell
14+
vcgencmd otp_dump | grep 17
15+
17:1020000a=USB boot disabled
16+
17:3020000a=USB boot enabled
17+
```
18+
19+
```shell
20+
sudo raspi-config
21+
sudo rpi-update
22+
```
23+
24+
## [Generate User Before Boot][2]
25+
26+
```shell
27+
echo 'mypassword' | openssl passwd -6 -stdin | sudo tee -a /boot/userconf.txt
28+
# /boot/userconf.txt
29+
user:password-hash
30+
# Enable ssh
31+
touch /boot/ssh
1032
```
1133

1234
## Ruby
@@ -65,3 +87,6 @@ sudo dphys-swapfile swapon
6587
```
6688

6789
## References
90+
91+
[1]: <https://www.makeuseof.com/how-to-boot-raspberry-pi-ssd-permanent-storage/>
92+
[2]: <https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/>

0 commit comments

Comments
 (0)