:: [DNG] Updating Devuan on a Beaglebo…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Antoine
Fecha:  
A: dng
Asunto: [DNG] Updating Devuan on a Beaglebone Black
I've been trying to update my Beaglebone Black from ASCII to Beowulf.
Everything is working just fine, with one exception: the kernel. As far as I
can tell, the root filesystem didn't have a copy of the kernel at all before
the upgrade: only the boot partition had a static kernel and initial
userspace. Note "static": that's what I'm having trouble with. The boot
partition contains a vfat filesystem (for u-boot) and the currently-running
kernel doesn't know how to read it.

root@yttrium88:~# uname -a
Linux yttrium88 4.14.18 #1 SMP Tue Feb 13 10:38:46 CET 2018 armv7l GNU/Linux
root@yttrium88:~#

...

root@yttrium88:~# blkid /dev/mmcblk0p1
/dev/mmcblk0p1: SEC_TYPE="msdos" UUID="F283-4F03" \
TYPE="vfat" PARTUUID="1f639d1e-01"
root@yttrium88:~#

...

root@yttrium88:~# mount /dev/mmcblk0p1 /mnt/
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1, \
missing codepage or helper program, or other error.
root@yttrium88:~#

...

root@yttrium88:~# lsmod
Module                  Size  Used by
root@yttrium88:~#


I then tried to kexec the new kernel:

root@yttrium88:~# zcat /proc/config.gz |grep KEXEC
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC=y
root@yttrium88:~#

...

root@yttrium88:~# cat /proc/cmdline
console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw net.ifnames=0 \
rootfstype=ext4 rootwait fixrtc
root@yttrium88:~#

...

root@yttrium88:~# kexec -l /boot/vmlinuz-4.19.0-5-armmp \
--append=$(cat /proc/cmdline) --initrd=/boot/initrd.img-4.19.0-5-armmp -c
root@yttrium88:~# kexec --console-serial -e

Then, after the reboot, I get a kernel panic due to a missing rootfs:

(snip)
[    6.114102] Hardware name: Generic AM33XX (Flattened Device Tree)
[    6.120481] [<c0316544>] (unwind_backtrace) from [<c030f570>] (show_stack+0x20/0x24)
[    6.128548] [<c030f570>] (show_stack) from [<c0ae8b60>] (dump_stack+0xbc/0xd0)
[    6.136081] [<c0ae8b60>] (dump_stack) from [<c034f414>] (panic+0x100/0x28c)
[    6.143340] [<c034f414>] (panic) from [<c10019a8>] (mount_block_root+0x2f8/0x318)
[    6.151135] [<c10019a8>] (mount_block_root) from [<c1001a5c>] (mount_root+0x94/0x98)
[    6.159198] [<c1001a5c>] (mount_root) from [<c1001bc0>] (prepare_namespace+0x160/0x1a8)
[    6.167534] [<c1001bc0>] (prepare_namespace) from [<c1001444>] (kernel_init_freeable+0x390/0x3a4)
[    6.176779] [<c1001444>] (kernel_init_freeable) from [<c0afdea8>] (kernel_init+0x18/0x128)
[    6.185387] [<c0afdea8>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[    6.193265] Exception stack(0xde119fb0 to 0xde119ff8)
[    6.198522] 9fa0:                                     00000000 00000000 00000000 00000000
[    6.207035] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    6.215546] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    6.222454] ---[ end Kernel panic - not syncing: VFS: Unable to mount root 
fs on unknown-block(0,0) ]---


Obviously, I'm doing something wrong, but I can't tell what, exactly.
According to a message on the denx.de mailing list (u-boot) it looks like a
kernel configuration problem, but I don't know enough to further diagnose it.

Is the new kernel badly configured?
Is there a way to update the u-boot partition?
Will I need to download a whole new image and transfer all the data and
configuration (I'd rather not have to go that far)?

Antoine

--
If everything goes according to plan,
the plan has been compromised.