WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Non-interactively calling tc-install.sh  (Read 3422 times)

Offline ferrieux

  • Newbie
  • *
  • Posts: 3
Non-interactively calling tc-install.sh
« on: January 07, 2012, 07:08:08 PM »
Hello,

First, kudos for TinyCore, and double kudos for ezremaster !!!
I started reading about all this 2 hours ago, and I now have my remastered variant on an pendrive with my custom app, all working... you guys are setting a record in skill-transfer efficiency :)

Now, I would like to go one step further: I'd like my bootable pendrive to non-interactively take over and install itself on the hard drive (possibly after verifying that the hdd is blank and asking for a confirmation otherwise ... I can do this part). This is for routine installation on dozens of mini-PCs of my app-on-TC.

I have looked at tc-install.sh, and I see that it is prepared for non-interactive execution through env vars ($INTERACTIVE et al). I assume that the GUI version, tc-install, calls it this way.  But the exact command-line to call is not easy to write, because there are more than 10 arguments, and their individual syntax is not obvious.

Q1: is the non-interactive tc-install.sh command line documented somewhere ?
Q2: is there a way to somehow "save" the choices from the GUI of tc-install (like ezremaster does in its .cfg) ?

Thanks in advance,

-Alex


Offline ferrieux

  • Newbie
  • *
  • Posts: 3
Re: Non-interactively calling tc-install.sh
« Reply #1 on: January 07, 2012, 07:51:15 PM »
OK, with a dummy tc-install.sh written to log its arguments and starting tc-install, I managed to get the exact command-line.
(strace -f -e trace=execve does it too, but the dummy script has the extra advantage of no side effects: dry run)
Not sure it's the best way, but it works :}
Please tell me whether there was a better one.

-Alex

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11516
Re: Non-interactively calling tc-install.sh
« Reply #2 on: January 07, 2012, 08:00:58 PM »
Hi ferrieux
Having  tc-install.sh  log the variables you are interested in is exactly what I was going to suggest.

Offline StefanSch

  • Newbie
  • *
  • Posts: 13
Re: Non-interactively calling tc-install.sh
« Reply #3 on: March 11, 2012, 12:02:02 AM »
Would you be willing to share your findings?

Would be a nice move.

TIA
Stefan

Offline ferrieux

  • Newbie
  • *
  • Posts: 3
Re: Non-interactively calling tc-install.sh
« Reply #4 on: March 11, 2012, 07:12:08 PM »
Sure: with the logging trick I saw that, for my settings, the GUI was spawning the following:

tc-install.sh /mnt/sdb1/boot/core.gz frugal sda 1 ext4 yes no X none /etc/sysconfig/tcedir/ waitusb=5 kmap=azerty/fr-latin1 text noswap noautologin home=sda1 opt=sda1

So I inserted this line in the (bootsync-triggered) script of mine that is taking over after booting on my ezremaster-generated stick. Works like a charm !

-Alex