Reputation: 322
System Setup:
1. Generic x86-64 bit target hardware
2. Linux kernel 4.4.131
3. Yocto with core-image-base target build system
4. GRUB boot loader with booting-pcbios loader source code
5. WIC image generation to write image on storage media
WKS file to generate WIC image,
# short-description: Create an direct disk image for genericx86*
part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
#part /home --ondisk sda --fstype=ext4 --label data --align 1024 --size 3072M
#part swap --ondisk sda --size 44 --label swap1 --fstype=swap
#bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0"
# Direct disk image without GPT
bootloader --timeout=5 --append="rootwait rootfstype=ext4 video=vesafb vga=0x318 console=ttyS0,115200n8 console=tty0"
# Direct disk image with GPT
#bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 video=vesafb vga=0x318 console=ttyS0,115200n8 console=tty0"
With these setup, I am able to create WIC image. Once I write the same using DD command on USB drive, I am able to boot properly from USB device. Now issue comes when I write WIC image to SSD drive through DD command, where system stuck at Waiting for root device PARTUUID=<...>.
I have tried below things to boot-up properly,
1. Provide root partition - DISK_SIGNATURE
2. Direct disk image vs live image - bootimg-pcbios inlace of bootimg-efi - Seems one step towards actual setup
3. Systemd vs old initrd
4. Use bs=1M when doing dd
5. Remove GPT option from bootloader in WKS file
6. --uuid ${DISK_SIGNATURE_UUID} - Didn’t work out, seems to be not properly configure
7. Grub-efi to systemd-efi boot loader change
8. Try with ISO image
9. Remove —-use-uuid option from rootfs - To use rootfs from /dev/sda2
10. Change kernel configuration with AUTOFS, and systemd init service manager
11. Use bs=32K and bs=8K
12. Format SSD and Use bs=512
13. Change on-disk to sdb - Will not be affect, as kernel is also part of SDA which is booting
All above experiments I have already did nothing works.
There are many other changes which you might want to review, so let me know specific items which you want I will share further details.
Any help is highly appreciated.
Upvotes: 0
Views: 2785
Reputation: 322
After well overnight debugging, I discover that SATA device driver was kept as module in kernel configuration. Which I have changed from module to static, and it starts working. Similar issue I have already faced during boot-able USB creation. So happy ending, always check kernel configuration before any random tries. :)
Upvotes: 2