Raspbian: Difference between revisions
Jump to navigation
Jump to search
Line 57: | Line 57: | ||
= setup network booting = | = setup network booting = | ||
* setup dnsmasq.conf | |||
<pre> | |||
# /etc/dnsmasq.conf | |||
# DNS settings | |||
port=0 # disable DNS function | |||
#port=53 # enable DNS function | |||
domain-needed | |||
bogus-priv | |||
no-resolv | |||
server=142.90.100.19 | |||
# DHCP settings | |||
interface=enp4s0 # DHCP interface | |||
dhcp-range=192.168.0.0,static | |||
log-dhcp | |||
#quiet-dhcp | |||
#dhcp-ignore=tag:!known | |||
dhcp-host=dc:a6:32:d5:d9:8d,set:rpi4,set:dlpi,192.168.0.3,dlpi,infinite | |||
# TFTP settings | |||
enable-tftp | |||
tftp-root=/tftpboot | |||
# RPi4 settings | |||
dhcp-option-force=tag:dlpi,option:root-path,192.168.0.1:/nfsroot/dlpi,vers=3,tcp | |||
pxe-service=tag:rpi4,0,"Raspberry Pi Boot" | |||
# end | |||
</pre> | |||
* most important is the "pxe-service" entry to enable RPi4 tftp boot | |||
* systemctl dnsmasq restart | |||
* observe RPi4 is doing message type 2 and message type 5 | |||
* followed by requests for files under /tftpboot/eb47cd4d (numbers is the RPi4 serial number) | |||
* setup network boot: https://daq00.triumf.ca/DaqWiki/index.php/RPI3#RPi4_boot_from_network | * setup network boot: https://daq00.triumf.ca/DaqWiki/index.php/RPI3#RPi4_boot_from_network |
Revision as of 01:33, 13 February 2025
Raspbian OS
Links
Versions
- buster is debian 10
- bullseye is debian 11
- bookworm is debian 12
install RPi4 from scratch
- download 2024-11-19-raspios-bookworm-arm64-lite.img.xz
- cd /daq/daqstore/olchansk/linux/Raspbian/
- insert 16GB or bigger SD card into /dev/sdX
- xzcat 2024-11-19-raspios-bookworm-arm64-lite.img.xz | dd of=/dev/sdX bs=1024k status=progress
- fdisk -l ### to see if it worked
- eject /dev/sdX
- insert SD card into RPi4
- power up
- observe boot
- observe ask for language and keyboard layout, select English/US
- observe ask for create user, use "wheel" and password
- observe boot to login prompt
- login as wheel
- sudo /bin/bash
- ifconfig eth0 142.90.x.y netmask 255.255.224.0 ### use armdaq01 142.90.121.101
- route add default gw 142.90.100.18
- ping 142.90.100.18
- systemctl restart systemd-timesyncd
- date ### check date is correct
- apt update
- apt upgrade
- rpi-eeprom-update ### check boot loader firmware version, current and available may be different
- rpi-eeprom-update -a ### prepare firmware update, actual update is done on next boot
- shutdown -r now ### update firmware and boot new kernel
- login as wheel
- rpi-eeprom-update ### check boot loader firmware version, current and available should be same
- raspi-config ### in advanced options, set boot order to network-first
- maybe verify the changes took, BOOT_ORDER should read 0xf21 for boot from SD card, if absent, boot from network
root@magpi03:~# vcgencmd bootloader_config [all] BOOT_UART=0 WAKE_ON_GPIO=1 POWER_OFF_ON_HALT=0 [all] BOOT_ORDER=0xf21
- shutdown -h now
- power down
- remove SD card
- power up
- observe it's dhcp requests
setup network booting
- setup dnsmasq.conf
# /etc/dnsmasq.conf # DNS settings port=0 # disable DNS function #port=53 # enable DNS function domain-needed bogus-priv no-resolv server=142.90.100.19 # DHCP settings interface=enp4s0 # DHCP interface dhcp-range=192.168.0.0,static log-dhcp #quiet-dhcp #dhcp-ignore=tag:!known dhcp-host=dc:a6:32:d5:d9:8d,set:rpi4,set:dlpi,192.168.0.3,dlpi,infinite # TFTP settings enable-tftp tftp-root=/tftpboot # RPi4 settings dhcp-option-force=tag:dlpi,option:root-path,192.168.0.1:/nfsroot/dlpi,vers=3,tcp pxe-service=tag:rpi4,0,"Raspberry Pi Boot" # end
- most important is the "pxe-service" entry to enable RPi4 tftp boot
- systemctl dnsmasq restart
- observe RPi4 is doing message type 2 and message type 5
- followed by requests for files under /tftpboot/eb47cd4d (numbers is the RPi4 serial number)
- setup network boot: https://daq00.triumf.ca/DaqWiki/index.php/RPI3#RPi4_boot_from_network
Pre-D-12 information
Install
- boot from SD flash, follow stock documention:
- unzip 2021-10-30-raspios-bullseye-armhf-lite.zip into a .img
- dd of=/dev/sda if=2021-10-30-raspios-bullseye-armhf-lite.img bs=1024k status=progress
- boot from flash
- user pi password raspberry
- run rasp[i-config to enable US locale and US keyboard
- ifconfig -a to capture mac address, enter into dhcp, plug ethernet cable
- apt update; apt upgrade
- passwd pi change default password
- systemctl enable ssh; systemctl start ssh
- login remotely, run the ubuntu (debian 11) installation checklist
- boot from network
- TBD
"lite" image enable graphics
apt -y install mate-desktop mate-core mate-themes mate-desktop-environment mate-applets --fix-missing apt -y install lightdm lightdm-gtk-greeter systemctl enable lightdm systemctl start lightdm
"lite" image missing packages
apt -y install git emacs lm-sensors # system apt -y install cmake libcurl4-openssl-dev mariadb-client libmariadb-dev libsqlite3-dev # midas apt -y install chromium-browser # arm version of google-chrome