WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How do I create a microcore dev box that I can easily SSH into?  (Read 8096 times)

Offline booker

  • Newbie
  • *
  • Posts: 4
How do I create a microcore dev box that I can easily SSH into?
« on: February 20, 2011, 02:20:39 AM »
So, after spending time in OS X's terminal, I decided to dust an old machine that I could experiment with Linux on. I came across Micro Core and decided to do the hard drive install. But I've run into a few problems:

* I'm not sure where to get all the development tools for standard C/C++ development.
* I want to setup openssh to run on system startup, but messing around with grub either makes Micro Core forget where openssh is or forget openssh's config file (it has something to do with the local=hda1 when booting).

Many thanks, I hope to get a lot of Linux experience with this setup.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #1 on: February 20, 2011, 02:37:42 AM »
Hi booker
You want to download the  compiletc  extension for development. There are also a couple
of debuggers, I've played with the  gdb-6.8_bin  package a couple of times, it's light weight
and pretty capable. I'm currently running Dropbear on a TC Samba file server I set up a year
or two ago for SSH. I haven't done a hard drive install yet so I can't help there but if it makes
you feel better it seems a lot of people get confused with LOCAL=, HOME=, etc. settings and
when to apply each of them.

Offline booker

  • Newbie
  • *
  • Posts: 4
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #2 on: February 20, 2011, 01:56:07 PM »
Thanks. I tried dropbear and its working great. Now I want to have persistence of my password (to be able to log-in with ssh) between boot but my /opt/.filetool.lst doesn't seem to be working properly. Here it is:

Code: [Select]
opt/bootlocal.sh
opt/bootsync.sh
opt/shutdown.sh
opt/tcemirror
opt/.filetool.lst
opt/.xfiletool.lst
home
etc/shadow

Maybe it has something to do with my grub menu.lst?
Code: [Select]
default 0
timeout 5

title Micro Core 3.5
root (hd0,0)
kernel /boot/bzImage quiet tce=hda1 home=hda1 opt=hda1
initrd /boot/microcore.gz

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #3 on: February 20, 2011, 01:59:32 PM »
with opt= and home= bootcodes, you should not backup anything in /opt or /home.

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #4 on: February 20, 2011, 02:05:37 PM »
How do mean that: "you should not backup anything in /home and /opt ?
Should the /home folder allways be empty?

I have a lot of stuff in /home/tc and I think that's the reason it takes so long at shut down?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #5 on: February 20, 2011, 02:14:28 PM »
Your .filetool.lst should contain no entries for opt or home.
Please read the wiki articles about using boot codes andbackup.

http://wiki.tinycorelinux.com/Backup
http://wiki.tinycorelinux.com/Backup+-+Restore
http://wiki.tinycorelinux.com/Persistent+Home

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #6 on: February 20, 2011, 02:20:56 PM »
Hi booker
I just checked my server's filetool.lst and here's what I think you should add:

etc/passwd
etc/group
etc/shadow
etc/gshadow
etc/dropbear

@beerstein: Ok, this time in english. Booker's opt and home directory are on his hard
drive, not in memory and therefore don't need to be backed up. The etc directory
gets created in ram during the boot process and any files you modify in there need
to be backed up or those settings will be lost.

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #7 on: February 20, 2011, 02:30:38 PM »
AHA - Thank you for this - So  he has in addition to the /tce folder two more folders
namde /home and /opt.
OK I did not know that this can be done.
Would that speed up the boot- and shut down process?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #8 on: February 20, 2011, 02:40:45 PM »
Hi beerstein
Absolutely. Anything you have to back up has to be read, compressed into a file, and
written to your backup device. When you boot, the process is reversed. By having
them on the hard drive instead of in RAM you pay a tiny penalty in access time but
can reduce boot and shut down times.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #9 on: February 20, 2011, 02:59:29 PM »
with opt= and home= bootcodes, you should not backup anything in /opt or /home.

Perhaps this should be more explicitely stated in a prominent place in Documentation - as it is brought up again and again (though users using anything else than defaults always have a responsibility of understanding what they do before they do it...).
"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: How do I create a microcore dev box that I can easily SSH into?
« Reply #10 on: February 20, 2011, 03:10:53 PM »
The boot codes sections of the FAQ would be a good place.

Offline booker

  • Newbie
  • *
  • Posts: 4
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #11 on: February 20, 2011, 04:23:53 PM »
So, I'm still a bit unsure of what exactly to do. I want it to save my password but right it's not! Also, dropbear reconfigures every time on startup.

My menu.lst is unchanged, but my .filetool.lst now only has the etc/ entries and they're are still not backing-up. Exactly how should I set this up?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #12 on: February 20, 2011, 04:56:00 PM »
Microcore does not automagically perform a backup.

From command line use filetool.sh.

If you have specified a backup device it will be noted at /opt/.backup_device in which case you can use:

$ filetool.sh -b

If no backup device has been previously specified then use:

$ filetool.sh -b sdb1          where sdb1 is an example use your particular device.
10+ Years Contributing to Linux Open Source Projects.

Offline booker

  • Newbie
  • *
  • Posts: 4
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #13 on: February 20, 2011, 05:50:42 PM »
Thanks! It's working perfectly now!

Summary of what I did for newbies:
1. I loaded microcore with home and opt on my hard drive (i.e., home=hda1 opt=hda1)
2. I modified /opt/.filetool.lst so that it only held directories relevant passwords and config (etc/shadow, etc/dropbear, etc/passwd, or see above)
3. I sudo filetool.sh -b to back-up all the stuff in those folders.
4. I added the line 'filetool.sh -r' (without quotes) to /opt/bootlocal.sh . (Not sure if this step is entirely necessary, but my system works so woohoo!).

Thanks again for all the help.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How do I create a microcore dev box that I can easily SSH into?
« Reply #14 on: February 20, 2011, 05:53:34 PM »
Step 4 is not necessary.  The backup is restored before bootlocal.sh runs.