Linux

同步:G恩納塔爾_______G和n和r一種噸這rgenerator設置權限失敗:不支持操作 (95)

  • October 29, 2021

我想在 ubuntu 18.04 上使用 qemu 和 kvm 在我的 Jetson nano(arm64)之上正確虛擬化 Android 10。這是我正在關注的教程:

https://github.com/antmicro/kvm-aosp-jetson-nano

一切順利,直到這個命令:

sudo rsync -avxHAX system-r{o,w}/

有些東西不好,因為當我將文件和權限從源路徑傳輸到目標路徑時出現很多錯誤(兩者都在同一個磁碟和同一個 ext4 分區上。您可以在此處查看帶有錯誤的完整日誌:

https://pastebin.ubuntu.com/p/W9GjPCt8G4/

這些錯誤的後果是,當我嘗試像這樣使用 qemu 模擬 android 時:

qemu-system-aarch64 \
-enable-kvm \
-smp 4 \
-m 2048 \
-cpu host \
-M virt \
-device virtio-gpu-pci \
-device usb-ehci \
-device usb-kbd \
-device virtio-tablet-pci \
-usb \
-serial stdio \
-display sdl,gl=on \
-kernel aosp/Image \
-initrd aosp/ramdisk.img \
-drive index=0,if=none,id=system,file=aosp/system.img \
-device virtio-blk-pci,drive=system \
-drive index=1,if=none,id=vendor,file=aosp/vendor.img \
-device virtio-blk-pci,drive=vendor \
-drive index=2,if=none,id=userdata,file=aosp/userdata.img \
-device virtio-blk-pci,drive=userdata \
-full-screen \
-append "console=ttyAMA0,38400 earlycon=pl011,0x09000000 drm.debug=0x0 rootwait rootdelay=5 androidboot.hardware=ranchu androidboot.selinux=permissive security=selinux selinux=1 androidboot.qemu.hw.mainkeys=0 androidboot.lcd.density=160"

這是我得到的錯誤:

[ 2.532754] init: init first stage started!
[ 2.535936] init: [libfs_mgr]ReadFstabFromDt(): failed to read fstab from dt
[ 2.540632] init: [libfs_mgr]ReadDefaultFstab(): failed to find device default fstab
[ 2.546246] init: Failed to fstab for first stage mount
[ 2.549616] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 2.555116] init: [libfs_mgr]ReadDefaultFstab(): failed to find device default fstab
[ 2.560762] init: First stage mount skipped (missing/incompatible/empty fstab in device tree)
[ 2.566906] init: Skipped setting INIT_AVB_VERSION (not in recovery mode)
[ 2.571227] init: execv("/system/bin/init") failed: No such file or directory
[ 2.593768] init: #00 pc 00000000000e90a0 /init
[ 2.599958] reboot: Restarting system with command 'bootloader'

我剛剛編輯了我的 /etc/fstab 文件,如下所示:

UUID=84d024e0-c8c7-42c0-ad3e-c3e0c1cacdb7 / ext4 acl,user_xattr,noatime,errors=remount-ro 0 1

也像這樣:

UUID=84d024e0-c8c7-42c0-ad3e-c3e0c1cacdb7 / ext4 defaults,acl,user_xattr,noatime,errors=remount-ro 0 1

但錯誤仍然存在:

sending incremental file list
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/bin": Operation not supported (95)
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/bugreports": Operation not supported (95)
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/charger": Operation not supported (95)
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/d": Operation not supported (95)
.....
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/system/usr/icu": Operation not supported (95)

sent 109,493 bytes received 1,223 bytes 221,432.00 bytes/sec
total size is 1,354,488,586 speedup is 12,233.90
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]

這也很有趣:

root@Z390-AORUS-PRO:/home/ziomario/Scrivania/antmicro/aosp_images# sudo mount -o remount,acl /

root@Z390-AORUS-PRO:/home/ziomario/Scrivania/antmicro/aosp_images# sudo rsync -avxHAX system-r{o,w}/

sending incremental file list
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/bin": Operation not supported (95)
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/bugreports": Operation not supported (95)
rsync: [generator] failed to set permissions on "/home/ziomario/Scrivania/antmicro/aosp_images/system-rw/charger": Operation not supported (95)

等等。

有人知道為什麼我會收到這些錯誤,我該如何解決?謝謝。

經過數小時的搜尋,我發現了以下問題:

由於 rsync 3.2.3 / glibc 錯誤,使用 rsyncd 恢復的文件的所有者、組和權限不正確。

Ubuntu 20.04 中的 rsync 3.1.3 執行良好,而 Ubuntu 20.10、21.04 中的 3.2.3 ……有這個問題:

rsync.log: 
rsync: [receiver] failed to set permissions on "/some_file": Operation not supported (95)

這是由於 Ubuntu 20.10、21.04、Fedora 33 beta 等中的 glibc 錯誤造成的。

如果您遇到此類錯誤,請至少從 rsync 3.2.3 升級到(撰寫本文時 2021 年 7 月 3 日的 atm)至少 3.2.4dev

另見:rsync github 問題 109

你可以在這裡下載最新版本的 rsync: rsync 原始碼

這裡是安裝說明: rsync install

此致

比特拉諾

引用自:https://serverfault.com/questions/1059618