Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Last active April 28, 2018 19:54
Show Gist options
  • Save jpluimers/9520fca6d643341dddf002067e772276 to your computer and use it in GitHub Desktop.
Save jpluimers/9520fca6d643341dddf002067e772276 to your computer and use it in GitHub Desktop.
Notes on broken Raspberry Pi 3 openSUSE Tumbleweed Kernel 4.12.9-1 boot
GNU GRUB version 2.02
┌────────────────────────────────────────────────────────────────────────────┐
│setparams 'openSUSE Tumbleweed' │
│ │
│ load_video │
│ set gfxpayload=keep │
│ insmod gzio │
│ insmod part_msdos │
│ insmod ext2 │
│ set root='hd0,msdos2' │
│ if [ x$feature_platform_search_hint = xy ]; then │
│ search --no-floppy --fs-uuid --set=root --hint='hd0,msdos2' 2123\│
│2e00-2bb5-4a1e-a621-1f7c078c0311 │
│ else │
│ search --no-floppy --fs-uuid --set=root 21232e00-2bb5-4a1e-a621-1\│
│f7c078c0311 │
│ fi │
│ echo 'Loading Linux 4.12.9-1-default ...' │
│ linux /boot/Image-4.12.9-1-default root=UUID=21232e00-2bb5-4\│
│a1e-a621-1f7c078c0311 root=/dev/disk/by-id/mmc-SL16G_0xe20a4af7-part2 disk\│
│=/dev/disk/by-id/mmc-SL16G_0xe20a4af7 resume=/dev/disk/by-id/mmc-SL16G_0xe2\│
│0a4af7-part3 quiet splash=silent plymouth.enable=0 swiotlb=512,force cma=3\│
│84M console=ttyS0,115200n8 console=tty quiet │
│ echo 'Loading initial ramdisk ...' │
│ initrd /boot/initrd-4.12.9-1-default │
│ │
└────────────────────────────────────────────────────────────────────────────┘
GNU GRUB version 2.02
┌────────────────────────────────────────────────────────────────────────────┐
│setparams 'openSUSE Tumbleweed' │
│ │
│ load_video │
│ set gfxpayload=keep │
│ insmod gzio │
│ insmod part_msdos │
│ insmod ext2 │
│ set root='hd0,msdos2' │
│ if [ x$feature_platform_search_hint = xy ]; then │
│ search --no-floppy --fs-uuid --set=root --hint='hd0,msdos2' e092\│
│4c25-d514-4c7f-b2b4-a9012d053dfd │
│ else │
│ search --no-floppy --fs-uuid --set=root e0924c25-d514-4c7f-b2b4-a\│
│9012d053dfd │
│ fi │
│ echo 'Loading Linux 4.12.9-1-default ...' │
│ linux /boot/Image-4.12.9-1-default root=UUID=e0924c25-d514-4\│
│c7f-b2b4-a9012d053dfd root=/dev/disk/by-id/mmc-SL64G_0xb84542e3-part2 disk\│
│=/dev/disk/by-id/mmc-SL64G_0xb84542e3 resume=swap quiet splash=silent plymo\│
│uth.enable=0 swiotlb=512,force cma=384M console=tty0 console=ttyS0,115200n\│
│8 quiet │
│ echo 'Loading initial ramdisk ...' │
│ initrd /boot/initrd-4.12.9-1-default │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Booting `openSUSE Tumbleweed'
Loading Linux 4.12.9-1-default ...
Loading initial ramdisk ...
EFI stub: ERROR: Could not determine UEFI Secure Boot status.
[ 2.099090] kvm [1]: Invalid trigger for IRQ4, assuming level low
[ TIME ] Timed out waiting for device swap.device.
[DEPEND] Dependency failed for Resume from hibernation using device /swap.
[ OK ] Reached target Local File Systems (Pre).
Starting File System Check on /dev/…y-id/mmc-SL64G_0xb84542e3-part2...
[ OK ] Reached target Local File Systems.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Basic System.
[ OK ] Started File System Check on /dev/d…/by-id/mmc-SL64G_0xb84542e3-part2.
Mounting /sysroot...
[ OK ] Mounted /sysroot.
[ OK ] Reached target Initrd Root File System.
Starting Reload Configuration from the Real Root...
[ OK ] Started Reload Configuration from the Real Root.
[ OK ] Reached target Initrd File Systems.
[ OK ] Reached target Initrd Default Target.
Starting Cleaning Up and Shutting Down Daemons...
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped target Remote File Systems (Pre).
[ OK ] Stopped target Initrd Default Target.
[ OK ] Stopped target Initrd Root Device.
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Sockets.
[ OK ] Stopped target Slices.
[ OK ] Stopped target Paths.
[ OK ] Stopped target System Initialization.
[ OK ] Stopped target Swap.
[ OK ] Stopped target Local File Systems.
[ OK ] Stopped target Local File Systems (Pre).
Stopping udev Kernel Device Manager...
[ OK ] Stopped udev Coldplug all Devices.
[ OK ] Stopped Apply Kernel Variables.
[ OK ] Stopped Load Kernel Modules.
[ OK ] Stopped target Timers.
[ OK ] Stopped dracut cmdline hook.
[ OK ] Stopped dracut ask for additional cmdline parameters.
[ OK ] Stopped Dispatch Password Requests to Console Directory Watch.
[ OK ] Stopped udev Kernel Device Manager.
[ OK ] Stopped Create Static Device Nodes in /dev.
[ OK ] Stopped Create list of required sta…vice nodes for the current kernel.
[ OK ] Closed udev Kernel Socket.
[ OK ] Closed udev Control Socket.
Starting Cleanup udevd DB...
[ OK ] Started Cleaning Up and Shutting Down Daemons.
[ OK ] Started Cleanup udevd DB.
[ OK ] Reached target Switch Root.
Starting Switch Root...
[ 95.944306] systemd-fstab-generator[280]: Failed to create mount unit file /run/systemd/generator/-.mount, as it already exists. Duplicate entry in /etc/fstab?
[ 95.959156] systemd-fstab-generator[280]: Failed to create mount unit file /run/systemd/generator/boot-efi.mount, as it already exists. Duplicate entry in /etc/fstab?
[ 95.974560] systemd-fstab-generator[280]: Failed to create mount unit file /run/systemd/generator/-.mount, as it already exists. Duplicate entry in /etc/fstab?
[ 95.989357] systemd-fstab-generator[280]: Failed to create mount unit file /run/systemd/generator/boot-efi.mount, as it already exists. Duplicate entry in /etc/fstab?
[ 96.004887] systemd-fstab-generator[280]: Failed to create mount unit file /run/systemd/generator/-.mount, as it already exists. Duplicate entry in /etc/fstab?
[ 96.019838] systemd-fstab-generator[280]: Failed to create mount unit file /run/systemd/generator/boot-efi.mount, as it already exists. Duplicate entry in /etc/fstab?
[ OK ] Started wicked managed network interfaces.
[ OK ] Reached target Network.
Starting OpenSSH Daemon...
Starting SuSEfirewall2 phase 2...
Starting NTP Server Daemon...
Starting Permit User Sessions...
[ OK ] Started OpenSSH Daemon.
[ OK ] Started Permit User Sessions.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Started /etc/init.d/after.local Compatibility.
[ OK ] Started NTP Server Daemon.
[ OK ] Reached target System Time Synchronized.
Starting Postfix Mail Transport Agent...
[ OK ] Started Discard unused blocks once a week.
[ OK ] Started Daily rotation of log files.
[ OK ] Reached target Timers.
[ OK ] Started SuSEfirewall2 phase 2.
[ OK ] Started Postfix Mail Transport Agent.
[ OK ] Started Command Scheduler.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
Welcome to openSUSE Tumbleweed 20170831 - Kernel 4.12.9-1-default (ttyS0).
eth0: 192.168.71.68 fe80::ba27:ebff:fe40:5e62
kwak login: jeroenp
Password:
No mail.
Last login: Mon Feb 5 10:18:40 on ttyS0
Have a lot of fun...
jeroenp@kwak:~> cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20170831"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="20170831"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20170831"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
GNU GRUB version 2.02
┌────────────────────────────────────────────────────────────────────────────┐
│setparams 'openSUSE Tumbleweed' │
│ │
│ load_video │
│ set gfxpayload=keep │
│ insmod gzio │
│ insmod part_msdos │
│ insmod ext2 │
│ set root='hd0,msdos2' │
│ if [ x$feature_platform_search_hint = xy ]; then │
│ search --no-floppy --fs-uuid --set=root --hint='hd0,msdos2' e092\│
│4c25-d514-4c7f-b2b4-a9012d053dfd │
│ else │
│ search --no-floppy --fs-uuid --set=root e0924c25-d514-4c7f-b2b4-a\│
│9012d053dfd │
│ fi │
│ echo 'Loading Linux 4.12.9-1-default ...' │
│ linux /boot/Image-4.12.9-1-default root=UUID=e0924c25-d514-4\│
│c7f-b2b4-a9012d053dfd root=/dev/disk/by-id/mmc-SL64G_0xfa1d1e16-part2 disk\│
│=/dev/disk/by-id/mmc-SL64G_0xfa1d1e16 resume=/dev/disk/by-id/mmc-SL64G_0xfa\│
│1d1e16-part3 quiet splash=silent plymouth.enable=0 swiotlb=512,force cma=3\│
│84M console=tty0 console=ttyS0,115200n8 quiet │
│ echo 'Loading initial ramdisk ...' │
│ initrd /boot/initrd-4.12.9-1-default │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Booting `openSUSE Tumbleweed'
Loading Linux 4.12.9-1-default ...
Loading initial ramdisk ...
EFI stub: ERROR: Could not determine UEFI Secure Boot status.
[ 2.098370] kvm [1]: Invalid trigger for IRQ4, assuming level low
[ OK ] Started wicked managed network interfaces.
[ OK ] Reached target Network.
Starting Permit User Sessions...
Starting OpenSSH Daemon...
Starting SuSEfirewall2 phase 2...
Starting NTP Server Daemon...
[ OK ] Started Permit User Sessions.
[ OK ] Started OpenSSH Daemon.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Started /etc/init.d/after.local Compatibility.
[ OK ] Started NTP Server Daemon.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Daily rotation of log files.
Starting Postfix Mail Transport Agent...
[ OK ] Started Discard unused blocks once a week.
[ OK ] Reached target Timers.
[ OK ] Started SuSEfirewall2 phase 2.
[ OK ] Started Postfix Mail Transport Agent.
[ OK ] Started Command Scheduler.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
Welcome to openSUSE Tumbleweed 20170831 - Kernel 4.12.9-1-default (ttyS0).
eth0: 192.168.71.67 fe80::ba27:ebff:fe0f:2e8a
kwek login: jeroenp
Password:
No mail.
Last login: Mon Feb 5 10:42:26 on ttyS0
Have a lot of fun...
jeroenp@kwek:~> cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20170831"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="20170831"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20170831"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
GNU GRUB version 2.02
┌────────────────────────────────────────────────────────────────────────────┐
│setparams 'openSUSE Tumbleweed' │
│ │
│ load_video │
│ set gfxpayload=keep │
│ insmod gzio │
│ insmod part_msdos │
│ insmod ext2 │
│ set root='hd0,msdos2' │
│ if [ x$feature_platform_search_hint = xy ]; then │
│ search --no-floppy --fs-uuid --set=root --hint='hd0,msdos2' e092\│
│4c25-d514-4c7f-b2b4-a9012d053dfd │
│ else │
│ search --no-floppy --fs-uuid --set=root e0924c25-d514-4c7f-b2b4-a\│
│9012d053dfd │
│ fi │
│ echo 'Loading Linux 4.13.2-1-default ...' │
│ linux /boot/Image-4.13.2-1-default root=UUID=e0924c25-d514-4\│
│c7f-b2b4-a9012d053dfd root=/dev/disk/by-id/mmc-SL64G_0x232e0d17-part2 disk\│
│=/dev/disk/by-id/mmc-SL64G_0x232e0d17 resume=/dev/disk/by-id/mmc-SL64G_0x23\│
│2e0d17-part3 quiet splash=silent plymouth.enable=0 swiotlb=512,force cma=3\│
│84M console=tty0 console=ttyS0,115200n8 quiet │
│ echo 'Loading initial ramdisk ...' │
│ initrd /boot/initrd-4.13.2-1-default │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Booting a command list
Loading Linux 4.13.2-1-default ...
Loading initial ramdisk ...
EFI stub: ERROR: Could not determine UEFI Secure Boot status.
[ 4.250504] kvm [1]: Invalid trigger for IRQ4, assuming level low
[ 5.588740] OF: /soc/usb@7e980000: could not get #phy-cells for /phy
[ TIME ] Timed out waiting for device dev-di…dSL64G_0x232e0d17\x2dpart3.device.
[DEPEND] Dependency failed for Resume from h…/by-id/mmc-SL64G_0x232e0d17-part3.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Reached target Local File Systems.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Basic System.
[ **] A start job is running for dev-disk…part2.device (1min 39s / no limit)
@jpluimers
Copy link
Author

And the oldest kernel also fails:

Loading Linux 4.12.8-1-default ...
Loading initial ramdisk ...
EFI stub: ERROR: Could not determine UEFI Secure Boot status.
[    2.106745] kvm [1]: Invalid trigger for IRQ4, assuming level low
[    2.998833] OF: /soc/usb@7e980000: could not get #phy-cells for /phy
[ TIME ] Timed out waiting for device dev-di…dSL64G_0x232e0d17\x2dpart3.device.
[DEPEND] Dependency failed for Resume from h…/by-id/mmc-SL64G_0x232e0d17-part3.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Basic System.
[    **] A start job is running for dev-disk…part2.device (1min 59s / no limit)

@jpluimers
Copy link
Author

Copying /boot/efi/u-boot.bin from #2 to #4 fails as well:

DRAM:  896 MiB
RPI 3 Model B (0xa22082)
MMC:   sdhci@7e300000: 0
reading uboot.env

** Unable to read "uboot.env" from mmc0:1 **
Using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   No ethernet found.
starting USB...
USB0:   Core Release: 2.80a
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
22637 bytes read in 149 ms (147.5 KiB/s)

USB device 0: unknown device
Waiting for Ethernet connection... unable to connect.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-b8-27-eb-24-d3-ee
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-bcm283x
Waiting for Ethernet connection... unable to connect.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm

@jpluimers
Copy link
Author

U-Boot> ls mmc 0:1
     6694   fixup.dat 
  2868644   start.elf 
   385734   u-boot.bin 
    50248   bootcode.bin 
      938   config.txt 
        9   startup.nsh 
            .spotlight-v100/
            .fseventsd/
      938   config.txt.rpmsave 
   393800   u-boot.bad.bin 

8 file(s), 2 dir(s)

U-Boot> 

@jpluimers
Copy link
Author

[2:04pm] <wiert>
So how do I edit /etc/dracut.conf.d/raspberrypi_modules.conf when it does not boot?
[2:05pm] <afaerber>
as I said, that's because the correct module is not in the initrd - you need to boot using an older kernel, change the config, re-create the new initrd via mkinitrd and reboot with the new kernel
[2:08pm] <wiert>
So dracult.conf.d configures the initrd ?
[2:09pm] <wiert>
How can I find which other kernels are available? Can grub show that?
[2:10pm] <agraf>
there should be an advanced menu entry ,yes
[2:10pm] <agraf>
which lists old versions
[2:13pm] <wiert>
Ah, that’s where the old kernels are.
[2:15pm] <wiert>
Do I need the “recovery” version os the regular one?
[2:16pm] <wiert>
After that: should I continue with modifying the dracult configuration, or just try to zypper dist-upgrade to the most recent build?
[2:21pm] <agraf>
the normal one
[2:22pm] <agraf>
and yes, you will need to modify the dracut config
[2:22pm] <agraf>
that's the downside of our image approach :(
[2:25pm] <wiert>
4.12.9-1-default has the same problem https://gist.github.com/jpluimers/9520fca6d643341dddf002067e772276#gistcomment-2341855
[2:27pm] <wiert>
What’s the meaning of “OF: /soc/usb@7e980000: could not get #phy-cells for /phy” ?
[2:30pm] <wiert>
Oldest kernel fails too. Boy, I’ve trouble (:
[2:32pm] <wiert>
Any more options?
[2:38pm] <agraf>
wiert: try to pull in an older u-boot then from one of the working systems
[2:39pm] <agraf>
wiert: it's in /boot/efi/u-boot.bin
[2:44pm] <wiert>
Let me check that out.
[3:29pm] <wiert>
agraf: managed to do the copY (finally found the USB Micro SD adapter), but that fails too: https://gist.github.com/jpluimers/9520fca6d643341dddf002067e772276#gistcomment-2341909
[3:30pm] <wiert>
Should I’ve copied more than just the /boot/efi/u-boot.bin to the vfat partition?
[3:31pm] <agraf>
wiert: did you overwrite/remove any other files?
[3:32pm] <wiert>
no, just that one
[3:33pm]
adrianS_ left the chat room. (Ping timeout: 240 seconds)
[3:33pm]
adrianS_ joined the chat room.
[3:33pm] <wiert>
mounted the vfat partition to a new directory in /mnt on #2, then rsync -avloz /voot/efi/ /mnt/boot-efi/efi/efi/ then moved the u-boot.bin file one directory down.
[3:35pm] <wiert>
I do have a “U-Boot>” prompt now.
[3:35pm] <wiert>
Anything I can try there?
[3:39pm] <agraf>
just replacing u-boot should've fully preserved the existing boot logic
[3:39pm] <agraf>
on the u-boot prompt, do "ls mmc 0:1"
[3:44pm] <wiert>
That shows files: https://gist.github.com/jpluimers/9520fca6d643341dddf002067e772276#gistcomment-2341928
[3:46pm] <wiert>
Dang: after creating that disk image originally, it looks like Mac OS put some extra stuff there.
[3:53pm] <wiert>
What else could I try?
[4:00pm] <wiert>
What USB serial cables are reliable
[4:00pm] <wiert>
(these hang my screen connection every now and then: https://www.amazon.de/COM-FOUR%C2%AE-PL2303HX-RS232-Kabel-Modul-Konverter/dp/B00WE051XK )
[4:31pm] <wiert>
@afaerber: I’m going to need to assist my brother, so if you’re there: lets continue tomorrow.
[4:31pm] <wiert>
(He’s about half an hour away so I’m gone for at least the next hours)
[4:33pm] <wiert>
and for @afarber as well: thanks for all the help so far; much appreciated, I already learned a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment