Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: Kevin on March 13, 2014, 09:07:32 AM

Title: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 09:07:32 AM
Hello everyone,

I am relatively noob when it comes to linux and unix-based systems in general, but I successfully installed TinyCore onto a hard drive using the "CorePlus CD".
(to answer your question as to why do I want to use TC: I just need a distro with a really small footprint).

I went through documentation and forum threads, but it's all a little too overwhelming for me :(
Will someone be kind enough to help me understand and configure the following?

1) I have installed TC with no GUI (I have no need for it) but the text interface is tiny (no pun intended) - how do I change the size and make it permanent?
2) TC autologins as root at boot time; why and why is the root password not mentioned anywhere? I tried changing the password, and it works, but after reboot it's reset to whatever the default password is. How do I change it to something else and make it permanent?
3) I have installed OpenSSH following these instructions http://firewallengineer.wordpress.com/2012/04/01/how-to-install-and-configure-openssh-ssh-server-in-tiny-core-linux/

However, after reboot, the entire configuration will be gone. Is there any way to also make this permanent?
Title: Re: Basic questions about TinyCore Linux
Post by: bmarkus on March 13, 2014, 09:15:56 AM
Read http://tinycorelinux.net/corebook.pdf
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 09:26:10 AM
Read http://tinycorelinux.net/corebook.pdf

Wow an entire PDF.
Very nice, thanks.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 10:46:12 AM
OK I read through the PDF.
Seeing how I started a bit on the wrong foot, I decided to reinstall TC.

Before setting up anything else, I need it to work with my italian keyboard.
Using the installer, I specified the following bootcode:

kmap=it

Then I checked "Non-US Keyboard support" before proceeding with installation.

TC installed fine, but the keyboard layout is still US. Am I missing something?
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 13, 2014, 11:04:56 AM
Install the kmaps.tcz extension to be loaded onboot.
Try the boot code 'kmap=qwerty/it'
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 11:39:25 AM
Install the kmaps.tcz extension to be loaded onboot.
Try the boot code 'kmap=qwerty/it'

Worked perfectly, thanks!
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 11:51:35 AM
When booting up I get the following message:

Code: [Select]
Undefined video mode number: 318
Press <ENTER> to see video modes available, <SPACE> to continue, or wait 30 sec

How do I fix this?
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 13, 2014, 11:56:08 AM
Don't use an undefined mode in the vga= boot option.
See 10.12 in the book.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 12:14:06 PM
Don't use an undefined mode in the vga= boot option.
See 10.12 in the book.

My "vga=" option was not undefined, but my mistake was to specify it after the "superuser" code.
I removed vga= and all is fine now. Thanks again.

Now on to my next challenge..
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 13, 2014, 12:24:59 PM
The value you had for vga=xxx is undefined in your BIOS.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 12:56:47 PM
The value you had for vga=xxx is undefined in your BIOS.

Ah!
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 13, 2014, 08:48:58 PM
The value you had for vga=xxx is undefined in your BIOS.

Ah!

After some experimenting I set it to vga=885. It is not listed in the documentation but it seems to be the "highest res" mode supported by my BIOS.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 10:24:50 AM
OK in order to save users and passwords I have edited .filetool.lst adding etc/passwd, etc/shadow and etc/group.

The automatic backup does seem to work, though: when I reboot or shutdown the machine I do not see any message indicating that the data has been backed up and indeed if I check the mydata.tgz archive I can see that it does not get modified.
If I manually launch the backup command then my data gets backed up correctly.

What could be wrong? I checked the .profile file and made sure that there exists the line "export BACKUP=1" as stated in the book.
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 10:36:45 AM
Reboot does not do a backup.
How do you shutdown the machine?
Use exitcheck.sh
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 11:13:56 AM
I would do sudo reboot or sudo poweroff.
exitcheck.sh is not mentioned anywhere in the book, but I found it under /usr/bin/ after doing a search.

Should I do  /usr/bin/exitcheck.sh every time I need to shutdown or poweroff? Is this how TC works?

EDIT: I tried typing "exitcheck.sh reboot" but nothing was backed up.
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 12:51:30 PM
You probably have an error in your .filetool.lst.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 01:27:48 PM
The contents are as follows:

root@tcm:/opt# cat .filetool.lst
etc/passwd
etc/shadow
etc/group

I removed the default entries (opt and home) since they are persistent.
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 01:55:18 PM
Show the output of "showbootcodes".
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 02:22:49 PM
Please see attachment.
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 02:29:01 PM
I don't view attached pictures.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 03:27:07 PM
I'm unable to copy and paste the output.. I will try and type everything.

initrd=/tce/boot/core.gz quiet vga=885 home=sda1 opt=sda1 mydata=databackup showapps kmap=qwerty/it superuser noswap host=tcm waitusb=5:UUID="c2ab1e47-e980-4330-9ffd-d8272815ce75" tce=UUID="c2ab1e47-e980-4330-9ffd-d8272815ce75" BOOT_IMAGE=/tce/boot/vmlinuz
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 03:38:41 PM
You are looking at mydata.tgz, but you have defined the data backup file as databackup.tgz with mydata=databackup.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 03:58:04 PM
I renamed it. The automatic backup never worked.
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 04:01:04 PM
Run the backup command and see if it creates the backup file.
Are you sure your tce directory is writable?
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 04:17:01 PM
Yes as mentioned before when I manually run the command it works and then it correctly restores the data when booting up.
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 04:22:41 PM
What type of filesystem is your /opt on?
show the output of 'ls -l /opt'
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 04:26:27 PM
ext4.

root@tcm:/#ls -l /opt
total 4
-rwxrwxr-x 1 root staff 51 Jan 24 17:32 bootlocal.sh
-rwxrwxr-x 1 root staff 272 Jan 24 17:32 bootsync.sh
-rwxrwxr-x 1 root staff 613 Jan 24 17:32 shutdown.sh
-rw-rw-r-- 1 root staff 31 Jan 24 17:32 tcemirror.sh
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 04:54:08 PM
I think you will need to add backup to shutdown.sh if you want a backup on each shutdown.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 14, 2014, 06:22:16 PM
Shouldn't it work "out-of-the-box" as the manual says?
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 14, 2014, 07:11:33 PM
It does work if you use the GUI exittc.
Title: Re: Basic questions about TinyCore Linux
Post by: tinypoodle on March 14, 2014, 08:00:34 PM
The BACKUP variable is affecting the default setting of exittc, it does not overrule choice of ticking/unticking the box.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 15, 2014, 08:11:01 AM
So what you're saying, then, is that automatic backup only works with the GUI, correct?
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 15, 2014, 08:22:17 AM
Core is a toolkit.
You can write your own shutdown script or add a backup to /opt/shutdown.sh so exitcheck.sh will do a backup.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 15, 2014, 12:21:06 PM
OK everything is clear now, thanks.

I added "backup" to /opt/shutdown.sh
Then, I added the following lines to /etc/profile:

alias shutdown="/usr/bin/exitcheck.sh shutdown"
alias poweroff="/usr/bin/exitcheck.sh shutdown"
alias reboot="/usr/bin/exitcheck.sh reboot"

And then added etc/profile to /opt/.filetool.lst  8)
Title: Re: Basic questions about TinyCore Linux
Post by: gerald_clark on March 15, 2014, 12:50:51 PM
It would be better to add your aliases to a file in /etc/profile.d.
/etc/profile might change with an update and your backup copy would overwrite it.
This may produce hard to troubleshoot problems later.
Title: Re: Basic questions about TinyCore Linux
Post by: tinypoodle on March 15, 2014, 02:33:34 PM
So what you're saying, then, is that automatic backup only works with the GUI, correct?

No.
I'm saying what is automatic is a preselection of what a GUI checkbox is defaulting to.

An enforced backup at shutdown could interfere both with data safety and with user choice.

I'd suggest you consider using the minimal GUI for a while first to get familiar with the basic system administration tools included, rather than trying to imagine things.
Title: Re: Basic questions about TinyCore Linux
Post by: Kevin on March 15, 2014, 06:28:48 PM
So what you're saying, then, is that automatic backup only works with the GUI, correct?

No.
I'm saying what is automatic is a preselection of what a GUI checkbox is defaulting to.

An enforced backup at shutdown could interfere both with data safety and with user choice.

I'd suggest you consider using the minimal GUI for a while first to get familiar with the basic system administration tools included, rather than trying to imagine things.

Sorry I just don't have any real use for the GUI so I don't want to start using it now and risk becoming even more confused.
I want to learn this Linux distribution in text mode, and only afterwards, if I'll ever need it, learn the GUI.

It would be better to add your aliases to a file in /etc/profile.d.
/etc/profile might change with an update and your backup copy would overwrite it.
This may produce hard to troubleshoot problems later.

Thanks, I've actually considered this but decided to not change things as I'll be keeping this machine "as is" without ever updating (a sort of hardened system that won't really ever interact with the outside world).