WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: New user struggling with persistence  (Read 5045 times)

Offline protaganist

  • WikiUser
  • *
  • Posts: 7
New user struggling with persistence
« on: January 12, 2013, 06:46:49 AM »
 I have installed PiCore-20130106 and created a ext4 partition on the SD card and created a tce folder on there and all extensions now go there and survive a reboot. However i cannot seem to get any other system changes to survive a reboot, specifically at the moment i need my newly created user to survive a reboot so that i can log in over ssh. I could find no info on this Pi forum however the wiki here:  "wiki.tinycorelinux.net/wiki:persistence_for_dummies"  has info but it doesn't seem to be working for me. Should the file mydata.tgz automatically be created in the /tce/optional directory on my new partition? Also there is info on editing /opt/.filetool.lst but there is no persistence in that file either so any changes i make are lost on reboot.
 Am i doing things wrong or is the wiki i am using for i386 only and not suitable for the Pi? All i need is persistence for these system settings.
 Many thanks, Protaganist.

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: New user struggling with persistence
« Reply #1 on: January 12, 2013, 07:51:00 AM »
Hi, have been in your situation only a few weeks ago, and got a lot of help. So here is a question that I think I know the answer to, so if I can help, then I can pay back to the community.

I think you need to do a backup after you have done your changes. Then after a reboot, these changes will be restored to your working picore.

So try to write
filetool.sh -b

And the
Sudo reboot

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: New user struggling with persistence
« Reply #2 on: January 12, 2013, 08:00:37 AM »
If you followed the README and used tce-setdrive then the backup fiile is already set.
While filetool.sh -b is ok It is easier to remember just to type:

backup

If you installed X then click on control panel and backup/restore to access GUI to update filetool.lst and xfiletool.lst
Otherwise use an editor, .e.g., nano directly on the files
/opt/.filetool.lst and /opt/.xfiletool.lst

Note: do not use leading / for items in either list.
10+ Years Contributing to Linux Open Source Projects.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7179
    • My Community Forum
Re: New user struggling with persistence
« Reply #3 on: January 12, 2013, 08:04:17 AM »
Hi Protaganist,

piCore works on the same way as the x86 version regarding persistence, so articles must be valid.

mydata.gz is not created automatically, you must create it with the proper tool, depending on your are using command line or a GUI.

In GUI, either use Backup in the ControlPanel or you can choose backup mode shutting down the system with Exit. In a terminal just execute backup to create mydata.tcz

What goes to the backup is defined by /opt/.filetool.lst By default /home is already included, so your new user's home will be saved. You must add few other files to save password, SSH keys, etc. My /opt/.filetool.lst file:

Quote
opt
home
etc/sudoers
etc/passwd
etc/group
usr/local/etc/dropbear/dropbear_dss_host_key
usr/local/etc/dropbear/dropbear_rsa_host_key

I added new user to sudoers for easiar operation, but it is not a must.

To start dropbear server at boot, addded this line to /opt/bootlocal.sh:

Quote
/usr/local/etc/init.d/dropbear start

« Last Edit: January 12, 2013, 08:09:16 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

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

Offline protaganist

  • WikiUser
  • *
  • Posts: 7
Re: New user struggling with persistence
« Reply #4 on: January 12, 2013, 08:24:58 AM »
 Thank you all for your replies, the only bit of the puzzle i was missing was the backup part, i suspect the wiki i was using was for a GUI as it states "The default mode of saving your docs and settings is via the backup utility, which comes up when you do a shutdown.".  I suspect this backup utility starts when shutting down from X but not from a CLI?
 Anyway all is fine now, i have the persistence i need and can continue with the learning process, thanks again, Protaganist.

PS My next step is to learn how to make .tcz, (preferably on the Pi rather than cross-compile) i'll search the wiki and forum but if anyone has a good source on the info i need please post it here.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7179
    • My Community Forum
Re: New user struggling with persistence
« Reply #5 on: January 12, 2013, 08:34:05 AM »
Read WIKI article

http://wiki.tinycorelinux.net/wiki:creating_extensions

It is valid for piCore, the only exception is no need for --march and --mtune options. Just omit them and use GCC defaults.

piCore extensions in the repository all compiled native on Pi, nothing is cross compiled.  Don't forget to have a swap partion!
« Last Edit: January 12, 2013, 08:37:53 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

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

Offline thane

  • Hero Member
  • *****
  • Posts: 671
Re: New user struggling with persistence
« Reply #6 on: January 12, 2013, 11:55:30 AM »
"mydata.tgz...in the /tce/optional directory" [protagonist]

I'm running TCL on an x86, but FWIW in my setup the mydata.tgz file is under the /tce directory, not within /optional.

Offline protaganist

  • WikiUser
  • *
  • Posts: 7
Re: New user struggling with persistence
« Reply #7 on: January 13, 2013, 01:33:06 PM »
@thane, sorry that was a mistake, it is indeed in /tce

@bmarcus, thanks for the link, that really is way above my Linux skill level, i struggled to understand half of what it said and much Googling was done. However after a full day of frustration i have finally managed to build my first Tiny Core Extension. I now have the SSH utility Screen working as a tcz. It was a lot of hassle for one small program but i really wanted it so to me it was worth it.
 Cheers, Protaganist.