WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: A few core questions  (Read 8607 times)

Offline johnsmith

  • Newbie
  • *
  • Posts: 11
A few core questions
« on: December 03, 2013, 11:13:43 AM »
Hi,

I am relatively now to the whole linux thing. And it is a lot to take in.

Anyway I want to have a core bootable iso which has a few non-standard programs (gcc, nano and bless. I can't seem to find bless though in tce-load). I have no idea how to do this as if I make a cd and install the programs the next reboot they are gone.

I also want to disable the boot prompt and boot into root and then start a program. so Basically I start the pc and the application does its thing.

I such a thing even possible?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: A few core questions
« Reply #1 on: December 03, 2013, 11:44:15 AM »
You can edit the .ISO with IsoMaster in order to easily add extensions and also edit the onboot.lst to always have them loaded.
And read here:
http://wiki.tinycorelinux.net/wiki:integrating_extensions

Further you can edit the bootloaders config file and add the boot code "superuser".
http://wiki.tinycorelinux.net/wiki:boot_options

For auto starting programs you would have to edit  /opt/bootlocal.sh  or  /opt/bootsync.sh .
Both are located in the  core.gz  file which you have to edit.
http://wiki.tinycorelinux.net/wiki:remastering

I did not try yet to add a  mydata.tgz  into an ISO. If possible, that might make the process of configuring apps to autostart at boot slightly easier.
Download a copy and keep it handy: Core book ;)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: A few core questions
« Reply #2 on: December 03, 2013, 11:44:52 AM »
If you want to boot off CD with no persistent storage, you will need to remaster.  See the wiki.
/opt/bootlocal.sh is user to run non-interactive programs as root at boot time.
Other options are to modify /root/.profile.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: A few core questions
« Reply #3 on: December 03, 2013, 04:35:46 PM »
Anyway I want to have a core bootable iso which has a few non-standard programs (gcc, nano and bless. I can't seem to find bless though in tce-load).

Doing a web search for "bless", it seems to depend on gtk-sharp and mono, neither of which would be available in 5.x repo at current, so you might consider using 4.x.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: A few core questions
« Reply #4 on: December 03, 2013, 08:28:19 PM »
Searching some more it appears that bless is/was a project in "Development Status: 2 - Pre-Alpha" which has neither released any code nor fixed any reported bugs since more than 5 years...

Unless you mean something else than the hex editor, either way whenever referring to rather unknown apps it could not harm to provide a link ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline johnsmith

  • Newbie
  • *
  • Posts: 11
Re: A few core questions
« Reply #5 on: December 05, 2013, 03:45:05 AM »
well I don't know how to get the programs I want preinstalled... I tried to use http://wiki.tinycorelinux.net/wiki:integrating_extensions
and downloaded nano and compiletc and added a directory called tce/optional into my iso but I can't start the programs...

I did remaster and now can now start my program after booting. But the text output of my program gets obscured by the standard bootup message at the top. I there a way to disable or remove that text? Also adding 'tinycore superuser' to isolinux.cfg does nothing.

And yes I mean bless the hex editor. I don't really need that specific one, but I want one which can work with block devices (like sda) and is minimalistic.
« Last Edit: December 05, 2013, 08:23:23 AM by johnsmith »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: A few core questions
« Reply #6 on: December 05, 2013, 03:22:29 PM »
Use the search function, IIRC the subject of hex editors has been discussed before.

Anything depending on mono and gtk# could hardly qualify as "minimalistic" :o
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: A few core questions
« Reply #7 on: December 05, 2013, 03:54:16 PM »
At the end of the boot process, extensions are loaded and the backup is restored.
Then /opt/bootsync.sh is called.  It runs bootlocal.sh in background.
Then root lis auto logged in.  Root's .profile logs in the 'tc' user.
If you are running your program from bootlocal.sh, try bootsync.sh instead.

Offline johnsmith

  • Newbie
  • *
  • Posts: 11
Re: A few core questions
« Reply #8 on: December 05, 2013, 06:45:03 PM »
I tried both and also the profile.

also I can't log in as superuser even if I add tinycore superuser to isolinux.cfg
« Last Edit: December 06, 2013, 01:16:49 AM by johnsmith »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: A few core questions
« Reply #9 on: December 05, 2013, 09:01:06 PM »
You can do this manually or use ezremaster  which will I believe create exactly the tool you're looking for, repeatedly.   
I've used ezremaster frequently to create ISO's which boot, then run specific interactive applications from bootsync.sh. The whole process takes but a few minutes, maybe a couple more when an application needs updating or changing.

having said that, I haven't used it since tc-5.1 was released, but 5.0 worked great so no reason to think it's performance would be any different in 5.1  and is in the repo.

I have to thank Gerald_Clark for pointing me towards bootsync a while back, which solved my root interactive issues.   Only caveat is that any application which runs from bootsync runs asynchronously, therefore must terminate.  right Gerald??


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: A few core questions
« Reply #10 on: December 05, 2013, 09:15:49 PM »
Bootsync.sh run bootlocal.sh asynchronously.
Each program within bootlocal is then run synchronously in sequence unless an '&' character is appended to detach it and run it in the background.
Any program in bootlocal.sh that is not detached, and does not terminate will prevent further lines from running.
The same rules apply to bootsync.sh.

Offline johnsmith

  • Newbie
  • *
  • Posts: 11
Re: A few core questions
« Reply #11 on: December 05, 2013, 10:48:08 PM »
so I nearly have got it running. The only problem is WHEN my program gets executed.

as seen in the screen the program does run during boot, but the output is relevant. right now it stuff gets printed in-between the output and also the tinycore intro below it. Is it possible for me program to run AFTER the introduction so the output won't be obscured?
« Last Edit: December 06, 2013, 01:16:32 AM by johnsmith »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: A few core questions
« Reply #12 on: December 05, 2013, 10:58:42 PM »
Run it from /root/.profile.

Offline johnsmith

  • Newbie
  • *
  • Posts: 11
Re: A few core questions
« Reply #13 on: December 13, 2013, 03:09:10 AM »
thank you, it worked.

I only have 1 problem left. I can't seem to find my SAS drives with this OS. I have a SAS pci-express card and it just simply won't find the drives.

looking around on this forum I found this: http://forum.tinycorelinux.net/index.php?topic=12624.0

so I added these packages to my iso:

scsi-3.1.0-tinycore.tcz
raid-dm-3.1.0-tinycore.tcz
mdadm.tcz

I couldn't find sg3-utils so I didn't get it. I got the standard version of those packages btw not the 64 bit versions!

Is there something I am missing?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: A few core questions
« Reply #14 on: December 13, 2013, 03:27:22 AM »
You could download and load this: http://tinycorelinux.net/4.x/x86/tcz/sg3-utils.tcz

If it works, we can copy it over the the 5.x repo