Ok, first the history and facts:

  1. Bought a Rpi3 eventually, for faster Mathematica interaction, and decided to see for myself if I could use it as an everyday desktop replacement as some claimed. The SD card speed wouldn't cut it so I decided to switch to a ADATA UV150 16GB flash drive. I transferred the system to the flash drive with "rsync -avx / /path-to-usb" as some guides suggested, modified files for boot (cmdline.txt on the SD Card and fstab on the flash drive), all set, I booted from SD Card and the then flash drive would take over.

  2. I worked like that for a couple of weeks, however it turned out that the USB drive was not that "fast" either. I concluded from the frequent couple-of-seconds freezes and the low cpu usage throughout those that a lot of small writes was taking place, that was putting strain to the flash drive. So I decided to switch again to an external HDD, 3.5". Again I transferred my working system, now on the flash drive, to the HDD with "rsync -avx / /path-to-HDD" and it worked like a charm!! I was impressed! No more freezes and everything much more responsive. It was the performance I was after!

  3. Since that first HDD was borrowed for the sake of testing I had yet to do another transfer to HDD of my own, on the same external case. I messed up the partitioning and dd image transfer from disk to disk, so I thought, what the hell, I can transfer the system the proven way, from the ADATA USB drive to the new HDD, as I had successfully done before, and it would only set me back a few days, concerning the system changes in the old HDD since then. I changed cmdline.txt on the SD Card again to direct to the USB flash drive, which I should note was untouched in the meantime. The system booted just fine (save for some warnings on boot time-no splash sreen for me) and I was on the desktop.
  4. I thought I should update the system before copying over with rsync to the new HDD and I got error messages that /usr/bin/sudo didn't have setuid, well, set. With a Mint Live DVD on my PC I changed the permissions of this executable on the flash drive to 4755, booted the Pi again, new message about visudo having the wrong permissions, again LiveDVD, boot the Pi, new message about /etc/sudoers being world writable, Live DVD, new nagging about /etc/sudoers.d being world writable. Changed permissions to all of them according to some Ubuntu guides (644 to be exact), wasted a lot of time, and now I'm left with the message that should only appear once when someone becames part of sudoers (you know, with great power comes great responsibility etc) that appears everytime I run a command with sudo, but at least sudo finally works.

So my question is, what on Earth happened? Why and how did permissions get messed up on a file system that remained unused, though still mounted as a device on the Pi, while I was using the HDD? The system still nags on boot about the systemd folder and world writability and executability, and maybe I will set those straight again, but who knows what else is screwed up and why did this happen?

  • Your question is unanswerable unless you specify the filesystems you used each time and what OS you did the copy on. You should always use rsync -avH at least to preserve hardlinks (-x is also usually good) – Milliways Feb 12 '17 at 11:22
  • It was stock Raspbian from the official image, written on the SD card initially and then passed on to flash drive and the HDD. I prefer ext4 and that was the filesystem in all cases – Κωστής Καρβουνιάρης Feb 12 '17 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.