WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to boot tiny core in to text mode ?  (Read 5878 times)

Offline awatar100

  • Newbie
  • *
  • Posts: 13
How to boot tiny core in to text mode ?
« on: October 04, 2010, 03:29:15 AM »
Hello i have tinycore linux on my flash drive /dev/hda1.
How to start installed system in text mode with multivt ?
I have grub, where i have to add "text" and "multivt" option ?
my menu.lst is like this :

default 0
timeout 10
title tinycore
kernel /boot/bzImage quiet
initrd /boot/tinycore.gz

my target machine have only 56MiB of ram :-)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: How to boot tiny core in to text mode ?
« Reply #1 on: October 04, 2010, 05:04:14 AM »
Put it on the 'kernel' line.

BTW, 'quiet' is also a boot code, so any additional ones just need to be added to it.

Offline awatar100

  • Newbie
  • *
  • Posts: 13
Re: How to boot tiny core in to text mode ?
« Reply #2 on: October 04, 2010, 09:07:09 AM »
Nice - it works.
One more thing... how to auto login user "tc" in second console ?

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: How to boot tiny core in to text mode ?
« Reply #3 on: October 05, 2010, 12:31:42 AM »
If you really want to save on RAM usage and have no need for an X server at all, why don't you use MicroCore? This would save you a couple of MBytes. I've done a quick comparison between TC 3.1 and MC 3.1 (using 'qemu -m 56 ....') and the former had 22384 kBytes used, whilst the value for the latter was 14484.

You could either download an ISO image from here or just the initrd from here Since the kernels are anyway identical, the initrd is the only difference in the ISO (apart from the respective filename in the boot loader config).

Regarding the autologin in a second VT, I'm afraid you might be out of luck there. For '/dev/tty1' this is achieved via the '--autologin' option of '/sbin/rungetty' (which is controlled via '/etc/inittab' or 'etc/inittab-save' in case of the 'multivt' boot code). According to a man page I've read, only one autologin (and limited to '/dev/tty1') is supported. Mind you, no one can stop you to compile a patched version of it yourself, and integrate it into the initrd (AKA remastering).

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to boot tiny core in to text mode ?
« Reply #4 on: October 05, 2010, 07:35:43 AM »
To save as much RAM as possible it might be preferable to allocate tty's dynamically as needed, in order to avoid spending memory for running *getty.

Here is the command I came to by experimenting, not sure how good practice it is, might possibly be improved:

Code: [Select]
sudo openvt -c N su - tcwhere N would be the number of the next free tty

Of course also need of additional logins are omitted in this way, as new tty's are allocated by a user logged in already.

I found a specific issue with this though. When running links in graphic (framebuffer) mode as non-root user it would not pick up the gpm mouse pointer (gpm has to be run as root), so I'd either have to run links as root, or preferably reserve tty1 for the use of links.
« Last Edit: October 05, 2010, 07:41:29 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to boot tiny core in to text mode ?
« Reply #5 on: October 05, 2010, 10:47:51 AM »
@tinypoodle

You can get a normal getty result while also saving ram. Change "respawn" to "askfirst" - now init will wait for an enter press before launching even getty.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How to boot tiny core in to text mode ?
« Reply #6 on: October 05, 2010, 10:50:03 AM »
curaga,
thanks, learned something   ;D

For the record: in distros having 6 VT's or more, i often used to run an app very low in memory consumption to omit spending RAM on *getty.   :P
« Last Edit: October 05, 2010, 10:54:03 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)