WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Persistence boot codes not working  (Read 5711 times)

Offline jonathanbrickman0000

  • Jr. Member
  • **
  • Posts: 71
    • PC TSC:  Easily turn a PC into a terminal server client
Persistence boot codes not working
« on: October 24, 2010, 07:01:39 AM »
I am booting TC 3.2 from hard drive using the following:

Code: [Select]
kernel /boot/bzImage quiet max_loop=255 waitusb=10 tce=sda1 opt=sda1 home=sda1 local=sda1
After first boot, I install nano (using tce-load -wi nano).  It goes in and runs fine.  After next reboot, I try to run nano, and it says:

Code: [Select]
nano: error while loading shared libraries: libcurses.so.5: cannot open shared object file: No such file or directory
What is wrong?  I have put all of the 'persistence' boot codes in, but that library file still gets left out.  Obviously similar things happen with other packages  :).

J.E.B.
« Last Edit: October 24, 2010, 07:09:42 AM by jonathanbrickman0000 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Persistence boot codes not working
« Reply #1 on: October 24, 2010, 07:18:17 AM »
PPI is not that well supported (local=xxx). Remove that code and try again.
The only barriers that can stop you are the ones you create yourself.

Offline tikbalang

  • Newbie
  • *
  • Posts: 9
Re: Persistence boot codes not working
« Reply #2 on: October 24, 2010, 07:30:25 AM »
i put tinycore files in /tce and i automatically get persistence. i use standard tinycore and install a few apps with ondemand. i don't backup when shutting down. here is my grub4dos entry:

Code: [Select]
title TinyCore
find --set-root --ignore-floppies /tce/boot/bzimage
kernel /tce/boot/bzimage quiet vga=792
initrd /tce/boot/tinycore.gz


Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Persistence boot codes not working
« Reply #3 on: October 24, 2010, 09:06:35 AM »
The /tce directory, mount style extensions, are the preferred and default method for using Tiny Core.
However, that is not to say that using the advanced codes does not work...

Jonathan, likely  two things that need to be done.

First when attempting to use local boot code then you should specify copy to file system, by using:

AppsAudit->Install Options->Toggle Default Copy Install
or, if you prefer from the command line touch /path/to/tcedir/copy2fs.flg.  

Second when using AppBrowser, select the Download+Load option
or, from the command line, tce-load -wil extension

To your boot codes I would add:
waitusb=10 tce=sda1 opt=sda1 home=sda1 local=sda1 norestore

If you have edited/updated your /opt/.filetool.lst to include only those items outside of your persistence setup, e.g, particular files from the etc directory, then allowing a normal backup would make sense.

Following the above provides results as expected.
« Last Edit: October 24, 2010, 10:58:37 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Persistence boot codes not working
« Reply #4 on: October 24, 2010, 12:04:09 PM »
Yes, I should've elaborated more. Core support for PPI is good, but not all extensions take it into account.
The only barriers that can stop you are the ones you create yourself.

Offline jonathanbrickman0000

  • Jr. Member
  • **
  • Posts: 71
    • PC TSC:  Easily turn a PC into a terminal server client
Re: Persistence boot codes not working
« Reply #5 on: October 24, 2010, 01:30:30 PM »
The /tce directory, mount style extensions, are the preferred and default method for using Tiny Core.
However, that is not to say that using the advanced codes does not work...

Jonathan, likely  two things that need to be done.

First when attempting to use local boot code then you should specify copy to file system, by using:

AppsAudit->Install Options->Toggle Default Copy Install
or, if you prefer from the command line touch /path/to/tcedir/copy2fs.flg.  

Second when using AppBrowser, select the Download+Load option
or, from the command line, tce-load -wil extension

To your boot codes I would add:
waitusb=10 tce=sda1 opt=sda1 home=sda1 local=sda1 norestore

If you have edited/updated your /opt/.filetool.lst to include only those items outside of your persistence setup, e.g, particular files from the etc directory, then allowing a normal backup would make sense.

Following the above provides results as expected.

Appears to be working very well now.  Thanks!

Offline justauser

  • Newbie
  • *
  • Posts: 17
Re: Persistence boot codes not working
« Reply #6 on: November 24, 2010, 08:23:12 AM »
I have the latest installed on a USB drive.  It boots fine but I can't get any persistence to work.  I have set the boot options as described and also set the download option.  I do the download and load as described for chromium and it appears on the wbar.  But when I click NOTHING happens.

I think tinycore is very interesting but I've spent 4 hours trying to get various versions of persistence to work and NONE works for me.  I have used ondemand, local and the like.  I even tried the base with just tce and onboot.

I must be doing something wrong but have no clue what it might be.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Persistence boot codes not working
« Reply #7 on: November 24, 2010, 09:33:59 AM »
justauser

It is not clear what you have done.

Try opening Apps Audit -> On Boot -> Maintenance. Click on the names of extensions (on the left) you want to be loaded when you start the computer. Then reboot the computer.

You could also use On Demand.

If that does not work, provide more details.
Many people see what is. Some people see what can be, and make a difference.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Persistence boot codes not working
« Reply #8 on: November 24, 2010, 11:27:29 AM »
You need the waitusb=10 boot option.
Set your tce directory in AppBrowser before installing your applications.

Offline justauser

  • Newbie
  • *
  • Posts: 17
Re: Persistence boot codes not working
« Reply #9 on: November 24, 2010, 11:30:13 AM »
Sorry if I wasn't clear.  On a flash drive where I have other Linux dists (various puppy linuxes) I placed the timycore files, updated syslinux and booted fine.  I added the tce=sda1 and had the stuff for the USB to wait (waitusb=30).  Booted but not persistent.  I ified ondemand when I installed the apps.  Tired the LABEL stuff, set local and the others as above.  Nothing worked.

I began to wonder if it was 3.3.  I placed a 3.2 on the usb and used the same config options I had for 3.3 for tce and voila, it saved stuff during reboots.  After several installs/boots with 3.2, i selected 3.3 and 3.3 now had the stuff I'd created udner 3.2

Seems to me to be a 3.3 issue of some kind.

Offline tweetyhack

  • Newbie
  • *
  • Posts: 42
Re: Persistence boot codes not working
« Reply #10 on: November 28, 2010, 12:49:01 PM »
@tikbalang I like your setup but it locks up on me. I'm doing multiboot using syslinux and have bzimage and tinycore.gz under /tce/boot. 

Wait, I remove norestore(which I added while reading this thread) and it is booting!  Thanks, now I only have 1 directory for each os.

Offline tweetyhack

  • Newbie
  • *
  • Posts: 42
Re: Persistence boot codes not working
« Reply #11 on: November 28, 2010, 12:53:58 PM »
@justauser, I had the same problem with 3.3 when I set tce=/sdb1.  I ended up setting tce=UUID=###### whatever your UUID is.  See http://tinycorelinux.com/faq.html#pendrives.  I also set the home=UUID=###### and opt=UUID=######, not really sure if that is needed or not.  Also add waitusb=5.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Persistence boot codes not working
« Reply #12 on: November 28, 2010, 01:57:36 PM »
... I also set the home=UUID=###### and opt=UUID=######, not really sure if that is needed or not. ...

Please be aware that using the boot codes for persistent 'home' and 'opt' might not be a good idea if the targeted storage device is a USB pendrive. Those pendrives are only allowing for a limited number of write cycles (e.g. in the order of 10k).

A default TC system will use a RAM based file system for '/home' and '/opt' and will typically save the relevant files at shutdown time back to an archive file (i.e. 'mydata.tgz'). This file would be located on the USB pendrive if one is using a boot code of 'tce=UUID=...' (plus 'waitusb=X' to allow for the hardware detection during the startup process). So that means that for an entire TC session there is typically only one write cycle back to the USB pendrive at shutdown time (and the user might also choose not to perform a backup via the relevant option in "TC Exit"). Compare that to a persistent 'home' were basically every change to any file under the users home directory would trigger a write cycle back to the USB pendrive. Just to illustrate this a bit further: any command issued in a shell will add to a history file (i.e. '~/.ash_history' for the default shell), or when using a browser many files will be added to the respective cache for each site visited. OK, chances are that some buffering occurs that reduces the amount of write cycles a bit, but it will still be a fairly high number compared to the default (i.e. non-persistent 'home') mode of operation.

As '/opt' does typically not receive as many write changes as '/home' the situation might not be as critical, but nevertheless the same argument applies. Furthermore when using persistent 'home' and 'opt' it would be important to adjust the set of backup files (via entries in '/opt/.filetool.lst' or '/opt/.xfiletool.lst') accordingly to prevent that the restoration from backup "clashes" with the files form the persistent directories.

So I'd suggest not to use boot codes if one does not understand the consequences well enough.

Offline magicpio

  • Newbie
  • *
  • Posts: 6
Re: Persistence boot codes not working
« Reply #13 on: December 17, 2010, 10:40:47 AM »
Hi all, sorry to dig that up again, but I´m running into a similar issue. My password is gone after reboot.

My setup:
HDA1 tinycore
HDA2 swap
HDA3 persistent stuff

Grub boot codes:
quiet tce=hda3 opt=hda3 home=hda3 local=hda3 norestore

Then I did the following:
1) AppsAudit->Install Options->Toggle Default Copy Install
2) AppBrowser, select the Download+Load option, then Go on openssh
3) AppsAudit -> On Boot -> Maintenance, added openssh
4) Started openssh manually to generate keys and test remote access --> worked OK
5) reboot

Now this does not automatically start openssh when rebooting.
I had to add a line to /opt/bootlocal.sh
That solved, I found my password, which I set as su with passwd prior to rebooting, gone.

Do I have to use the "secure" boot option?

Thanks for pointing me in the right dircetion.
Pio

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Persistence boot codes not working
« Reply #14 on: December 17, 2010, 10:47:22 AM »
To save passwords, add thefollowing to .filetool.lst
etc/passwd
etc/shadow
etc/group
etc/gshadow

If you wish to save openssh settings, add
usr/local/etc/ssh