Code Monkey home page Code Monkey logo

raspberrybackup's Issues

cp: failed to preserve ownership for './tgt_boot/vmlinuz': Operation not permitted

===================== part 4, backup /boot =========================
cp: failed to preserve ownership for './tgt_boot/README': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/System Volume Information/WPSettings.dat': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/System Volume Information/IndexerVolumeGuid': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/System Volume Information': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-2-b.dtb': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-2-b.dtb.bak': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-3-b-plus.dtb': Operation not permitted
cp: failed to preserve ownership for './tgt_boot/bcm2710-rpi-3-b-plus.dtb.bak': Operation not permitted

建议改一下这边的脚本内容

device=/dev/mapper/sudo kpartx -va $loopdevice | sed -E 's/.(loop[0-9])p./\1/g' | head -1 这一句话可能导致如果你的loop超过10以后将很报错 你的正则表达式只操作了loop0-loop9 超过将会报错,所以最好改为s/.(loop[0-9]+)p./\1/g 最后是这样 `device=/dev/mapper/`sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9]+)p.*/\1/g' | head -1

建议改一下脚本这里的内容

device=/dev/mapper/sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9])p.*/\1/g' | head -1
这一句话可能导致如果你的loop超过10以后将很报错
你的正则表达式只操作了loop0-loop9 超过将会报错,所以最好改为s/.(loop[0-9]+)p./\1/g
最后是这样
device=/dev/mapper/sudo kpartx -va $loopdevice | sed -E 's/.*(loop[0-9]+)p.*/\1/g' | head -1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.