Sd install on APU.2C2

Maybe I'm missing something obvious..
I did follow this instruction (on a 4GB SD card).
https://openwrt.org/toh/pcengines/apu2
But since I want to use only on card, I put an ext4 filesystem on the SD card. I connected the router to a notebook, which runs systemrescueCD fromCD. But I'm unable to get a connection to the router.
I tried automatic and manual network configuration with ipv6 on and off
I haven't found a hint to what the LEDs should tell me (like ist the router up anyway and so on.

So where to start?

Might be that you formatted the card and made it non-bootable.

Serial port, 115200 8n1

fdisk output:
(seems OK to me)

Command (m for help): p
Disk /dev/mmcblk0: 3.7 GiB, 3965190144 bytes, 7744512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb3ade79d

Device         Boot Start    End Sectors  Size Id Type
/dev/mmcblk0p1 *      512  33279   32768   16M 83 Linux
/dev/mmcblk0p2      33792 558079  524288  256M 83 Linux

Is it expected to have dhcp running out of the box or do I set manual network interfaces?
As to serial port: might not have a fitting cable nor machine with serialport..
->EDIT: found some USB to Serial cable in my shelf. How do I prosseed?
NOPE: Why is the serial port at the APU male?? (I end up with al least one missing adapter. no gender changer female, female db9 tp male ps/2 etc.) Giving up for today...

My guess that the MBR partition table doesn't mark the OpenWrt partition as bootable. I don't know fdisk output or commands well enough to know from the output you posted if that is the case or not.

To connect to the serial port you'll need a "null-modem" cable or adapter. While some are null-modem in their wiring (cross-over of lines), some are not, so check if you purchase one.

Ah sorry. The first part is bootable. The asterix is marking that.
I just checked. The card is a class4 SD card. Is that sufficient or to slow?
BTW: is a correctly booted openWRT expected to be pingable?
Tried it from an USB stick, same result

Most OpenWrt installs should "come up" with the LAN on 192.168.1.1/24 and DHCPv4 offering leases.

The Class 4 card is rather slow, but should be functional. I'd recommend at least a U3 / V30 card. Flash cards aren't really good, in general, for "constant" writes -- SanDisk, for example, has "new" microSD cards that are designed for in-phone use, though no clue if they're really any different.

Hmmm, have you been able to boot the device with another OS?

Haven't tried another OS so far..
While w/o serial cable: Do teh 3 front LED do tell me something? (only one is on constantly)

The * (2nd column) indicates partition is bootable

Please use </> button to format code or [CTRL+SHIFT+C]

Device          Boot    Start   End     Sectors Size    Id  Type
/dev/mmcblk0p1  *       512     33279   32768   16M     83  Linux
/dev/mmcblk0p2          33792   558079  524288  256M    83  Linux

thx, corrected. (bit different forum software here)

1 Like
~/devel/openwrt$ fgrep -rI 'apu2:green' .
./package/kernel/leds-apu2/src/leds-apu2.c:		.name           = "apu2:green:power",
./package/kernel/leds-apu2/src/leds-apu2.c:		.name           = "apu2:green:led2",
./package/kernel/leds-apu2/src/leds-apu2.c:		.name           = "apu2:green:led3",
./target/linux/x86/base-files/etc/board.d/01_leds:    ucidef_set_led_netdev "wan" "WAN" "apu2:green:led3" "eth0"
./target/linux/x86/base-files/etc/board.d/01_leds:    ucidef_set_led_netdev "lan" "LAN" "apu2:green:led2" "br-lan"
./target/linux/x86/base-files/etc/board.d/01_leds:    ucidef_set_led_default "diag" "DIAG" "apu2:green:power" "1"

Of course, that is only once the kernel has booted and then some. According to https://openwrt.org/toh/pcengines/apu2, the LED kmod may not be part of the default build.

The mentioned guide recomments the squashfs image. I was unsure, if that is supposed to work an its only 20MB. I tried the squashfs and the ext4 image with the same result from sdcard and USB.
@ jeff: thx for the LED docu, which means for me: power is on, but eth0 won't come up...
(more tomorrow. I start to fall asleep, already 2 Am here...

I've got an APU3C4 here and with a 512 MB SD card in a reader in the USB slot

jeff@deb-devel : ~/apu-openwrt $ ls -l
total 11977
-rw-r--r-- 1 jeff jeff 6612320 Aug 16 22:18 openwrt-18.06.1-x86-64-combined-ext4.img.gz
-rw-r--r-- 1 jeff jeff 5872005 Aug 16 22:18 openwrt-18.06.1-x86-64-combined-squashfs.img.gz
jeff@deb-devel : ~/apu-openwrt $ gunzip *
jeff@deb-devel : ~/apu-openwrt $ sudo dd if=openwrt-18.06.1-x86-64-combined-ext4.img of=/dev/sdc bs=1M status=progress

Selecting boot over serial (as it has an OS on the internal mSATA drive), it comes up with

root@OpenWrt:/# ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    inet 10.xx.yy.zz/24 brd 10.xx.yy.255 scope global eth0
       valid_lft forever preferred_lft forever
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever

eth0 is closest to the serial port


jeff@deb-devel : ~/apu-openwrt $ sudo dd if=openwrt-18.06.1-x86-64-combined-squashfs.img of=/dev/sdc bs=1M status=progress

on the other hand, is not recognized as bootable by the BIOS

PCEngines apu3
coreboot build 20170302
4080 MB ECC DRAM

SeaBIOS (version rel-1.10.0.1)

Press F10 key now for boot menu

Select boot device:

1. ata0-0: SATA SSD ATA-11 Hard-Disk (15272 MiBytes)
2. Payload [memtest]
3. Payload [setup]

Perhaps helpful information, with the ext4 image on the card (BIOS unmodified from as-delivered config):

.PCEngines apu3
coreboot build 20170302
4080 MB ECC DRAM

SeaBIOS (version rel-1.10.0.1)

Press F10 key now for boot menu

Select boot device:

1. USB MSC Drive TS-RDF5 SD  Transcend TS35
2. ata0-0: SATA SSD ATA-11 Hard-Disk (15272 MiBytes)
3. Payload [memtest]
4. Payload [setup]

Booting from CBFS...

### PC Engines apu2 setup v4.0.4 ###
Boot order - type letter to move device to top.

  a USB 1 / USB 2 SS and HS 
  b SDCARD 
  c mSATA 
  d SATA 
  e iPXE (disabled)


  r Restore boot order defaults
  n Network/PXE boot - Currently Disabled
  t Serial console - Currently Enabled
  l Serial console redirection - Currently Enabled
  u USB boot - Currently Enabled
  o UART C - Currently Disabled
  p UART D - Currently Disabled
  x Exit setup without save
  s Save configuration and exit

So the 2 main points are:

  • not a chance for diagnose without serial connection
  • APU won't boot from SDcard, nevertheless the card is made bootable
  • APU only boots from internal mSATA/mSSD so far

Which means w/o a serial connection, I'm done.

BTW: Is the APU making any sounds/peeps while not booting?

EDIT:
I now have:
-salvaged my LIRC cable from my VDR
-soldered "null-modem" cable (no fun...)
-connected taht in addition with an USB-toserial cable
and have now access vie minicom.

here is what I got:

Press F10 key now for boot menu
Select boot device:

1. SD card SD04G 3781MiB
2. Payload [memtest]
3. Payload [setup]

Booting from CBFS...                                        
                                                               
### PC Engines apu2 setup v4.0.4 ###
Boot order - type letter to move device to top.

  a USB 1 / USB 2 SS and HS     PC Engines APU2
  b SDCARD 
  c mSATA 
  d SATA 
  e iPXE (disabled)


  r Restore boot order defaults
  n Network/PXE boot - Currently Disabled
  t Serial console - Currently Enabled
  l Serial console redirection - Currently Enabled
  u USB boot - Currently Enabled
  o UART C - Currently Disabled
  p UART D - Currently Disabled
  x Exit setup without save
  s Save configuration and exit

So like Jeff, SD card is not recognized to be bootable, which it is according to fdisk command.
When doing nothing the boot menue runnis into memtest, which I find very unusefull: getting memory stressed, when not able to boot from SDcard, which is advertised...

Same with USB stick.

After making both part on the SD card bootable, I get:

PCEngines apu2
coreboot build 20170228
2032 MB DRAM

SeaBIOS (version rel-1.10.0.1)

Press F10 key now for boot menu

Select boot device:

1. SD card SD04G 3781MiB
2. Payload [memtest]
3. Payload [setup]
[pressing "1" here]
Booting from Hard Disk...
GRUB loadingRead Error

So, in the end, it seems the SDcard was just shity.
Tested 2 other cards (one a fancy samsung class 10 and another kingston class 4) both work fine.

Sorry for the unnecessary bothering.

(the ext4 image BTW.)

1 Like

Glad you got things going!

Strange here that the squashfs fails to boot on my old 512 MB card but works on a new SanDisk Extreme 32 GB card, both in the same USB reader. Equally strange is that the ext4 image works on the same old 512 MB card. (Just reconfirmed behavior.)

From your hours I'm guessing you'e in Europe somewhere. For me, the 16 GB mSATA SSDs that PC Engines sells seem to perform well and aren't too much more expensive than a good-quality SD card. I also use the SATA cable adapter with a "standard" SSD in some of my configurations. Shipping cost to the US is the killer for me for a "small" order, but if you've got more affordable access there, it might be something to consider.

Yes, I'm in europe. I was just in to mood to get the old router setup replaced here at home (an old notebook running zeroshell) and it was just annoying to be slowed down so much. I'll start with the Sdcard setup an look into ordering the mSATA instead for durability.
Now I have to look into setting up some simple NAT/Firewall for my homenetwork.

and not connecting again...
What I did: As noted, I was able to get the router running and accessed it (with static IP at the client 192.168.1.2). I opened the LuCi interface once, to check, if it is accessable.
I now wanted to set it up, but now I have no connection again. Looking at the serial console again I get:

root@OpenWrt:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:0d:b9:4c:ba:d8 brd ff:ff:ff:ff:ff:ff
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br-lan state DOWN qlen 1000
    link/ether 00:0d:b9:4c:ba:d9 brd ff:ff:ff:ff:ff:ff
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br-lan state DOWN qlen 1000
    link/ether 00:0d:b9:4c:ba:da brd ff:ff:ff:ff:ff:ff
5: br-lan: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 00:0d:b9:4c:ba:d9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fddf:6d0d:c13f::1/60 scope global tentative 
       valid_lft forever preferred_lft forever
root@OpenWrt:/# [  103.110264] random: crng init done
[  103.113706] random: 2 urandom warning(s) missed due to ratelimiting
[  127.790607] igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[  127.800271] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Why is it now getting an IPv6 interface on br-lan but is not accessable at 192.168.1.1. via browser?

How can you get a connection when the state is DOWN for all your interfaces.

except for eth0: becomes ready at the end and that is not necessarily a external interface

question is; why?
I reflashed the sd card, shouldn't it have dhcp on eth0 and accessable via 192.168.1.1 by a browser?
Just a moment, I'm about to restart the router, with serial on and a client on the eth0
EDIT:
that's what the the log tells at the serial console about the network interfaces:

[    8.143990] kmodloader: done loading kernel modules from /etc/modules.d/*
[   10.889879] 8021q: adding VLAN 0 to HW filter on device eth1
[   10.896935] br-lan: port 1(eth1) entered blocking state
[   10.902455] br-lan: port 1(eth1) entered disabled state
[   10.908177] device eth1 entered promiscuous mode
[   10.914079] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   10.953183] 8021q: adding VLAN 0 to HW filter on device eth2
[   10.959993] br-lan: port 2(eth2) entered blocking state
[   10.965590] br-lan: port 2(eth2) entered disabled state
[   10.971550] device eth2 entered promiscuous mode
[   11.009297] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.015522] 8021q: adding VLAN 0 to HW filter on device eth0
[   15.360635] igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[   15.370388] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

no additional log messages appear while trying to connect to the router..

EDIT: Well nice, I'm not allowed to post anymore untill after midnight.

Nothing looks out of the ordinary in that boot log.

That the devices show NO-CARRIER (but UP) in an earlier post is strange.

IPv6 link-local addressing is "expected" behavior, unless you've gone through some crazy hoops to disable IPv6.