OK I think I got it:

# sudo cp -f -p init.el /boot/init.el 
cp: failed to preserve ownership for '/boot/init.el': Operation not permitted

cp returned non-zero code because the FAT filesystem (/boot) does not support 
file ownership etc (required by the -p argument). However the file actually get 
successfully copied.

On Mon, Dec 21, 2020, at 18:24, Michael Albinus wrote:
> "Yikai Zhao" <[email protected]> writes:
> 
> > Hi,
> 
> Hi,
> 
> > Thanks for your reply. See attached for the debug output. I was
> > editing /sudo::/boot/loader/entries/arch-lts.conf
> 
> Well, the traces show the following error:
> 
> > 23:28:38.730420 tramp-send-command (6) # cp -f -p /tmp/tramp.rIl2FY.conf 
> > /boot/loader/entries/arch-lts.conf 2>/dev/null; echo tramp_exit_status $?
> > 23:28:38.731484 tramp-wait-for-regexp (6) #
> > tramp_exit_status 1
> > ///d0514a7856891f72297e3fca16f73535#$
> 
> There's a redirection in the command, so we don't see what
> happens. Could you pls perform the following command in a root shell,
> and tell what happens:
> 
> --8<---------------cut here---------------start------------->8---
> # cp -f -p ~/.emacs /boot/loader/entries/.emacs
> --8<---------------cut here---------------end--------------->8---
> 
> Thanks, and best regards, Michael.
>

Reply via email to