Increasing number of virtual text consoles SOLVED

Using applications, configuring, problems
Post Reply
Message
Author
Bruce B

Increasing number of virtual text consoles SOLVED

#1 Post by Bruce B »

Puppy is configured for two virtual text mode consoles. I'd like to have four. I'd tried everything I can think of and haven't figured it out.

I'd appreciate it very much if someone could tell me how to.
Last edited by Bruce B on Fri 12 Aug 2005, 23:23, edited 1 time in total.

Guest

#2 Post by Guest »

Existing /etc/inittab

Code: Select all

::sysinit:/etc/rc.d/rc.sysinit
tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
::shutdown:/tmp/rc.reboot
::ctrlaltdel:/sbin/reboot

What you want

Code: Select all

::sysinit:/etc/rc.d/rc.sysinit
tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
::shutdown:/tmp/rc.reboot
::ctrlaltdel:/sbin/reboot
Now I'm can't remember if this file survives reboots...I think it does but not too usre

Guest

#3 Post by Guest »

mmmmm doesn't appear to survive reboots from a live cd......image.gz may need to be edited.

Have I got this right or have I messed up ??

Bruce B

#4 Post by Bruce B »

Thanks, bladehunter. I tried this combo and it doesn't work. What happens is it just hangs forever at a curser.

I can start tty2 with LEFT alt-F2 or chvt 2, but I can't start tty3 or tty4.

I mean I've tried everything I can think of. I think typically most distros are configured for six virtual consoles.

I've even copied initttab and other lines from Suse and Vector, and no go. In fact I've got the Vector inittab lines running right now and it doesn't make any difference.

Also, I've searched Google thinking someone wrote something up on it. They have but nothing I can get working.

I thought it would be easy.

Guest

#5 Post by Guest »

OK

inittab is taken form image.gz stored on the cdrom therefore to make any lasting changes image.gz needs to be edited and cdrom remastered


cd to where image.gz is stored

expand image.gz
#gunzip image.gz

create directory to mount image
#mkdir /mnt/image

mount image
#mount image /mnt/image -o loop

edit /mnt/image/etc/inittab so that you have the extra consoles ie as above I edited mine for 1 to 6 and GUI is on 7 (like mst big 'uns)

umount image
#umount /mnt/image

recompress
#gzip -9 image

remaster cdrom with new image.gz using these instructions

http://www.goosee.com/puppy/download/downpage.htm

Read the Old Instructions

I've added more consoles to things to do for my next release

Bruce B

#6 Post by Bruce B »

According to my testing it doesn't make any difference how I try and change inittab. I still have only two virtual text consoles available.

So I got to wondering if inittab even makes a difference, as an experiment I deleted it altogether. (it doesn't get restored on an option 1 install).

Puppy is working fine without it. It auto logs in to root on tty1, I can run tty2 just the same as I could when there was an inittab file.

Guest

#7 Post by Guest »

/etc/inittab DOES get restored on every reboot on an option 1 install...thats how I run it on my laptop as I don't have a cdrom



I'll say it again


/etc/inittab is copied from the initial ramdisk EVERY boot.....so it gets rewritten EVERY reboot.

Follow my instructions above and you'll get your extra consoles

After doing that I had
vt1 to vt6 as text consoles...but you lose vt1 when X starts

vt7 is the console that the Xserver uses.

I tried it, it works...

inittab does not survive reboots

Bruce B

#8 Post by Bruce B »

bladehunter, any modifcation I make to initittab survives reboots on my computer (option 1 install). that's just a technical fact.

I don't know how to prove it to you. I'm sure you know I'm not wanting a dispute with you or anyone, I hope a couple interested third partys joins in and does some verification for us regarding its behavior on their computers.

I am a careful worker and I can tell if a file gets replaced or not. You are a careful worker also. I want to know why the difference.

If it didn't survive reboots, I could work around that. The main point is: how do I create additional virtual text consoles? Here is the code you posted and it doesn't work for me either.

Code: Select all

::sysinit:/etc/rc.d/rc.sysinit
tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
::shutdown:/tmp/rc.reboot
::ctrlaltdel:/sbin/reboot 
How to you get ttty3 and tty4 started?

Guest

#9 Post by Guest »

OK what happens when you boot

Snippet from the init first run on boot (/sbin/init.ORIG)

Code: Select all

mkdir /new_root
mount tmpfs /new_root -t tmpfs -o size=${SIZEFILLK}k;check_status $?
cp -a /bin /new_root/
cp -a /dev /new_root/
cp -a /etc /new_root/
cp -a /lib /new_root/
cp -a /mnt /new_root/
cp -a /root /new_root/
cp -a /root0 /new_root/
cp -a /sbin /new_root/
cp -a /usr /new_root/
cp -a /proc0 /new_root/proc
cp -a /var0 /new_root/var
mkdir /new_root/tmp
chmod 777 /new_root/tmp
sync
This line is the tricky one

Code: Select all

cp -a /etc /new_root/
What happens is that all the /etc files from the initrd are copied to /newroot/etc.......then we do a pivot root which just gives us a new root to work from.....The boot process is then taken over from the new root..When init starts it looks at a pristine copy of /etc/inittab (ie from the initrd)....The inittab you see after booting is the one contained in the pup001 file which is the one you edited. Since pup001 is mounted AFTER init starts it's not reading your inittab.....That's why it has to be edited in image.gz so that the modified file is available BEFORE init starts.....Mind tho this is not the case with an option 2 hdd install as everything is stoed on the disk and initrd is not required....
If you want, and have a fast connection, I can modify image.gz for you, host it on my site for you to download. Just backup your orig file, put mine in the correct place and if it doesn't work I'll by you a case of VB.... :)

I think that inittab is only read once, that's why in you delete it from /etc it still works as you are only changing the copied in your pup001 file...the same thing happens with all the bootscripts except /etc/rc.local, the copies in /etc/pup001 will survive but the changes wont affect a reboot.

I hope this clears things up

Bruce B

#10 Post by Bruce B »

Thanks, bladehunter it makes sense from the perspective of the boot sequence.

/etc/inittab does not get modified on reboots and it doesn't look like the system does much of anything with it.

I'll modify inittab in image.gz and let you know if that works.

Guest

#11 Post by Guest »

Although busybox's implentation of init is a little different here is an explanation of the file.....It is required by init

http://www.netadmintools.com/html/inittab.man.html

From memory busyobx ignores runlevels

Bruce B

#12 Post by Bruce B »

bladehunter, it took less than five minutes and it works fine if inittab is modified in image.gz

THANKS!

As far as I'm concerend on an option 1 install /etc/inittab can be used for storing love letters, because it doesn't seem to do a thing. :)

This is too cool, Puppy with four virtual consoles. I like my curses programs and in X I have too many problems with keystrokes not doing like they should with curses apps, worse some don't support mouse, so your out of luck when it comes to program control.

Anyway, thanks again.

Guest

#13 Post by Guest »

:D

Maybe Barry should add a comment to that affect.....

Post Reply