urpmi fail on diskless rpi5

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

urpmi fail on diskless rpi5

Postby john_gibbe » Mar 27th, '24, 10:55

Hello,
I try to set a diskless Raspberry Pi5. I boot magiea 9 over the wired network on nfs v4 root share.
urpmi show always this error:
Code: Select all
urpmi database is locked (another program is already using it).

1) I removed /var/lib/urpmi/.LOCK and /var/lib/rpm/.RPMLOCK, but error emerge again.
2) I suspect it has to do with locking issue on NFSv4. I try to make Raspberry Pi5 to boot on nfs v3 but can't succeed despite I have a well working nfsv3 server.
3) I have found that urpmi use perl flock that is said not to work on nfs. I've seen also that there is a mageia perl packet named perl-File-NFSLock-1.290.0-3.mga9. I installed it and I try to modify /usr/share/perl5/vendor_perl/urpm/lock.pm despite I don't understand a word of perl. I replaced the three occurances of flock(... by File::NFSLock->new(... with no success. Error message was:
Code: Select all
$VAR1 = undef;
Not a HASH reference at /usr/share/perl5/vendor_perl/File/NFSLock.pm line 88.

4) I tried also to use fcntl(... instead of flock(... but still get the same message "urpmi database is locked (another program is already using it)."

I think that with 3) I was not far to the solution but I don't know anything of perl and can't get the correct syntax or give correct arguments to the NFSLock function.
Maybe there is here a more skilled guy to help me?
john_gibbe
 
Posts: 20
Joined: Jun 5th, '11, 15:22

Re: urpmi fail on diskless rpi5

Postby doktor5000 » Mar 27th, '24, 19:03

You don't mention your kernel commandline, or how you boot via nfs4 rootfs ?

It's probably better if you ask that question on the dev mailing list: https://ml.mageia.org/l/info/dev
I don't know anyone that uses an NFS rootfs. Last thread here was over 10 years ago: https://forums.mageia.org/en/viewtopic.php?f=8&t=5509
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18053
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: urpmi fail on diskless rpi5

Postby john_gibbe » Mar 28th, '24, 00:28

Raspberry Pi5's "on-lan" boot process is specific. First you have to modify its reeprom to set the boot order code 0xe21 (First SD card, next lan and finally fail)
Then you have to set your dhcp server and add a line in your dhcp.conf:
Code: Select all
host RPI5_1 {  hardware ethernet 2c:cf:67:30:a4:0f; fixed-address 192.168.0.196; option routers 192.168.0.254; option tftp-server-name "192.168.0.193"; option vendor-class-identifier "PXEClient"; }

that give your RPI a fixed address (easier if you want to access it by ssh) and tell it where is the tftp server on which it will load files needed to boot (rpi firmware). In these files figure out the configuration file of your RPI (eg bluetooth is active or not, same for wifi, aso...) in config.txt and the command line file named cmdline.txt which look like that:
Code: Select all
console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=192.168.0.193:/home/nfs/aarch64/mageia/root_directory,tcp,vers=4.2 rw ip=dhcp rootfstype=nfs fsck.repair=no rootwait splash plymouth.ignore-serial-consoles

then RPI mount the nfsroot and boot the Mageia9 arm image I've put on the nfs server. Get some problem with X11 and opengl but works pretty well when switch on plasma wayland.
john_gibbe
 
Posts: 20
Joined: Jun 5th, '11, 15:22

Re: urpmi fail on diskless rpi5

Postby doktor5000 » Mar 28th, '24, 01:52

You could try to mount it as nfsv3 if the server supports that and exports it also as nfsv3.
If you do that, and if you only mount that share on one client you could try to add the nolock option or play around with the local_lock options, see the nfs man page for details.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18053
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: urpmi fail on diskless rpi5

Postby john_gibbe » Mar 28th, '24, 08:39

I have already tried NFSv3 because NFVv4 don't expose posix ACLs but unfortunally it seems RPI5 don't understand NFSv3 protocol and stop the boot process. I imagine reeprom has a limited space and they have implemented only one protocol :(
john_gibbe
 
Posts: 20
Joined: Jun 5th, '11, 15:22

Re: urpmi fail on diskless rpi5

Postby filip » Mar 31st, '24, 23:11

john_gibbe, I'm sorry that I can't help you and I hope it will be resolved but I wonder how did you create a RPI5 bootable image? Was Wiki page helpfull?

Can you please improve it with your experience? I would like to raise the significance of RPI images and I and probably several others appreciate any help.
filip
 
Posts: 478
Joined: May 4th, '11, 22:10
Location: Kranj, Slovenia

Re: urpmi fail on diskless rpi5

Postby jayden6 » Apr 13th, '24, 18:05

I've attempted NFSv3 since NFVv4 doesn't expose posix ACLs, but unfortunately, it appears that RPI5 doesn't support the NFSv3 protocol and halts the boot process. I suspect the reeprom has limited space, and they've implemented only one protocol.
jayden6
 
Posts: 1
Joined: Apr 13th, '24, 18:02


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest