one is not like the others

Post Reply
fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

one is not like the others

Post by fvolk »

With diskless netboot finally working, I set up my cluster of C4s.
All have a microSD with just a single, minimal boot script file that loads kernel+dtb from TFTP, this section looks like:
setenv autoload no
dhcp
setenv serverip 192.168.1.xx
tftp ${kernel_addr} ${bootfile}
tftp ${fdt_addr} ${fdtfile}
and server side I see in log:
dnsmasq-dhcp[2818]: 105392093 DHCPDISCOVER(eth0) 00:1e:06:xx:xx:xx
dnsmasq-dhcp[2818]: 105392093 vendor class: U-Boot.armv8
dnsmasq-tftp[2818]: sent /diskless/c2/Image to 192.168.1.yyy
dnsmasq-tftp[2818]: sent /diskless/c2/meson-sm1-odroid-c4.dtb to 192.168.1.yyy
and this works on all my C4s .... except on one C4. :-/
One C4 does not want to diskless boot, it gets stuck in:
22:10:29 dnsmasq-dhcp[2818]: 105392573 DHCPDISCOVER(eth0) 00:1e:06:xx:xx:xx
22:10:29 dnsmasq-dhcp[2818]: 105392573 vendor class: U-Boot.armv8
22:11:28 dnsmasq-tftp[2818]: failed sending /diskless/c2/Image to 192.168.1.yyy
22:11:55 dnsmasq-tftp[2818]: failed sending /diskless/c2/meson-sm1-odroid-c4.dtb to 192.168.1.yyy
Uboot calls DHCP, requests the correct files, but this transfer fails.
After one minute TFTP gives up with an error.

I swapped microSD cards between C4s.
I tried different microSD cards brands.
I erased and wrote a new microSD card from scratch.
I swapped network cables.
I swapped position on network switch.
I swapped power supply (cable).
I rebooted network switch/modem/router.
...but this one C4 does NOT boot from network.
However, this one DOES boot without problems from local files and the official images.

The workaround for now is to copy kernel Image and dtb locally on microSD and patch the script on this one to
load mmc ${devno}:1 ${kernel_addr} ${bootfile}
load mmc ${devno}:1 ${fdt_addr} ${fdtfile}
On every upgrade all nodes need no local changes, except this one where I have to update these two files manually - I hope I don't forget.

My only idea is this one C4 has some manufacturing tolerance that network somehow fails.
It is not a warranty case because otherwise it works just fine.

...but if you have an idea what makes this one C4 different, I would like to hear it, I'm running out of ideas.
(and now I'm considering to order another C4 AND also finally an USB UART... another ~100 EUR.... *sigh*)

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

Bought more C4s.
Again, one of the new shipment does not boot diskless - however, its behaviour is slightly different:
9:19:29 dnsmasq-tftp[2759]: sent /z/__diskless/c2/meson-sm1-odroid-c4.dtb to 192.168.1.yyy
9:19:32 dnsmasq-tftp[2759]: failed sending /z/__diskless/c2/Image to 192.168.1.yyy
The first file succeeds, the second file does not? ... wtf...

User avatar
tobetter
Posts: 7152
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1047 times
Contact:

Re: one is not like the others

Post by tobetter »

I've uploaded the firmware of the Petitboot for ODROID-C4 yesterday and it can supports PXE boot on it. It would work with dnsmasq in your server, this is the link of my PXE boot setup to install Ubuntu. In order to run the Petitboot for ODROID-C4, you can refer to this link.
viewtopic.php?p=299477#p299477

EDIT: This is my PXE setup for Netboot Installer from the Petitboot
http://ppa.linuxfactory.or.kr/installer ... C4/default

mad_ady
Posts: 9075
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 596 times
Been thanked: 579 times
Contact:

Re: one is not like the others

Post by mad_ady »

@fvolk of the problem is consistent could you do a packet capture on your tftp server and see who misbehaves and how?

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

Hmm... three options to become smarter

1) try PXE boot - but this would need me to figure out how to configure a second IP range for the C4s at the server, currently I have a single PXE range for the H2s
2) finally figure out USB UART console and see whether uboot shows something on client
3) wireshark the network packets at server side

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

The C4 that fails:

Code: Select all

## Executing script at 04000000
dwmac.ff3f0000 Waiting for PHY auto negotiation to complete...... done
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.xx (258 ms)
Speed: 1000, full duplex
Using dwmac.ff3f0000 device
TFTP from server 192.168.1.yy; our IP address is 192.168.1.xx
Filename 'c2/Image'.
Load address: 0x11000000
Loading: T T T T #T #T T T T T
Retry count exceeded; starting again
Speed: 1000, full duplex
Using dwmac.ff3f0000 device
TFTP from server 192.168.1.yy; our IP address is 192.168.1.xx
Filename 'c2/meson-sm1-odroid-c4.dtb'.
Load address: 0x20000000
Loading: T T T T T T #T T ###T T
Retry count exceeded; starting again
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory

Usage:
rsvmem check                   - check reserved memory
rsvmem dump                    - dump reserved memory

rsvmem check failed
active_slot is <NULL>
Unknown command 'store' - try 'help'
No dtbo patitions found
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 20000000
   Booting using the fdt blob at 0x20000000
libfdt fdt_path_offset() returned FDT_ERR_BADSTRUCTURE
No valid dtbo image found
libfdt fdt_getprop(): FDT_ERR_NOTFOUND
[rsvmem] fdt get size #address-cells failed.
   Loading Device Tree to 000000001fff1000, end 000000001ffffb27 ... OK
fdt_find_or_add_subnode: memory: FDT_ERR_BADSTRUCTURE
ERROR: arch-specific fdt fixup failed
 - must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###
The C4 that half-fails:

Code: Select all

## Executing script at 04000000
dwmac.ff3f0000 Waiting for PHY auto negotiation to complete...... done
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.1.xx (5 ms)
Speed: 1000, full duplex
Using dwmac.ff3f0000 device
TFTP from server 192.168.1.yy; our IP address is 192.168.1.xx
Filename 'c2/Image'.
Load address: 0x11000000
Loading: ###T T #T #T #T ##T #T T T ##T ####
Retry count exceeded; starting again
Speed: 1000, full duplex
Using dwmac.ff3f0000 device
TFTP from server 192.168.1.yy; our IP address is 192.168.1.xx
Filename 'c2/meson-sm1-odroid-c4.dtb'.
Load address: 0x20000000
Loading: T #T ####T #
         2.9 KiB/s
done
Bytes transferred = 47912 (bb28 hex)
All C4s that boot as expected:

Code: Select all

## Executing script at 04000000
dwmac.ff3f0000 Waiting for PHY auto negotiation to complete...... done
Speed: 1000, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.xx (258 ms)
Speed: 1000, full duplex
Using dwmac.ff3f0000 device
TFTP from server 192.168.1.yy; our IP address is 192.168.1.xx
Filename 'c2/Image'.
Load address: 0x11000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####################
         4.2 MiB/s
done
Bytes transferred = 20341248 (1366200 hex)
Speed: 1000, full duplex
Using dwmac.ff3f0000 device
TFTP from server 192.168.1.yy; our IP address is 192.168.1.xx
Filename 'c2/meson-sm1-odroid-c4.dtb'.
Load address: 0x20000000
Loading: ####
         3.3 MiB/s
done
Bytes transferred = 47912 (bb28 hex)
..all booted from the same microSD card.

User avatar
rooted
Posts: 8277
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 728 times
Been thanked: 306 times
Contact:

Re: one is not like the others

Post by rooted »

@tobetter Have you seen this thread?

User avatar
tobetter
Posts: 7152
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1047 times
Contact:

Re: one is not like the others

Post by tobetter »

rooted wrote:
Tue Jul 28, 2020 12:20 pm
@tobetter Have you seen this thread?
Yes, I do...and thinking about how I can test. Personally, I would go for PXE boot with the Petitboot but OP has a concern of IP ranges. I think the IP range can be set with MAC addresses of H2 and C4, let me figure out.
These users thanked the author tobetter for the post:
rooted (Tue Jul 28, 2020 1:16 pm)

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

I think I meanwhile know already how to do two different IP/PXE ranges with dnsmasq, it is possible to "tag" requests based on architecture field in PXE request and then theoretically serve different files - but I havn't set this up yet in practice.

But... I'm actually considering to stop PXE and also boot the H2s differently. With one network attached everything is ok. With two networks the H2 UEFI tries first one network for ~60s, then times out, then tries the second network, the correct one, where it boots. So it would be nice to restrict the H2 to try PXE boot only from one specific network port and not like the other, otherwise booting takes a long time :-( ... I also don't want to buy a "smart" switch, which would also be a solution.

For the C4 I could still try wiresharking the traffic - anyone know how to run tshark and filter traffic on two specific ethernet macs?

mad_ady
Posts: 9075
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 596 times
Been thanked: 579 times
Contact:

Re: one is not like the others

Post by mad_ady »

@fvolk: here's what you can try:

Code: Select all

sudo tshark -i enp0s25 -f 'ether host aa:aa:aa:aa:aa:aa or ether host ff:ff:ff:ff:ff:ff' -s 0 -w /tmp/capture.pcap
I see timeouts in your output. Something causes it to lose packets...

brad
Posts: 1355
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 117 times
Been thanked: 169 times
Contact:

Re: one is not like the others

Post by brad »

Maybe see if you can adjust the server tftp settings, if you are using Ubuntu as the server and tftpd-hpa can you can try to add some options to the TFTP_OPTIONS parameter in /etc/default/tftpd-hpa

--blocksize 1468 --retransmit 2000000

(Ensure blocks can fit into 1 UDP frame and only try to retransmit the frame after 2 seconds)

Should be able to see in the wireshark if traffic is fragmented with larger block size

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

brad wrote:
Tue Jul 28, 2020 5:21 pm
Maybe see if you can adjust the server tftp settings, if you are using Ubuntu as the server
Using buitl-in tftp of dnsmasq.

brad
Posts: 1355
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 117 times
Been thanked: 169 times
Contact:

Re: one is not like the others

Post by brad »

fvolk wrote:
Tue Jul 28, 2020 6:00 pm
brad wrote:
Tue Jul 28, 2020 5:21 pm
Maybe see if you can adjust the server tftp settings, if you are using Ubuntu as the server
Using buitl-in tftp of dnsmasq.
Sorry I think you mentioned that earlier I missed it. Try these in your /etc/dnsmasq.conf and restart dnsmasq to see if it helps

tftp-mtu=1468
tftp-no-blocksize

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

mad_ady wrote:
Tue Jul 28, 2020 3:20 pm
@fvolk: here's what you can try:

Code: Select all

sudo tshark -i enp0s25 -f 'ether host aa:aa:aa:aa:aa:aa or ether host ff:ff:ff:ff:ff:ff' -s 0 -w /tmp/capture.pcap
I see timeouts in your output. Something causes it to lose packets...
Thank you for the template! But it was an AND not an OR :-)

Packet trace diff of "half booting" on the left, "ok booting" on the right.
xxx is upstream H2 server, yyy is C4 client
In the working case every block is acknowledged perfectly.
Seems in the non-working case some packets are not acknowledged?
tftp.png
tftp.png (258.58 KiB) Viewed 1081 times

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

Hmm... actually it should be easy to reproduce my setup:
1) flash U-Boot 2015.01-00128-g6443fcfcd0 (Mar 18 2020 - 09:49:13)
2) setup a TFTP server, place 2 fake files there, the small dtb and a ~20MB kernel Image
3) place following boot.ini on first partition - don't forget to set IP and filenames

Code: Select all

ODROIDC4-UBOOT-CONFIG

setenv bootargs ip=dhcp

setenv kernel_addr 11000000
setenv fdt_addr  0x20000000
setenv fdtfile c2/meson-sm1-odroid-c4.dtb
setenv bootfile c2/Image

setenv autoload no
dhcp
setenv serverip 192.168.1.FIXME
tftp ${kernel_addr} ${bootfile}
tftp ${fdt_addr} ${fdtfile}

booti ${kernel_addr} - ${fdt_addr}
boot
4) either see it load the files successfully (and crash), or see it stuck/retry on loading Image

..how many problem C4s have you? :-)

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

brad wrote:
Tue Jul 28, 2020 6:24 pm
tftp-mtu=1468
tftp-no-blocksize
from my packet trace, I think already 1468 is used as blocksize

mad_ady
Posts: 9075
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 596 times
Been thanked: 579 times
Contact:

Re: one is not like the others

Post by mad_ady »

In your non-working case it looks like xxx has to sometimes send a packet three times before it gets an acknowledge. Is this the H2, or H2+? Some are complaining about H2+'s drivers.

Can you remove the network from the equation with a non-working C4 and plug it directly into the H2 and retry the tftp transfer? Do you still get packet loss/retransmissions?

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

mad_ady wrote:
Tue Jul 28, 2020 7:28 pm
In your non-working case it looks like xxx has to sometimes send a packet three times before it gets an acknowledge.
Is this the H2, or H2+? Some are complaining about H2+'s drivers.

Can you remove the network from the equation with a non-working C4 and plug it directly into the H2 and retry the tftp transfer? Do you still get packet loss/retransmissions?
xxx is a H2 rev-A, running dnsmasq 2.81 with its internal TFTP -- to be upgraded to a H2+ once the network driver situation has calmed down

Direct network connection is not an option, sorry, other things on the network are in production.

I've swapped network cables, network switch, switch socket, more/less network load, etc. and its robustly reproduceable with just these two C4, so far it points to the C4s as the cause? To the network the C4s differ just in their MAC address, if some other component on the network triggers this on specific mac addresses this would be weird - but possible, yeah.

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

Bought another C4. No diskless netboot. Sad :-/
I stop drawing C4 lottery tickets now...
Funny thing is, the oldest ones tend to work, the recently bought ones tend to not work - or this is just bad luck?
(however, for science, I could buy 10 at once and see what's the ratio - and then try to resell the non-working at a small loss.....)

User avatar
tobetter
Posts: 7152
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1047 times
Contact:

Re: one is not like the others

Post by tobetter »

fvolk wrote:
Wed Aug 26, 2020 2:36 am
Bought another C4. No diskless netboot. Sad :-/
I stop drawing C4 lottery tickets now...
Funny thing is, the oldest ones tend to work, the recently bought ones tend to not work - or this is just bad luck?
(however, for science, I could buy 10 at once and see what's the ratio - and then try to resell the non-working at a small loss.....)
Can you share your dnsmasq config with me and other TFTP configuration if possible?

brad
Posts: 1355
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 117 times
Been thanked: 169 times
Contact:

Re: one is not like the others

Post by brad »

Just to add to this and looking back at the packet capture image I wonder if that arp request (the half fixed screenshot) from WiBrain may have triggered some sort of ARP broadcast which impacted uboot version of the Ethernet driver. (Is it wifi?)

Also wonder if uboot might be setting a random mac on boot and screwing with arp and or dhcp. You would maybe need to take a full packet capture on the switched side of the interface to work this out, ie using crossover cable or a smart switch. I also think u-boot can support a packet capture or dump to sd but not sure about the version used on the C4 and if it could multitask it when doing a tftp transfer.

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

tobetter wrote:
Wed Aug 26, 2020 5:33 pm
Can you share your dnsmasq config with me and other TFTP configuration if possible?
To reproduce, a uboot flashed + config from viewtopic.php?p=301042#p301042, plus TFTP with 2 fake files should be enough?

my /etc/dnsmasq.conf, nothing special in config?
dhcp-range=192.168.1.x1,192.168.1.yy,4h
dhcp-host=00:1e:06:xx:xx:xx,c41,192.168.1.x1,4h
dhcp-host=00:1e:06:xx:xx:xx,c42,192.168.1.x2,4h
dhcp-host=00:1e:06:xx:xx:xx,c43,192.168.1.x3,4h
.....
port=0
log-dhcp
enable-tftp
tftp-root=/diskless/
As I changed everything meanwhile, I guess it must be a network init/timing anomaly/production tolerance or something like that, some C4 work, some C4 do not.
Hmm... thinking of it, the only thing I have NOT yet tried, I could try to run the TFTP not on the H2 Rev-A server, but on another box instead....

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

I appears U-Boot 2020.10 is out with official C4 support: https://www.phoronix.com/scan.php?page= ... 0-Released

Is it worthwhile to try this new version and see whether my diskless boot problems on some of my C4 magically goes away?

brad
Posts: 1355
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 117 times
Been thanked: 169 times
Contact:

Re: one is not like the others

Post by brad »

fvolk wrote:
Tue Oct 06, 2020 10:23 pm
I appears U-Boot 2020.10 is out with official C4 support: https://www.phoronix.com/scan.php?page= ... 0-Released

Is it worthwhile to try this new version and see whether my diskless boot problems on some of my C4 magically goes away?
It would, armbian has mainline uboot support so you can probably install that image on a separate card for a test https://www.armbian.com/odroid-c4/

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

brad wrote:
Tue Oct 06, 2020 10:37 pm
It would, armbian has mainline uboot support so you can probably install that image on a separate card for a test https://www.armbian.com/odroid-c4/
If Armbian's "mac address is wrong on C4 problem" also got fixed, yes....
(viewtopic.php?p=295719#p295719)

brad
Posts: 1355
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 117 times
Been thanked: 169 times
Contact:

Re: one is not like the others

Post by brad »

fvolk wrote:
Wed Oct 07, 2020 2:15 am
brad wrote:
Tue Oct 06, 2020 10:37 pm
It would, armbian has mainline uboot support so you can probably install that image on a separate card for a test https://www.armbian.com/odroid-c4/
If Armbian's "mac address is wrong on C4 problem" also got fixed, yes....
(viewtopic.php?p=295719#p295719)
I checked in IRC and it is fixed in mainline uboot (it grabs the mac from the soc), unsure about what armbian is using but probably id say.

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

As the next days will be essentially sitting in The Great Lockdown[tm] at home, I'll take another try at getting my "problem" C4s diskless booting.
Any one news on uboot?
(Is there a guide to build a fresh uboot for C4 from upstream? I did it once for C2 but remember it to be a not easy...)

The other option is petitboot - it seems to support loading kernel from TFTP?
But I know nothing about petitboot...

User avatar
tobetter
Posts: 7152
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1047 times
Contact:

Re: one is not like the others

Post by tobetter »

fvolk wrote:
Wed Dec 23, 2020 5:17 pm
As the next days will be essentially sitting in The Great Lockdown[tm] at home, I'll take another try at getting my "problem" C4s diskless booting.
Any one news on uboot?
(Is there a guide to build a fresh uboot for C4 from upstream? I did it once for C2 but remember it to be a not easy...)

The other option is petitboot - it seems to support loading kernel from TFTP?
But I know nothing about petitboot...
We have a thread about the Petitboot for C4 already but low demand...
viewtopic.php?f=206&t=39608

You would not need to know much about the Petitboot, if you share the network setup using HTTP/FTP/NFS, I can help you.

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

I have shared how to reproduce my uboot setup (which only works on some C4 nodes) already here in this thread: viewtopic.php?p=301042#p301042

Now I would have to reproduce this with petitboot+TFTP if there is no improvement with uboot

My SD card partition config with uboot is:
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 2048 264191 262144 128M 83 Linux
/dev/mmcblk1p2 264192 10749951 10485760 5G 83 Linux
/dev/mmcblk1p3 10749952 249737215 238987264 114G 83 Linux

p1 has only one file, boot.src or boot.ini
p2 is reserved for local kernel swap for low-memory emergencies
p3 is a data partition for docker images and node local data

...so basically a setup where the TFTP file names to retrieve are generic, on kernel/system upgrades I don't have to change anything on the SD cards.

User avatar
tobetter
Posts: 7152
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1047 times
Contact:

Re: one is not like the others

Post by tobetter »

fvolk wrote:
Wed Dec 23, 2020 5:33 pm
I have shared how to reproduce my uboot setup (which only works on some C4 nodes) already here in this thread: viewtopic.php?p=301042#p301042

Now I would have to reproduce this with petitboot+TFTP if there is no improvement with uboot

My SD card partition config with uboot is:
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 2048 264191 262144 128M 83 Linux
/dev/mmcblk1p2 264192 10749951 10485760 5G 83 Linux
/dev/mmcblk1p3 10749952 249737215 238987264 114G 83 Linux

p1 has only one file, boot.src or boot.ini
p2 is reserved for local kernel swap for low-memory emergencies
p3 is a data partition for docker images and node local data

...so basically a setup where the TFTP file names to retrieve are generic, on kernel/system upgrades I don't have to change anything on the SD cards.
Ok....so...let me have some time to think about it with given partition layout. Actually, I have not tested TFTP but I would try with the Petitboot.
By the way, where will you put the root file system and initramfs? NFS?

fvolk
Posts: 531
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 54 times
Contact:

Re: one is not like the others

Post by fvolk »

tobetter wrote:
Wed Dec 23, 2020 5:43 pm
Ok....so...let me have some time to think about it with given partition layout. Actually, I have not tested TFTP but I would try with the Petitboot.
By the way, where will you put the root file system and initramfs? NFS?
You might also try to reproduce my uboot setup as described in above link and see why uboot+TFTP mysterically fails on some C4 and on some it works perfectly.
I just want ALL my C4s to be able to join my cluster :-)

Yes, root is provided via NFS, you may no longer remember my postings where I got it working on C2 first
viewtopic.php?p=290377#p290377
...and then I works similarly on C4.

Actually C2s and C4s share the same rootfs+kernel image in my setup, the dtbs differ, so I have to remember which SD card has uboot/config for C2 and which for C4.
There is no initramfs, required hardware drivers for NFS mounting are compiled into kernel image.

User avatar
tobetter
Posts: 7152
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1047 times
Contact:

Re: one is not like the others

Post by tobetter »

fvolk wrote:
Wed Dec 23, 2020 6:07 pm
tobetter wrote:
Wed Dec 23, 2020 5:43 pm
Ok....so...let me have some time to think about it with given partition layout. Actually, I have not tested TFTP but I would try with the Petitboot.
By the way, where will you put the root file system and initramfs? NFS?
You might also try to reproduce my uboot setup as described in above link and see why uboot+TFTP mysterically fails on some C4 and on some it works perfectly.
I just want ALL my C4s to be able to join my cluster :-)
I've tried this earlier when you start this thread...but not found the root cause since C4 boards I've tested had worked mostly.
Yes, root is provided via NFS, you may no longer remember my postings where I got it working on C2 first
viewtopic.php?p=290377#p290377
...and then I works similarly on C4.
Sorry, I forgot this.
Actually C2s and C4s share the same rootfs+kernel image in my setup, the dtbs differ, so I have to remember which SD card has uboot/config for C2 and which for C4.
There is no initramfs, required hardware drivers for NFS mounting are compiled into kernel image.
This is good idea, I also curious if C2 works with 5.10 kernel. :)

FYI, I've tested TFTP booting with the Petitboot on ODROID-N2 and it boots but one problem is there that it does not start automatically which is supposed to be. I had to select the boot entry for the TFTP booting. I have to figure out why...maybe because of DHCP setup I have. Let me try this again later.

This is the file I made for TFTP booting and it persists as kboot.conf in the SD card. Then the Petitboot parse it and shows to the boot entry.

Code: Select all

KBOOT_OS='tftp://192.168.10.100/Image.gz initrd=tftp://192.168.10.100/initrd.gz dtb=tftp://192.168.10.100/dtbs/amlogic/meson64_odroidn2_plus.dtb root=/dev/nfs rw ip=dhcp console=tty0 no_console_suspend earlyprintk=aml-uart,0xff803000 quiet ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 logo=osd0,loaded,0x3d800000 voutmode=hdmi hdmimode=1080p60hz osd_reverse=0 video_reverse=0 anna/no_kernel_modules=true'

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest