WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: PiCore Newbie needs help for embedded device  (Read 2619 times)

Offline Doc4

  • WikiUser
  • *
  • Posts: 2
PiCore Newbie needs help for embedded device
« on: June 16, 2014, 12:36:59 PM »
Hi there,

I'm new to TinyCore/PiCore and I need some hints. (I'm not new to Linux, actually I'm experienced with Ubuntu on desktops and servers.)

I want to create an embedded device that listens to GPIOs - that is the user pushing some buttons. The yet-to-write Python program then is to talk to another device via TCP/IP. The final usage scenario will be without Internet connection. But I'm not there yet.

I downloaded piCore-5.3.1-SSH.zip and successfully installed the image to an SD card, resizing the FAT and EXT partition to have some more space for the future. PiCore boots up, I can successfully connect via SSH once I have created a special user account for doing so.

The final version of the device should be safe against simply being switched off without shutdown. However, when I reboot the system properly, all settings should be stored.

Now here's the questions:
- Cloud mode or mount mode, or backup mode, which one to use?
- How do I set up the mode in cmdline.txt?

- I edited /opt/.filetool.lst to store /etc and /home and created a folder "tce" in the FAT partition. But still, all my settings and users just vanish on reboot. (Installed programs such as Python seem to remain persistent, though) What is it that I am doing wrong?

Thanks for your support.

Doc4



Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7168
    • My Community Forum
Re: PiCore Newbie needs help for embedded device
« Reply #1 on: June 16, 2014, 01:16:32 PM »
Hi

- No need to resize FAT partition (/dev/mmcblk0p1)
- Do not use the FAT partition, FAT is not a journaling FS and not protected against corruption. It is only for booting!
- If you started with the SSH version, there is /tce on /mnt/mmcblk0p2 (ext4) already. Why did you create /tce on mmcblk0p1?
- To get data backed up you must backap data, execute 'filetool.sh -b' to get data saved
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Doc4

  • WikiUser
  • *
  • Posts: 2
Re: PiCore Newbie needs help for embedded device
« Reply #2 on: June 16, 2014, 11:55:10 PM »
Thanks so much, bmarkus, filetool.sh does the job for me!

The "Into the Core" book says backup is done on shutdown - apparently not true for PiCore?

One issue left: How can I get PiCore to keep its SSH key? It generates a new one on each startup.

Best
Doc4

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7168
    • My Community Forum
Re: PiCore Newbie needs help for embedded device
« Reply #3 on: June 17, 2014, 12:14:57 AM »
piCore behaves the same way is Core. By default executing 'shutdown' in the terminal doesn't make backup.

To keep SSH keys the two config files and the six keys in /usr/local/etc/ssh must be in the backup.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10675
Re: PiCore Newbie needs help for embedded device
« Reply #4 on: June 17, 2014, 01:36:40 AM »
The "Into the Core" book says backup is done on shutdown - apparently not true for PiCore?

The book assumes the GUI - when you click on the "exit" icon, you get asked whether to backup. A direct shutdown command is not intercepted on purpose, so that you can choose to do a direct one without backup.
The only barriers that can stop you are the ones you create yourself.