Hi,
I upgraded a cubox-i from buster to bullseye. The upgrade went through without any issues. But after the upgrade the system does not boot anymore. The output of the serial console is below. The boot process hangs at
[ 3.816424] Waiting for root device /dev/mmcblk1p2...
Did the device enumeration change?
How would I find out the new device name and how would I change the boot parameters (which apparently specifies /dev/mmcblk1p2 according to the
output below)?
setenv bootargs ${bootargs} break=mountroot
boot
setenv bootargs ${bootargs} init=/bin/bash
boot
I upgraded a cubox-i from buster to bullseye. The upgrade went through without
any issues. But after the upgrade the system does not boot anymore. The output
of the serial console is below. The boot process hangs at
[ 3.816424] Waiting for root device /dev/mmcblk1p2...
Did the device enumeration change?
How would I find out the new device name and how would I change the boot parameters (which apparently specifies /dev/mmcblk1p2 according to the output
below)?
On 2021-12-27, Rainer Dorsch wrote:
I upgraded a cubox-i from buster to bullseye. The upgrade went through without any issues. But after the upgrade the system does not boot
anymore. The output of the serial console is below. The boot process
hangs at
[ 3.816424] Waiting for root device /dev/mmcblk1p2...
Did the device enumeration change?
Very likely; it is not promised to remain constant even between boots
with the same kernel, unfortunately!
You really want to use root=UUID=abcde-12345... or partition labels, or anything that isn't going to have surprise changes...
How would I find out the new device name and how would I change the boot parameters (which apparently specifies /dev/mmcblk1p2 according to the output below)?
If you can insert the microSD into another Debian machine, you can get
the UUID by looking in /dev/disk/by-uuid/ to find the matching device
or:
lsblk --fs /dev/DEVICE
It might be possible to discover from u-boot as well, but I forget off
the top of my head.
Once you have the UUID, try passing root=UUID=$uuid in bootparams
instead of root=/dev/mmcblk...
Thanks for your quick reply Vagrant.
Am Montag, 27. Dezember 2021, 18:22:43 CET schrieb Vagrant Cascadian:
On 2021-12-27, Rainer Dorsch wrote:
I upgraded a cubox-i from buster to bullseye. The upgrade went through without any issues. But after the upgrade the system does not boot anymore. The output of the serial console is below. The boot process hangs at
[ 3.816424] Waiting for root device /dev/mmcblk1p2...
Did the device enumeration change?
Very likely; it is not promised to remain constant even between boots
with the same kernel, unfortunately!
Wow. I installed bullseye on a second cubox-i and there I get
You really want to use root=UUID=abcde-12345... or partition labels, or anything that isn't going to have surprise changes...
Makes perfect sense.
How would I find out the new device name and how would I change the boot parameters (which apparently specifies /dev/mmcblk1p2 according to the output below)?
If you can insert the microSD into another Debian machine, you can get the UUID by looking in /dev/disk/by-uuid/ to find the matching device
or:
lsblk --fs /dev/DEVICE
It might be possible to discover from u-boot as well, but I forget off
the top of my head.
I realized that ext4ls uses dev 0 for the root filesystem
CuBox-i U-Boot > ext4ls mmc 0:2 /
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 boot
<DIR> 12288 etc
<DIR> 4096 media
<DIR> 4096 var
<DIR> 4096 usr
<DIR> 4096 bin
<DIR> 4096 lib
<DIR> 176128 tmp
<DIR> 4096 sys
<DIR> 12288 sbin
<DIR> 4096 run
<DIR> 4096 root
<DIR> 4096 proc
<DIR> 4096 home
<DIR> 4096 dev
<DIR> 4096 mnt
<DIR> 4096 srv
<DIR> 4096 opt
CuBox-i U-Boot >
also mmcroot implies dev 0
mmcroot=/dev/mmcblk0p2 rootwait rw
but u-env tries to mount device 1:
Waiting for root device /dev/mmcblk1p2
But figuring out the uuid should also be not problem.
Once you have the UUID, try passing root=UUID=$uuid in bootparams
instead of root=/dev/mmcblk...
Here I am stuck:
- I do not find any reference to bootparam in udev or boot.scr
- In boot.scr I see an unconditional assignment
setenv bootargs " ${bootargs} enable_wait_mode=off root=/dev/mmcblk1p2 rootfstype=ext4 ro rootwait console=ttymxc0,115200 console=tty1"
(for reference https://paste.debian.net/1224931/ )
i.e. I see no way to overwrite root there.
Is there a way to modify boot.scr itself?
Very likely; it is not promised to remain constant even between boots
with the same kernel, unfortunately!
You really want to use root=UUID=abcde-12345... or partition labels, or anything that isn't going to have surprise changes...
Am Montag, 27. Dezember 2021, 18:22:43 CET schrieb Vagrant Cascadian:
Very likely; it is not promised to remain constant even between boots
with the same kernel, unfortunately!
You really want to use root=UUID=abcde-12345... or partition labels, or
anything that isn't going to have surprise changes...
Hmm...I think the problem is something different.
I inserted the SDcard in a different Linux-System and I extracted the UUID:
root@h370:~# lsblk --fs /dev/sdc2
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sdc2 ext4 1.0 233113e0-67d1-409f-b2c0-57bd496213de root@h370:~#
I manually loaded now the kernel in uboot (does the manual sequence look reasonable?):...
CuBox-i U-Boot > load mmc 0:1 0x10800000 vmlinuz-5.10.0-10-armmp
4960768 bytes read in 380 ms (12.4 MiB/s)
CuBox-i U-Boot > load mmc 0:1 0x18000000 dtbs/5.10.0-10-armmp/imx6q-cubox- i.dtb
37880 bytes read in 254 ms (145.5 KiB/s)
CuBox-i U-Boot > load mmc 0:1 0x11800000 initrd.img-5.10.0-10-armmp
24040022 bytes read in 1551 ms (14.8 MiB/s)
CuBox-i U-Boot > setenv bootargs " ${bootargs} enable_wait_mode=off root=UUID=233113e0-67d1-409f-b2c0-57bd496213de rootfstype=ext4 ro rootwait
console=ttymxc0,115200 console=tty1 break"
CuBox-i U-Boot > printenv bootargs
bootargs= enable_wait_mode=off root=UUID=233113e0-67d1-409f-b2c0-57bd496213de
rootfstype=ext4 ro rootwait console=ttymxc0,115200 console=tty1 break
CuBox-i U-Boot > bootz 0x10800000 0x11800000: 0x18000000
Kernel image @ 0x10800000 [ 0x000000 - 0x4bb200 ]
## Flattened Device Tree blob at 18000000
Booting using the fdt blob at 0x18000000
EHCI failed to shut down host controller.
Using Device Tree in place at 18000000, end 1800c3f7
In order to exclude that I got something wrong with the UUID:
Does root=/dev/mmcblk0p2 also work if ext4ls mmc 0:2 shows the rootfs?
I have several cubox-i systems all running bullseye, so it certainly is possible! I think they're all using eSATA for both /boot and rootfs,
though I checked that one does detect /dev/mmcblk1 and relevent
partitions for the microSD.
It *might* be possible that there are some missing modules in the initrd/initramfs to use mmcblk devices, but based on the above it looks
more likely that you're not passing the initrd/initramfs at boot.
On 12/27/21 18:22, Vagrant Cascadian wrote:any issues. But after the upgrade the system does not boot
On 2021-12-27, Rainer Dorsch wrote:
I upgraded a cubox-i from buster to bullseye. The upgrade went through
without
anymore. The output of the serial console is below. The boot process
hangs at
[ 3.816424] Waiting for root device /dev/mmcblk1p2...
Did the device enumeration change?
Very likely; it is not promised to remain constant even between boots
with the same kernel, unfortunately!
You really want to use root=UUID=abcde-12345... or partition labels, or anything that isn't going to have surprise changes...
below)?How would I find out the new device name and how would I change the boot >> parameters (which apparently specifies /dev/mmcblk1p2 according to the
output
If you can insert the microSD into another Debian machine, you can get the UUID by looking in /dev/disk/by-uuid/ to find the matching device or:
lsblk --fs /dev/DEVICE
It might be possible to discover from u-boot as well, but I forget off
the top of my head.
I can recommend barebox here instead of U-Boot. i.MX is the probably
best supported platform for it and I would expect the cubox-i to be
directly supported.
Barebox can mount various filesystems and if there is a bootspec entry
in your rootfs (e.g. flash-kernel can write such an entry) you can just do:
boot /mnt/mmc0.0
to let barebox pick the kernel, initrd and dtb from the filesystem on
mmc0.0 and pass root=UUID=$therightone.
If you can insert the microSD into another Debian machine, you can get
the UUID by looking in /dev/disk/by-uuid/ to find the matching device
or:
lsblk --fs /dev/DEVICE
It might be possible to discover from u-boot as well, but I forget off
the top of my head.
part uuid mmc 1:28ad3fb70-02
part uuid mmc 1:38ad3fb70-03
Am Montag, 27. Dezember 2021, 18:22:43 CET schrieb Vagrant Cascadian:
If you can insert the microSD into another Debian machine, you can get
the UUID by looking in /dev/disk/by-uuid/ to find the matching device
or:
lsblk --fs /dev/DEVICE
It might be possible to discover from u-boot as well, but I forget off
the top of my head.
There is
part uuid mmc 1:28ad3fb70-02
part uuid mmc 1:38ad3fb70-03
but "root=UUID=8ad3fb70-03" is not working for mounting the rootfs.
In the bullseye installation, there is also a variable defined finduuid
finduuid=part uuid mmc 0:1 uuid
which is even called by bootcmd, but I am not sure if that is doing anything useful.
On 2021-12-29, Rainer Dorsch wrote:
Am Montag, 27. Dezember 2021, 18:22:43 CET schrieb Vagrant Cascadian:
If you can insert the microSD into another Debian machine, you can get >> the UUID by looking in /dev/disk/by-uuid/ to find the matching device >>
or:
lsblk --fs /dev/DEVICE
It might be possible to discover from u-boot as well, but I forget off
the top of my head.
There is
part uuid mmc 1:28ad3fb70-02
part uuid mmc 1:38ad3fb70-03
but "root=UUID=8ad3fb70-03" is not working for mounting the rootfs.
In the bullseye installation, there is also a variable defined finduuid
finduuid=part uuid mmc 0:1 uuid
which is even called by bootcmd, but I am not sure if that is doing anything useful.
That *may* be a partition UUID, rather than a filesystem
UUID... initramfs-tools 0.121 and newer supports using
root=PARTUUID=...
You can see the available partition uuids on linux in
/dev/disk/by-partuuid/
On 2021-12-29, Rainer Dorsch wrote:
Am Montag, 27. Dezember 2021, 18:22:43 CET schrieb Vagrant Cascadian:
If you can insert the microSD into another Debian machine, you can
get
the UUID by looking in /dev/disk/by-uuid/ to find the matching
device
or:
lsblk --fs /dev/DEVICE
It might be possible to discover from u-boot as well, but I forget off
the top of my head.
There is
part uuid mmc 1:28ad3fb70-02
part uuid mmc 1:38ad3fb70-03
but "root=UUID=8ad3fb70-03" is not working for mounting the rootfs.
In the bullseye installation, there is also a variable defined finduuid
finduuid=part uuid mmc 0:1 uuid
which is even called by bootcmd, but I am not sure if that is doing anything useful.
That *may* be a partition UUID, rather than a filesystem
UUID... initramfs-tools 0.121 and newer supports using
root=PARTUUID=...
You can see the available partition uuids on linux in
/dev/disk/by-partuuid/
From my 2 gig rpi4, serving as a buildbot, and heavily modified to move much of the buildbot traffic off the u-sd:
live well,
vagrant
On 12/28/21 13:46, Rainer Dorsch wrote:
Am Dienstag, 28. Dezember 2021, 11:47:37 CET schrieb Uwe Kleine-König:
I can recommend barebox here instead of U-Boot. i.MX is the probably
best supported platform for it and I would expect the cubox-i to be
directly supported.
Barebox can mount various filesystems and if there is a bootspec entry
in your rootfs (e.g. flash-kernel can write such an entry) you can just do: >>>
boot /mnt/mmc0.0
to let barebox pick the kernel, initrd and dtb from the filesystem on
mmc0.0 and pass root=UUID=$therightone.
Thanks for the advice. Is barebox already packaged for Debian and I just don't
find it or do I need to install it from non-Debian sources?
It's not yet packaged, there is only an ITP, which waits for some effort
to convert barebox to SPDX. https://bugs.debian.org/900958
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 234:09:54 |
Calls: | 6,624 |
Files: | 12,172 |
Messages: | 5,319,637 |