Re: GPT ERROR when write preempt img to sata on NUC7i5BNB


siming
 

My environment is build according to the doc https://projectacrn.github.io/1.6/getting-started/rt_industry.html
Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk

# uname -a

Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux

# cat /etc/os-release 
BUILD_ID=32680
# acrn-dm -v
DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15
Thanks.

在 2020-08-03 14:43:42,"Yin, Fengwei" <fengwei.yin@...> 写道: >Hi Siming, > >On 8/3/2020 2:23 PM, siming wrote: >> Hi Fengwei, >> I have tried two ways to boot preempt uos, but no success. There were >> error logs in the previousemail. >So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh? >Could you please share the whole launch_hard_rt_vm1.sh script? > >Also the version of acrn hypervisor, acrn-dm and SOS kernel version >could help here. Thanks. > > >Regards >Yin, Fengwei > >>> >>> <    -s 2,*passthru*,00/17/0 \ >>> >>> --- >>> >>> >    -s 2*,virtio-blk*,/dev/sda \ >>> >> >> Best Regards. >> >> >> >> >> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@...> wrote: >> >> Hi Siming, >> >> I suppose you need passthru the SATA controller to your second VM. >> Not using virtio block >> >> based /dev/sda. >> >> >> Regards >> Yin, Fengwei >> ------------------------------------ >> >> On 8/3/20 8:52 AM, siming wrote: >>> I have boot from sata by choose sata in the boot menu: >>> UEFI:SATA PORT 0 : OS Bootloader >>> the systen works well, system info : >>> root@clr-preempt-rt~#: uname -a >>> Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP >>> PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux >>> >>> >>> >>> >>> 在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@...> 写道: >>> >>> Hi >>> >>> Could you please double check if it can native boot from sda? >>> >>> 1. set boot order to Built-in shell; >>> 2. type fs0: ENTER >>> 3. cd EFI/BOOT ENTER >>> 4. run BOOTX64.EFI >>> >>> BR. >>> >>> Fuzhong >>> >>> *From:*acrn-users@... >>> <acrn-users@...> *On Behalf Of *siming >>> *Sent:* Saturday, August 1, 2020 9:50 AM >>> *To:* acrn-users@... >>> *Subject:* Re: [acrn-users] GPT ERROR when write preempt img >>> to sata on NUC7i5BNB >>> >>> thanks for the direction, the dd commond works fine in the >>> native boot, but the launch rt vm still failed (in acrn boot). >>> >>> I tried two way to launch the vm, the difference is "-s 2 " of >>> the acrn-dm. >>> >>> # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh >>> >>> <   -s 2,*passthru*,00/17/0 \ >>> >>> --- >>> >>> >   -s 2*,virtio-blk*,/dev/sda \ >>> >>> *launch_hard_rt_vm1.sh error log:* >>> >>> modify_bar_registration: bypass for pci-passthru 0:2.0 >>> >>> [  41.557774] Unknown IOCTL 0x43000055 >>> >>> pci passthru init failed >>> >>> mngr_client_new: Failed to accept from fd 35, err: Invalid >>> argument >>> >>> Stop listening 35... >>> >>> Stop polling 35... >>> >>> Unable to init vdev (22) >>> >>> *launch_hard_rt_vm2.sh error log:* >>> >>> polling 35... >>> >>> pci init hostbridge >>> >>> pci init virtio-blk >>> >>> acrn-dm: Could not open backing file: /dev/sdaListening 35... >>> >>> : No such file or directory >>> >>> Could not open backing filepci virtio-blk init failed >>> >>> mngr_client_new: Failed to accept from fd 35, err: Invalid >>> argument >>> >>> Stop listening 35... >>> >>> my sata info: >>> >>> $ lsblk >>> >>> NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT >>> >>> sda          8:0    0 111.8G  0 disk >>> >>> ├─sda1       8:1    0   510M  0 part >>> >>> ├─sda2       8:2    0    33M  0 part >>> >>> └─sda3       8:3    0     8G  0 part >>> >>> nvme0n1    259:0    0 238.5G  0 disk >>> >>> ├─nvme0n1p1 259:1    0   142M  0 part >>> >>> ├─nvme0n1p2 259:2    0   244M  0 part [SWAP] >>> >>> └─nvme0n1p3 259:3    0 238.1G  0 part / >>> >>> $ lspci -nn | grep SATA >>> >>> 00:17.0 SATA controller [0106]: Intel Corporation Sunrise >>> Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21) >>> >>> The attachment is the error logs and the launch script. >>> >>> Best Regards >>> >>> 在2020-07-31 15:47:15,"Liu, Fuzhong" <fuzhong.liu@... >>> <mailto:fuzhong.liu@...>> 写道: >>> >>> Please set boot order to Built-in shell; >>> >>> then type fs1: ENTER >>> >>> cd EFI/BOOT ENTER >>> >>> run BOOTX64.EFI >>> >>> It will boot from native. >>> >>> BR. >>> >>> Fuzhong >>> >>> *From:*acrn-users@... >>> <mailto:acrn-users@...> >>> <acrn-users@... >>> <mailto:acrn-users@...>> *On Behalf Of >>> *siming >>> *Sent:* Friday, July 31, 2020 2:10 PM >>> *To:* acrn-users@... >>> <mailto:acrn-users@...> >>> *Subject:* Re: [acrn-users] GPT ERROR when write preempt >>> img to sata on NUC7i5BNB >>> >>> thanks for the responds.I did the dd comond in the acrn boot. >>> >>> After I install the service VM with./acrn_quick_setup.sh >>> ,I cannot boot into /Clear-linux-native-5.5.11-922/. The >>> HDMI is nothing out when I choose this. >>> >>> /  Clear Linux OS(acrn)/ >>> >>> /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/ >>> >>> /  Clear Linux OS(Clear-linux-native-5.5.11-922)/ >>> >>> Did I miss something in the set up of the service vm? >>> >>> thanks >>> >>> 在2020-07-31 12:58:21,"Liu, Fuzhong" >>> <fuzhong.liu@... <mailto:fuzhong.liu@...>> 写道: >>> >>> Hi >>> >>> The dd issue is for acrn boot or native boot? >>> >>> Please  boot into native and try it again. >>> >>> Thanks! >>> >>> BR. >>> >>> Fuzhong >>> >>> *From:*acrn-users@... >>> <mailto:acrn-users@...> >>> <acrn-users@... >>> <mailto:acrn-users@...>> *On Behalf >>> Of *siming >>> *Sent:* Friday, July 31, 2020 11:34 AM >>> *To:* acrn-users@... >>> <mailto:acrn-users@...> >>> *Subject:* [acrn-users] GPT ERROR when write preempt >>> img to sata on NUC7i5BNB >>> >>> Hi, >>> >>>   My board is NUC7i5BNB, with two disks: an NVMe disk >>> for the Clear Linux-based Service VM and a SATA disk >>> for the RTVM.Accoring to >>> https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm, >>> when I write preempt img to sata, there is always have >>> gpt errors. I have chaged another sata disk, but it's >>> the same error. >>> >>> |root@nuc-acrn /home/acrn # dd >>> if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync >>> status=progress iflag=fullblock seek=0 conv=notrunc| >>> >>> |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 >>> MB/s| >>> >>> |2186+1 records in| >>> >>> |2186+1 records out | >>> >>> |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, >>> 72.6 MB/s| >>> >>> |[  171.967643] GPT:Primary header thinks Alt. header >>> is not at the end of the disk.| >>> >>> |[  171.967982] GPT:17909678 != 234441647| >>> >>> |[  171.968146] GPT:Alternate GPT header not at the end >>> of the disk.| >>> >>> |[  171.968406] GPT:17909678 != 234441647| >>> >>> |[  171.968616] GPT: Use GNU Parted to correct GPT errors.| >>> >>> |[  171.968864]  sda: sda1 sda2 sda3| >>> >>> then I run the launch_hard_rt_vm.sh, it cannot create >>> VM from Hypervisor. >>> >>> |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh| >>> >>> |cpu1 online=1 | >>> >>> |[ 1525.901370] smpboot: CPU 1 is now offline| >>> >>> |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2| >>> >>> |cpu2 online=1 | >>> >>> |[ 1525.916019] smpboot: CPU 2 is now offline| >>> >>> |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1| >>> >>> |cpu3 online=1 | >>> >>> |[ 1525.929538] smpboot: CPU 3 is now offline| >>> >>> |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3| >>> >>> |[ 1525.935378] ata1.00: disabled| >>> >>> |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache| >>> >>> |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) >>> failed: Result: hostbyte=DID_BAD_TARGET >>> driverbyte=DRIVER_OK| >>> >>> |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk| >>> >>> |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit >>> failed: Result: hostbyte=DID_BAD_TARGET >>> driverbyte=DRIVER_OK| >>> >>> |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub| >>> >>> |pm by vuart node-index = 1 | >>> >>> |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, >>> size 0x200000 | >>> >>> |vm_create: hard_rtvm | >>> >>> |[ 1525.981345] vhm_dev_open: opening device node| >>> >>> |VHM api version 1.0 | >>> >>> |[ 1525.982333] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1526.483047] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1526.983377] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1527.483702] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1527.984028] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1528.484363] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1528.984686] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1529.485021] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1529.985346] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1530.485672] vhm: failed to create VM from Hypervisor !| >>> >>> |failed to create VM hard_rtvm | >>> >>> |vm_create failed| >>> >>> |[ 1530.994415] vhm: freed vm| >>> >>> Thanks! >>> >>> ZS >>> >>> >>> >> > >

Join acrn-users@lists.projectacrn.org to automatically receive all group messages.