Developing FirstRUN for Puppy CD's initial boot

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#16 Post by tasmod »

Ok mixed results. Using Luci_529

My own frugal install has a nice bootsplash that fades in and then continues by making the blue dots into red 'running dots' until X starts and the desktop appears.
See YouTube video for dots I mean,

splash

However the problem is at shutdown, the shutdown scripts are unaltered but the console messages are not echoed, but they do run. i.e. the save state at close.

I did make a LiveCd of 529 and had some success with it same as above. However the shutdown is a real problem with black screen, you don't see the option window to save to file !!

If anyone wants to try it out, I can see whether either the forum will cope or I can find a download site.

It consists of a 'new' initrd.gz , a pet of modified startup scripts and an addition of vga=785 to the end of kernel grub line in menu.lst.

I could do with at least a couple of testers.[/url]
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#17 Post by technosaurus »

my personal opinion, is that if you are going to have a wizard run when you get to X that may require restarting X, you may as well start up with Xvesa (on my box it takes less than 0.2 seconds to start Xvesa vs 5-10 seconds for Xorg with intel graphics) let the user select Xorg if they want.

here is a short example
Xvesa -screen 1024x768x16 & sleep .2 && jwm -display :0
(see the pupngo thread for more advanced usage)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#18 Post by Aitch »

I'll re-suggest an idea that may appeal now.....fastboot, or a variant of it

How about a button that simply says 'run' at the grub stage

.....which when hit fires up a saved setup, AS IF THE PC HAD BEEN PUT TO SLEEP

There would only need to be one question....

Have you changed hardware?

if yes, normal load modules boot

if no, run saved 'suspend to ram' settings/ make the suspend.sh script executable.....should fire up in less than 5 seconds

It's been around since 2003....

http://fchabaud.free.fr/English/Tricks/ ... spend.html

I'm sure this is possible, and seems to be the way chrome/android is going with fastboot - away from grub, using UEFI
[fastboot entered with kernel 2.6.29]

http://en.wikipedia.org/wiki/Unified_Ex ... _Interface

http://www.mjmwired.net/kernel/Document ... 6/boot.txt

http://www.mjmwired.net/kernel/Document ... 4/uefi.txt

Aitch :)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#19 Post by technosaurus »

The thing is most of those modules do not _need_ to be loaded for the desktop to start up. In fact, using devtmpfs, it is possible to start up the desktop from the initramfs after only mounting sys proc and dev. this can be done within 1 second depending on system BIOS(I have tested it - still a few bugs to work out) from there it is possible to do the rest of the startup as part of for instance the jwm startup command (a script that is in the jwmrc inside the <Startup></Startup> tag ... this is not currently used in Puppy)

Granted this is a pretty drastic departure from the norm and probably beyond what was intended, but it is a possibility.

The other thing that somewhat cripples puppy is the notion of having to have a union file system. This is simply not the case. It is entirely possible to mount the "save file" as / and then mount any number of squash files (or any other loop filesystem for that matter) as an overlay - either clobbering or non-clobbering (I wrote an implementation of this for jwm_tools that also works with puppy as-is) This is basically what tinycore does and what DSL did.

btw did you know a compress 2gb save file only takes up a few kb - quite simple have various sizes on an iso and to decompress one at startup, rather than having the whole 10 minute first shutdown process that sometimes loses firstrun data anyways.

... food for thought
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#20 Post by Aitch »

technosaurus wrote:.....this can be done within 1 second depending on system BIOS(I have tested it - still a few bugs to work out)
Granted this is a pretty drastic departure from the norm and probably beyond what was intended, but it is a possibility.
I'd be most interested, as I'm sure a few others would, if you ever sort out the bugs....

Aitch :)

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#21 Post by tasmod »

Been away a couple of days so missed these.

I wasn't really looking for a different solution or method of booting.

No, I was simply trying to polish up the existing Puppy startup.

It always seems to me that whenever I show anyone who is used to Windows the Puppy system, they shy at seeing a text startup.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#22 Post by recobayu »

the animation splash screen is good i think :)
can you give us the tutorial how to do that?

i'm sorry, but in my oppinion, text mode is better.
when i show my lupu528 to my friend, he is very like it because it's like a proffessional hacker mode on. he has been looking to the walking text like:
searching puppy file . . . and then Done
loading luci528.sfs . . . Done
bla bla bla . . . . Done
it's like the matrix's effect.
and i'll say..
:D
so, the text mode when starting puppy is better than splash screen animation, i think..
i'm sorry, it's just my oppinion.

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#23 Post by tasmod »

Hi recobayu,

No problem, everyone has their own opinion.

I too like the text startup BUT the average Windows user has never seen one, so it unsettles them when the text pauses.


As to making the animation, well it's the 'Pebble' server by pizzasgood with a series of single frame pictures played at 20 frames per second. It uses the framebuffer at startup with a grub menu.lst change to graphic mode.
For Puppy regular users there is a getout 'nosplash' which disables frames and displays text at startup.

It requires quite a bit of hacking to the initrd.gz and the Puppy startup scripts.

'Pebble' is in the Additional Software/Unsorted section of forum.

Please be aware that I do not have it running how I like. On my machine because of the grub parameter it will startup OK but at shutdown the text is masked, which leaves you blind as to what is happening.

I made an iso Live CD with 5.2.9 on it which starts and runs. It does pause for the usual start messages between animation but I've yet to get it to shutdown properly and during shutdown display the 'savefile' messages. It is doing it, but in the masked background processing.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#24 Post by technosaurus »

I posted my improved wait function that can indicate while process(es) run.
Mainly it is to improve boot speed by elimination of long sleeps or wait command

http://bashismal.blogspot.com/2011/10/s ... -wait.html
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#25 Post by tasmod »

techno*

You mentioned fbsplash in the Pebble thread. Have you any experience trying to run it ?

I've been trying for a few days but no joy.

I modded the init and added

Code: Select all

/bin/busybox fbsplash -s /boot/splash.ppm -c -i /boot/fb.config -f /proc/fbsplash
but I suspect the paths are wrong.

It appears to be doing something behind the black screen I get when I use vga=785 without a splash pic to load. I got the same result when I made the wrong path using Pebble.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#26 Post by technosaurus »

Sounds like you need a modprobe fbcon in the init script ...puppy's has some quirky requirement for kms or something like that for it to get loaded and I am unsure at what part it occurrs
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#27 Post by tasmod »

Yep modeprobe already in there earlier on, I only posted the fbsplash activate line.

I'm sure it's related to what is loaded paths. I placed it in same position as working Pebble script. i.e just before "Loading Drivers needed to access disk drives" this way the proc etc have loaded.
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#28 Post by Karl Godt »

fbcon should be loaded after the framebuffer kernel modules are loaded .

It is [still] not set AFTER User Selected Modules but after Loading Kernel Modules .

fbcon.ko has to be loaded after framebuffer drivers at least for nvidiafb.ko &| nouveau.ko ; loading fbcon first did not work for me .

The Standard Puppy Kernel is configured without framebuffer drivers [both in kernel and as modules ] .
[ I wondered first why these framebuffer drivers are mentioned in the SKIPLIST of /etc/rc.d/MODULESCONFIG ???]

For busybox you have to watch out , that busybox might use /dev/fb/0 [ similar to its losetup applet using /dev/loop/[0-9] ] INSTEAD of /dev/fb0 .

tasmod , what does your fb.conf file looks like ?

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#29 Post by tasmod »

Hi Karl,

the config is just defaults. Should it have more?

Code: Select all

BAR_LEFT=312
BAR_TOP=550
BAR_WIDTH=400
BAR_HEIGHT=11
BAR_R=64
BAR_G=64
BAR_B=64
I've messed around so much i confused myself, so I've started again.

This is now what's in init in initrd.gz

Code: Select all

###################################################TASMOD FBSPLASH###

  modprobe  fbcon																			            

  mkfifo /tmp/fbsplash.fifo																			 

  /bin/busybox fbsplash -s /boot/puppy.jpg -c -d /dev/fb/0 -i /boot/fb.config  -f /tmp/fbsplash.fifo    
  
  
####################################################TASMOD FBSPLASH###
This code is placed in same spot as the pebble code that worked.

There is also fifo pipes in /boot

EDIT:

Ah, the bulb came on in the brain. Of course, Pebble has a separate pet that adds the framebuffer files !
Rob
-
The moment after you press "Post" is the moment you actually see the typso 8)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#30 Post by Karl Godt »

Please make sure /dev/fb/0 exists in the initrd.gz

ls -alF fb*
crwxr--r-- 1 root root 29, 0 2011-06-22 15:59 fb0

I would mkdir the folder fb/ there and copy the already present [initrd-tree] ./dev/fb0 named as '0' into ./dev/fb/ additionally .

I have only experimented with the busybox fbset once on full installation and created
# ls -alF /dev/fb*
crw-rw---- 1 root root 29, 0 2001-02-27 17:58 /dev/fb0
crw-rw---- 1 root 5 29, 1 2002-04-16 03:49 /dev/fb1
crw-rw---- 1 root 5 29, 2 2002-04-16 03:49 /dev/fb2
crw-rw---- 1 root 5 29, 3 2002-04-16 03:49 /dev/fb3

/dev/fb:
total 28
drwxr-xr-x 2 root root 4096 2011-07-03 20:52 ./
drwxrwxr-x 15 root root 20480 2011-11-03 11:40 ../
lrwxrwxrwx 1 root root 6 2011-07-03 20:48 0 -> ../fb0
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 1 -> ../fb1
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 2 -> ../fb2
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 3 -> ../fb3
lrwxrwxrwx 1 root root 6 2011-07-03 20:52 4 -> ../fb4
# file /dev/fb/4
/dev/fb/4: broken symbolic link to `../fb4'

for that purpose . Still Much Luck !

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#31 Post by technosaurus »

here is a screeny of my ~2s booting kernel - It has almost everything but the essentials to get to X with jwm and rxvt so for most people it will be just a toy ... ironically that is why I made it - so my kids can't accidentally bork something up (can't mount drives or access any networks - just play games)

If anyone is interested I can post my .config and a tarball of the initramfs

The bzImage (from 2.6.32.50 source) is only 1437k including the builtin Xvesa, jwm and rxvt ... so it should even fit on a floppy. (really I could get it down to ~1mb with a busybox recompile with only needed applets -- and could cut resource usage to as low as ~4mb)
Attachments
microsaurus.png
(51.11 KiB) Downloaded 2087 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#32 Post by Bert »

That's very impressive technosaurus!

Shouldn't the "everything" on the first line of your post be "nothing"? Or do I need extra English lessons :wink:
... ironically that is why I made it - so my kids can't accidentally bork something up (can't mount drives or access any networks - just play games)
Would love to have something similar for my girlfriend's box, with just eth0 and a browser.... would liberate her from her technofear (and liberate me, the repair man) :lol:
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#33 Post by Karl Godt »

If anyone is interested I can post my .config and a tarball of the initramfs

The bzImage (from 2.6.32.50 source) is only 1437k including the builtin Xvesa, jwm and rxvt
YES , go ahead !

AFAIK it is possible to adjust the paths in the kernel config like path to uevent(helper) or /sbin/init .

I had been not aware of the possibility to compile Xvesa and others into the kernel, too .

I know there is the embedded feature in make menuconfig .

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#34 Post by technosaurus »

Ok here it is, Puppy in <1mb in a single bzImage

Resource usage in X with jwm running and an rxvt terminal open:
MEMUSAGEKB=5020 (with background) 2892kb without background image

Resource usage at the console:
MEMUSAGEKB=2288

I wanted to see how far I could go so I ended up disabling even proc and sys, (which breaks top and ps) so I needed a way to get memory usage. I also replaced busybox with dash and mount from embutils (sh is used by rxvt which also needs /dev/pts so needed to mount a devpts) and just for grins i wrote my own init in C . I could get the resource usage down under 2Mb if jwm were compiled with only X11 with maybe xpm support and used st instead of rxvt

here is the code I wrote for memused

Code: Select all

#include <sys/sysinfo.h>

int main(int argc, char **argv){
	struct sysinfo info;
	sysinfo(&info);
	printf("MEMUSEDKB=%d\n",(info.totalram - info.freeram)*info.mem_unit/1024);
}
here is my init code

Code: Select all

#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>

//these could be functions but gcc complains less this way 
#define EGGSACKWEIGHT(a) ({int s,p;if((p=fork())==0){execvp(a[0],a);}else{while(wait(&s)!= p);}})
#define SHIFTN(i,a) ({ int j=0;while(a[j] != NULL){a[j]=a[j+i];j++;}})
#define EGGSACK(a)	({if((fork())==0) execvp(a[0],a);})
int main(int argc, char** argv) {
//export PATH="/bin" HOME="/root" TERM="xterm /bin/sh" SHELL="/bin/sh" PS1="# " USER=root LOGNAME=$USER HISTSIZE=1000 HISTFILE="$HOME/.history" INPUTRC=/etc/inputrc
//setenv("PATH","/bin",1);
putenv("PATH=/bin");
putenv("HOME=/root");
putenv("TERM=xterm");
putenv("SHELL=/bin/sh");
putenv("PS1=#");
putenv("USER=root");
putenv("LOGNAME=root");
putenv("HISTSIZE=1000");
putenv("HISTFILE=/root/.history");
putenv("INPUTRC=/etc/inputrc");

char* X[99];
//mount devpts /dev/pts -t devpts
	X[0]="mount";
	X[1]="devpts";
	X[2]="/dev/pts";
	X[3]="-t";
	X[4]="devpts";
	X[5]=NULL;
	EGGSACK(X);

//Xvesa -screen 640x480x16 -nolisten tcp -tst -I &
	X[0]="Xvesa";
	X[1]="-screen";
	X[2]="640x480x16";
	X[3]="-nolisten";
	X[4]="tcp";
	X[5]="-tst";	
	X[6]=NULL;
	EGGSACK(X);

//script? ... try getenv("XINITRC") and getenv("HOME") + /.xinitrc

putenv("SHELL=/bin/sh");
putenv("DISPLAY=:0");

X[0]="jwm";
X[1]="-display";
X[2]=":0";
X[3]=NULL;
EGGSACKWEIGHT(X);

X[0]="killall";
if (argc>1) {
	X[1]="Xvesa"; //see above... maybe change to X
}else{
	X[1]="Xorg";
}

X[2]=NULL;
EGGSACK(X);

X[0]="sh";
X[1]=NULL;
EGGSACKWEIGHT(X);
}
I also commented this line in the kernel source (init/do_mounts.c) - the wait isn't needed here

Code: Select all

	//wait_for_device_probe();
Attachments
microsaurus.jpg
(12.26 KiB) Downloaded 1937 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#35 Post by PANZERKOPF »

technosaurus wrote:Ok here it is, Puppy in <1mb in a single bzImage
Have tested it. Whole boot process takes 0.5 Sec (or thereabout).
Seems kernel is filled with gunpowder.... :)
SUUM CUIQUE.

Post Reply