Skip to contentSkip to conversation

Trouble booting basic x86 image

DISCUSSION Paul D. DeRocco 2 participants 3 messages Feb 23, 2021 – Feb 24, 2021

lore
Share & tools
lore
#0 lore raw

Yocto Gatesgarth, using meta-intel to build core-image-minimal Intel D2700MUD mini-ITX mobo with D2700 Atom Ordinary USB 2.0 flash drive

I followed the instructions in the meta-intel README, and had no problems building the intel-core2-32 and intel-corei7-64 machines, as well as the latter with an x32 tune. But whenever I try to boot any of them, I get the following stuff from the kernel:

usb 1-6: new high-speed USB device number 4 using ehci-pci usb-storage 1-6:1.0: USB Mass Storage device detected usb-storage 1-6:1.0: Quirks match for vid 090c pid 1000: 400 scsi host4: usb-storage 1-6:1.0
scsi 4:0:0:0: Direct-Access FLASH Drive SM_USB20 1100 PQ: 0 ANSI: 4
sd 4:0:0:0: Attached scsi generic sg0 type 0
sd 4:0:0:0: [sda] 3932160 512-byte logical blocks: (2.01 GB/1.88 GiB) sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] No Caching mode page found
sd 4:0:0:0: [sda] Assume drive cache: write through
sda:
sd 4:0:0:0: [sda] Attached SCSI removable disk
(countdown from 27 to 0)
Mounted filesystems
Available block devices
major minor #blocks name
1 0 4096 ram0
... (others edited out)
1 15 4096 ram15
8 0 1966080 sda
Cannot find rootfs.img file in /run/media/* , dropping to a shell

At this point, it doesn't drop to a shell, but just sits there, responding to keys by echoing them, so I have no way of investigating. Ctrl-Alt-Del reboots.

Since there is no kernel serial output on this board, even though the kernel command requests it, I videoed the startup, but didn't anything that looked suspicious. I didn't see any message, though, about mounting anything in /run/media.

As I've said, I've tried three different builds, totally generic except for using the Intel BSP layer. I've tried two different USB drives. I've tried it with EFI enabled and disabled in the BIOS. I've looked at the drive on the PC, and the contents look normal. So why can't it find the rootfs.img file, which is right there on sda, large as life? Anyone have any ideas what I could be doing wrong?

Signature · 2 lines
Ciao,               Paul D. DeRocco
Paul                mailto:[email protected]
#1 lore raw
Quoted 26 lines · Paul D. DeRocco

Yocto Gatesgarth, using meta-intel to build core-image-minimal Intel D2700MUD mini-ITX mobo with D2700 Atom Ordinary USB 2.0 flash drive

I followed the instructions in the meta-intel README, and had no problems
building the intel-core2-32 and intel-corei7-64 machines, as well as the
latter with an x32 tune. But whenever I try to boot any of them, I get the
following stuff from the kernel:

usb 1-6: new high-speed USB device number 4 using ehci-pci usb-storage 1-6:1.0: USB Mass Storage device detected usb-storage 1-6:1.0:  Quirks match for vid 090c pid 1000: 400 scsi host4: usb-storage 1-6:1.0
scsi 4:0:0:0: Direct-Access     FLASH    Drive SM_USB20   1100 PQ: 0
ANSI: 4
sd 4:0:0:0: Attached scsi generic sg0 type 0
sd 4:0:0:0: [sda] 3932160 512-byte logical blocks: (2.01 GB/1.88 GiB) sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] No Caching mode page found
sd 4:0:0:0: [sda] Assume drive cache: write through
 sda:
sd 4:0:0:0: [sda] Attached SCSI removable disk
(countdown from 27 to 0)

Quoted 8 lines

Mounted filesystems
Available block devices
major minor  #blocks  name
   1        0       4096 ram0
    ... (others edited out)
   1       15       4096 ram15
   8        0    1966080 sda
Cannot find rootfs.img file in /run/media/* , dropping to a shell

It looks like you are using the live option in hddimg image? Can you try adding "rootwait" to kernel parameters and see if that works?

Not sure why it's not dropping to shell, but may be try adding explicit call to /bin/sh in meta/recipes-core/initrdscripts/files/init-live.sh before this point to make sure the media is actually mounted at that point.

Also, have you tried wic image to see if that works?

Thanks,

Anuj

#2 lore raw
Quoted 5 lines

From: Mittal, Anuj [mailto:[email protected]]

It looks like you are using the live option in hddimg image? Can you try adding "rootwait" to kernel parameters and see if that works?

Quoted 7 lines

Not sure why it's not dropping to shell, but may be try adding explicit
call to /bin/sh in meta/recipes-core/initrdscripts/files/init-live.sh before this point to make sure the media is actually mounted at that point.

Also, have you tried wic image to see if that works?

Thanks for the advice. I decided to try wic, since that's actually the x86 default if you don't set IMAGE_FSTYPES. It also looks cleaner than hddimg, since it has a real ext4 partition and no loop mounting.

For the 32-bit build, it produced something my BIOS wouldn't recognize as bootable, even though it looked fine in gparted. For the 64-bit build, it booted part way, crashing on an illegal instruction in systemd. For the 64x32-build, it booted but failed trying to run /sbin/init with error -8 (invalid executable). When I look at the drive in Ubuntu, the properties on that file say it's a link to /lib/systemd/systemd, which makes sense. Strangely, though, it describes it as a shared library. objdump -f says:

/media/pauld/platform/sbin/init: file format elf32-x86-64
architecture: i386:x64-32, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x00024490

So still no joy. I'd rather get this wic version working than go back to the hddimg version, but I'm not sure what to try next.

Ultimately, I'm just trying to get a vanilla reference build, so that when the "real" system I'm creating doesn't work (which is often), I can compare kernel configs, etc., to a known working system.

Signature · 2 lines
Ciao,               Paul D. DeRocco
Paul                mailto:[email protected]