staging.inyokaproject.org

beim Boot übers Netzwerk, /boot kann nicht eingebunden werden

Status: Gelöst | Ubuntu-Version: Ubuntu 20.04 (Focal Fossa)
Antworten |

Senifor79

Anmeldungsdatum:
22. Februar 2012

Beiträge: 398

Hallo zusammen,

ich hab ein Raspi, der übers Netzwerk gebootet wird. Das klappt soweit, aber die Einbindung von boot nicht so wirklich. Das Verzeichnis firmware fehlt ganz und boot ist nur zur Hälfte da ....

config.txt

[pi4]
#kernel=uboot_rpi_4.bin
max_framebuffers=2

[pi2]
#kernel=uboot_rpi_2.bin

[pi3]
#kernel=uboot_rpi_3.bin

[all]
arm_64bit=1
device_treeenable_uart=1
enable_uart=1
cmdline=cmdline.txt
include syscfg.txt
include usercfg.txt
kernel=vmlinuz
initramfs initrd.img followkernel_address=0x03000000

cmdline.txt

net.ifnames=0 dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 nfsrootdebug elevator=deadline rootwait fixrtc init=initrd.img ip=dhcp rootfstype=nfs4 root=/dev/nfs nfsroot=192.168.5.22:/nfs/raspberry/55470428 rw

Leider weiß ich nicht mehr, wo ich suchen soll ... Kann mir jemand weiter helfen ? Danke.

VG Senifor

Senifor79

(Themenstarter)

Anmeldungsdatum:
22. Februar 2012

Beiträge: 398

ach sehe grad, dass der der Raspi mit kernel=vmlinuz ist ... das ist ein symbolischer Link zum Kernel ... das funktioniert nicht. Ändere ich das in vmlinux-5. .... funktioniert der boot ....

Warum geht der symbolische Link nicht ?

schollsky

Avatar von schollsky

Anmeldungsdatum:
3. Dezember 2012

Beiträge: 1338

Vielleicht kommt das daher, dass symbolische Links übers Netzwerk nicht aufgelöst werden?

Grüße

schollsky

Senifor79

(Themenstarter)

Anmeldungsdatum:
22. Februar 2012

Beiträge: 398

Danke für die Antwort.

am Server hängt eine Festplatte mit dem System, von dem er bootet.

Dann existiert ein TFTP Verzeichnis mit dem Inhalt des Bootverzeichnis für den Raspi, welcher vom Netzwerk bootet. Dieses Verzeichnis wird am Client gemountet. Das funktioniert eben so halb .... was ich nicht verstehe. (bei einem anderen Raspi funktioniert der Mount vollständig)

Verzeichnis am Server:

total 106136
lrwxrwxrwx 1 root root       27 May  9 11:20 System.map -> System.map-5.4.0-1034-raspi
-rw------- 1 root root  4165040 May  9 11:20 System.map-5.4.0-1028-raspi
-rw------- 1 root root  4167374 May  9 11:20 System.map-5.4.0-1034-raspi
lrwxrwxrwx 1 root root       43 May  9 11:20 bcm2711-rpi-4-b.dtb -> ./dtbs/5.4.0-1034-raspi/bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root       22 May  9 11:20 cmdline.txt -> ./firmware/cmdline.txt
-rw-r--r-- 1 root root   218981 May  9 11:20 config-5.4.0-1028-raspi
-rw-r--r-- 1 root root   219033 May  9 11:20 config-5.4.0-1034-raspi
lrwxrwxrwx 1 root root       21 May  9 11:20 config.txt -> ./firmware/config.txt
lrwxrwxrwx 1 root root       43 Jun 17 20:47 dtb -> dtbs/5.4.0-1034-raspi/./bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root       43 Jun 17 20:41 dtb-5.4.0-1028-raspi -> dtbs/5.4.0-1028-raspi/./bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root       43 Jun 17 20:47 dtb-5.4.0-1034-raspi -> dtbs/5.4.0-1034-raspi/./bcm2711-rpi-4-b.dtb
drwxr-xr-x 4 root root     4096 May  9 11:20 dtbs
drwxr-xr-x 3 root root     4096 Jul  3 17:35 firmware
lrwxrwxrwx 1 root root       19 May  9 11:20 fixup4.dat -> firmware/fixup4.dat
lrwxrwxrwx 1 root root       27 May  9 11:20 initrd.img -> initrd.img-5.4.0-1034-raspi
-rw-r--r-- 1 root root 29350621 Jun 17 20:41 initrd.img-5.4.0-1028-raspi
-rw-r--r-- 1 root root 29955318 Jun 17 20:45 initrd.img-5.4.0-1034-raspi
lrwxrwxrwx 1 root root       27 May  9 11:20 initrd.img.old -> initrd.img-5.4.0-1028-raspi
lrwxrwxrwx 1 root root       21 May  9 11:20 start4.elf -> ./firmware/start4.elf
lrwxrwxrwx 1 root root       21 May  9 11:20 syscfg.txt -> ./firmware/syscfg.txt
lrwxrwxrwx 1 root root       22 May  9 11:20 usercfg.txt -> ./firmware/usercfg.txt
-rw-r--r-- 1 root root 23843328 May  9 11:20 vmlinux-5.4.0-1034-raspi
lrwxrwxrwx 1 root root       24 May  9 11:20 vmlinuz -> vmlinuz-5.4.0-1034-raspi
-rw------- 1 root root  8342476 May  9 11:20 vmlinuz-5.4.0-1028-raspi
-rw------- 1 root root  8393691 May  9 11:20 vmlinuz-5.4.0-1034-raspi
lrwxrwxrwx 1 root root       24 May  9 11:20 vmlinuz.old -> vmlinuz-5.4.0-1028-raspi

Verzeichnis am Client nach dem Booten:

-rw------- 1 root root  4167349 Jun 17 14:59 System.map-5.4.0-1038-raspi
-rw-r--r-- 1 root root   219341 Jun 17 14:59 config-5.4.0-1038-raspi
lrwxrwxrwx 1 root root       43 Jul  3 16:55 dtb -> dtbs/5.4.0-1038-raspi/./bcm2711-rpi-4-b.dtb
lrwxrwxrwx 1 root root       43 Jul  3 16:55 dtb-5.4.0-1038-raspi -> dtbs/5.4.0-1038-raspi/./bcm2711-rpi-4-b.dtb
drwxr-xr-x 3 root root     4096 Jun 23 15:27 dtbs
drwxr-xr-x 2 root root     4096 Jul  3 17:34 firmware
lrwxrwxrwx 1 root root       27 Jun 23 15:25 initrd.img -> initrd.img-5.4.0-1038-raspi
-rw-r--r-- 1 root root 29952504 Jul  3 16:40 initrd.img-5.4.0-1038-raspi
-rw-r--r-- 1 root root 29952522 Jul  3 16:34 initrd.img-5.4.0-1038-raspi.dpkg-bak
lrwxrwxrwx 1 root root       27 Jun 23 15:25 initrd.img.old -> initrd.img-5.4.0-1038-raspi
lrwxrwxrwx 1 root root       24 Jun 23 15:25 vmlinuz -> vmlinuz-5.4.0-1038-raspi
-rw------- 1 root root  8400421 Jun 17 14:59 vmlinuz-5.4.0-1038-raspi
lrwxrwxrwx 1 root root       24 Jun 23 15:25 vmlinuz.old -> vmlinuz-5.4.0-1038-raspi

Da fehlt die Hälfte und das firmware Verzeichnis ist leer und gar nicht gemountet.

fstab am Client:

#/srv/nfs/<serial>/etc/fstab
proc            /proc           proc    defaults        0       0
192.168.15.32:/nfs/raspberry/xxxxxxx /       nfs4     defaults,rw,nolock             0       0 # data to be shared to server
192.168.15.32:/srv/tftp/xxxxxxx /boot       nfs4     defaults,rw,nolock             0       1 # data to be shared to server
none            /tmp            tmpfs   defaults        0       0
none            /var/run        tmpfs   defaults        0       0
none            /var/lock       tmpfs   defaults        0       0
none            /var/tmp        tmpfs   defaults        0       0

exports auf dem Server:

# /etc/exports: the access control list for filesystems which may be exported
#		to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/nfs/raspberry/xxxxxxx *(rw,sync,no_subtree_check,no_root_squash)
/nfs/raspberry/xxxxxx2 *(rw,sync,no_subtree_check,no_root_squash)
/nfs/raspberry/xxxxxx3 *(rw,sync,no_subtree_check,no_root_squash)

/srv/tftp/xxxxxxx *(rw,sync,no_subtree_check,no_root_squash)
/srv/tftp/xxxxxxx2 *(rw,sync,no_subtree_check,no_root_squash)
/srv/tftp/xxxxxxx3 *(rw,sync,no_subtree_check,no_root_squash)

Ist da irgendwo ein Fehler, oder Denkfehler ?

Er bootet ja übers Netzwerk, aber eben das Mounten funktioniert nicht richtig ....

Vielen Dank.

Gruß Senifor

https://www.bergercity.de/linux/nfs-symlinks/

Die Symbolischen Links gehen vom lokalen Verzeichnis aus.

Senifor79

(Themenstarter)

Anmeldungsdatum:
22. Februar 2012

Beiträge: 398

mal abgesehen davon, dass die Kernels unterschiedlich sind am Server und am Client.

Senifor79

(Themenstarter)

Anmeldungsdatum:
22. Februar 2012

Beiträge: 398

Ich glaub ich hab am Server das Verzeichnis falsch gemountet ... ich guck mal und melde mich nochmal 😬

Senifor79

(Themenstarter)

Anmeldungsdatum:
22. Februar 2012

Beiträge: 398

Ich hatte einen Fehler in der fstab am Client und im Bootverzeichnis unter Root, Kernel liegen, bei denen ich nicht weiß, wie sie dahin gekommen sind. Jedenfalls funktioniert jetzt alles so wie es soll.

Vielleicht nicht ganz .... ich nutze zum Booten TFTP. Gibt es eine Möglichkeit das Booten aus dem Netzwerk abzusichern ?

Vielen Dank.

Gruß Senifor

Antworten |