WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to change extensions to "copy2fs" via CLI?  (Read 9925 times)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: How to change extensions to "copy2fs" via CLI?
« Reply #30 on: November 25, 2018, 05:02:45 PM »
...also MLC flash drive controllers may or may not run various implementations of error correction, garbage collection and Wear-leveling operations whenever the flash device is powered.   No data connection is required for these maintenance operations.


Sent from my iPhone using Tapatalk

Offline drtebi

  • Newbie
  • *
  • Posts: 16
Re: How to change extensions to "copy2fs" via CLI?
« Reply #31 on: November 25, 2018, 07:58:05 PM »
Well, one reason why I don't think I will take it any further than the "copy2fs" mode (referred to here as RO Mode 1), is because I do sometimes want to run filetool.sh. For example, when I do put together a playlist, I like to login and just have to type a couple of commands to ensure this new playlist is saved to the SD, and then I reboot.

I am also not worried about a power failure during boot... I don't know, I just feel like that is one very unlucky situation that one would have to encounter.

So I think I will stick with what I have setup for now... and do a backup of the entire SD card once in a while. By the way, this can simply be done with "dd" on another machine, correct?

Offline san.gh

  • Newbie
  • *
  • Posts: 6
Re: How to change extensions to "copy2fs" via CLI?
« Reply #32 on: November 25, 2018, 09:35:44 PM »
Guys, you are missing an important element of the puzzle, file system and journaling.

Well, that's kind of a different thing.  Journalling makes OS corruption way way less likely, but not impossible, (and of course to use it the card has to be writable (shortening its life)).

Offline san.gh

  • Newbie
  • *
  • Posts: 6
Re: How to change extensions to "copy2fs" via CLI?
« Reply #33 on: November 25, 2018, 09:45:40 PM »
Well, one reason why I don't think I will take it any further than the "copy2fs" mode (referred to here as RO Mode 1), is because I do sometimes want to run filetool.sh. For example, when I do put together a playlist, I like to login and just have to type a couple of commands to ensure this new playlist is saved to the SD, and then I reboot.

I am also not worried about a power failure during boot... I don't know, I just feel like that is one very unlucky situation that one would have to encounter.

So I think I will stick with what I have setup for now... and do a backup of the entire SD card once in a while. By the way, this can simply be done with "dd" on another machine, correct?


Cool.  Sticking with RO Mode 1 is fine, and likely good enough mostly corruption-wise.  (Even though it shortens the life of the card.)

But, I want to say that even with RO Mode 3 you can log in (to a Raspberry Pi which has the MMC connected to the CPU bus (it has /dev/mm* instead of /dev/sd* devices)), run some commands and save files to the card.  In RO Mode 3 you have _more_ commands to run, though, and have to copy the sdtool onto the pi; so that may be too much work for too little gain.

The general process (from the original link) is something like:

Code: [Select]
#making changes after you locked it read-only
sudo ./arm-sdtool /dev/mmcblk0 unlock
mount /mnt/mmcblk0p2
sudo mount -o remount,rw /mnt/mmcblk0p2
#now make the change
filetool.sh -bv
sudo umount /mnt/mmcblk0p2
sudo ./arm-sdtool /dev/mmcblk0 lock


instead of just running filetool.


And yes, if you want to back up you can just take an image of the card with
Code: [Select]
dd from another computer.

Offline drtebi

  • Newbie
  • *
  • Posts: 16
Re: How to change extensions to "copy2fs" via CLI?
« Reply #34 on: November 25, 2018, 11:24:18 PM »
Thanks for the info.

One question, where it says
Code: [Select]
#Now make the changeDoes that imply that one cannot do it before those steps? In other words, I would have to run the commands before
Code: [Select]
filetool.sh -bvbefore I make changes like adding a new playlist?

Anyway, I suppose one could just put all that into a script, and life would be simpler.

A question about "dd":
Is it possible to write the image over the network? I am thinking I could do the backup through the terminal, logged in to the piCore, and copy the image (over rsync?) directly to my NAS.
Again... would make life easier. It's a bit of work to open up my case :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: How to change extensions to "copy2fs" via CLI?
« Reply #35 on: November 25, 2018, 11:44:16 PM »
Hi drtebi
... One question, where it says
Code: [Select]
#Now make the changeDoes that imply that one cannot do it before those steps? In other words, I would have to run the commands before
Code: [Select]
filetool.sh -bvbefore I make changes like adding a new playlist? ...
Yes.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: How to change extensions to "copy2fs" via CLI?
« Reply #36 on: November 26, 2018, 09:15:58 AM »
Quote
Does that imply that one cannot do it before those steps?
This confuses me. What is "it"?
You can make changes to the file system in RAM at any moment. Like saving a playlist at  /home/tc .
In order for those changes to be able to be backed up (filetool.sh) or to write anything to the SD card the SD card has to be mounted.
Download a copy and keep it handy: Core book ;)