PDA

View Full Version : [SUGGESTION] Graphical boot



Fabianx
05-22-2003, 10:44 PM
I know this was discussed several times without a solution, as Klaus refuses a kernel-patch.

But alas it is not neccessary for knoppix as knoppix-autoconfig is a user-space script WITH the ability to send processes to background.

So it is possible to show some splash-screen with:

# lets start the user-fb (5 minutes)
ppmtofb -w 300 /knoppix.ppm &

And at the end jsut do a:

killall ppmtofb

This can also be exited, by chainging to some console or q. So pressing Alt+Fx or Alt+Left|Right|... works for quitting, but as source is available one could change this also.

Of couse showing the knoppix picutre is not very interested, but with the utitilites from bootsplash.org (the progress-prog for example) it would be possible to do interesting things..

Or just use the Redmond-Theme from bootsplash with the nice animation ? ;-)

I think if someone did an really nice graphical boot that just depends on user-space-tools, Klaus would not object. (Of course someone has to guarantee that this is only used, if a fb is really present, but I think that is fairly easy to detect. :-) )

So, if one really want this. That is the way to go.

If one has stuff, post it here and if its also good I'll do if wished the negotations with Klaus to get it into the official version...

cu

Fabian

probono
05-23-2003, 08:24 PM
This sounds great! Why would anyone use a kernel patch if it also worked without one?

probono
05-24-2003, 09:11 PM
I played with it and got it to work (somewhat) on my HD install. However, when trying to make a CD, I encountered the following challenges:

* The userland apps have to be installed in the initrd, but the initrd is already as big as the bootfloppy image allows. I know that there is the possibility to format floppies "bigger", but how does this work with syslinux?

* The initial penguin cannot be hidden without recompiling the kernel, also because there is no /proc/splash, the bootsplash.org splash script cannot be used. BUT something new can be written on our own that is effective from the time init is booting and I see that this is possible since I have done it on my HD install!

* How can I display a picture/animation on shutdown? My processes always get killed...

Thanks for your help
probono

Fabianx
05-25-2003, 11:32 AM
>I played with it and got it to work (somewhat) on my HD install. However, when trying to >make a CD, I encountered the following challenges:

>* The userland apps have to be installed in the initrd, but the initrd is already as big as the >bootfloppy image allows. I know that there is the possibility to format floppies "bigger", >but how does this work with syslinux?

That is wrong, as with the start of knoppix-autoconfig all user-tools are already avaialbe from CD.

>* The initial penguin cannot be hidden without recompiling the kernel, also because there is >no /proc/splash, the bootsplash.org splash script cannot be used. BUT something new can >be written on our own that is effective from the time init is booting and I see that this is >possible since I have done it on my HD install!

yes.

>* How can I display a picture/animation on shutdown? My processes always get killed...

Hm, Sure, that is a problem worth to think about. I think it needs to be in rc0|6.d after alle processes were sent the term/kill signal ...

cu

Fabian

probono
05-25-2003, 03:55 PM
Hi Fabian,

> with the start of knoppix-autoconfig all user-tools are already avaialbe from CD.

That's even better than I hoped! :)

> The initial penguin cannot be hidden without recompiling the kernel

But the initial kernel messagges can be sent to console=/dev/tty2

> (How can I display a picture/animation on shutdown?) I think it needs to be in rc0|6.d after alle processes were sent the term/kill signal ...

That's a great idea, start it *after* the processes got the signal... I will try that out.

Do you see any way to use a picture for "It is now safe to turn off your computer"?

cu
probono

Fabianx
05-25-2003, 04:14 PM
Hi Fabian,

> with the start of knoppix-autoconfig all user-tools are already avaialbe from CD.

That's even better than I hoped! :)

> The initial penguin cannot be hidden without recompiling the kernel

But the initial kernel messagges can be sent to console=/dev/tty2

> (How can I display a picture/animation on shutdown?) I think it needs to be in rc0|6.d after alle processes were sent the term/kill signal ...

That's a great idea, start it *after* the processes got the signal... I will try that out.

Do you see any way to use a picture for "It is now safe to turn off your computer"?

cu
probono

1. The initial kernel-messages are already invisble with quiet-mode, which knoppix uses.

I would add the safe to turn off screen just after S40umountfs (as then it is REALLY safe to turn off and halt is just the next thing that is executed afterwards)

Perhaps as /etc/rc0.d/S50safetoturnoff :-))

and then have in /etc/init.d/safetoturnoff:

ppmtofb /safetoturnoff.ppm or similar.

cu

Fabian

probono
05-25-2003, 07:56 PM
For the start and shutdown, I like

convert -crop 117x117+0+1 /usr/share/icons/crystalsvg/128x128/apps/clock.png ppm:- | ppmtofb --stdin --center -w 777 &
For the "safe to turn off now"

convert /usr/share/icons/default.kde/32x32/actions/exit.png ppm:- | ppmtofb --stdin --center &
Note that in this solution, *zero* additional tools or graphics from the outside are used. (This should make KK happy.) It is all done with what is on the CD. To have a nice animation, I think we would need a small outside app, but there might be possibilities to do it without, too (e. g. a sequence of ppm images played one after the other, I am investigating this).

Now, how should it be implemented? I would prefer a folder "splash" in the /KNOPPIX folder on the CD, where the actual scripts and graphics could be easily modified without touching the initrd. The Knoppix startup and shutdown scripts would just call "/cdrom/KNOPPIX/splash/splash.sh start" and "/cdrom/KNOPPIX/splash/splash.sh stop" for starting and stopping the spash screen, and "/cdrom/KNOPPIX/splash/safeoff.sh start" for showing the shutoff screen.

We can even make them display the splash only if "splash=1" is given at the boot prompt (this should make KK even more happy).

probono
05-25-2003, 09:05 PM
For animations:
There are two options,
a) to use fbmngplay from www.bootsplash.org
b) to convert an animation into a series of ppm images:

convert progress.mng progress%02d.ppmThese can then be displayed with

ppmtofb progress*.ppm --delay 0
However, perhaps it is really better to use the mng player app from bootsplash.org since I couldn't figure out how to make ppmtofb loop and the delay between the images seems to be in whole seconds only.

probono
05-30-2003, 11:21 PM
I need your help: As soon as I change more than one line in linuxrc (inside miniroot.gz inside boot.img) the boot process breaks. Although if I just change something at the end of the script, its behavior changes already in the beginning (e.g. when it scans the different partitions for the Knoppix CD, it writes the pink lines *under* each other instead of *replacing* them /hda1 /hda2 ... etc)

How do I edit linuxrc correctly? Does it have to stay in the same size or why am I having this trouble?

I have tried it several times on different machines. Here is what I did:

loop-mount boot.img
unpack initrd.gz
loop-mount initrd.gz
edit linuxrc with kwrite
unmount initrd
pack initrd
replace initrd.gz

Where is the mistake?

Fabianx
06-05-2003, 09:24 PM
I need your help: As soon as I change more than one line in linuxrc (inside miniroot.gz inside boot.img) the boot process breaks. Although if I just change something at the end of the script, its behavior changes already in the beginning (e.g. when it scans the different partitions for the Knoppix CD, it writes the pink lines *under* each other instead of *replacing* them /hda1 /hda2 ... etc)

How do I edit linuxrc correctly? Does it have to stay in the same size or why am I having this trouble?

I have tried it several times on different machines. Here is what I did:

loop-mount boot.img
unpack initrd.gz
loop-mount initrd.gz
edit linuxrc with kwrite
unmount initrd
pack initrd
replace initrd.gz

Where is the mistake?

It is an bootable image and as such it mustn't be changed ...

Problem ? No !

You just do "syslinux boot.img" once and it works again...
It does rewrite some files and then it boots again ok :-))

cu

Fabian.

probono
06-15-2003, 02:38 AM
Now, finally, there is my solution for the graphical boot process. I tested all of this and it works like a charm. Graphical boot with just the tools that are already on the CD.

The user should be given the maximum freedom to customize this, so I usggest having a separate script /cdrom/KNOPPIX/preinit.sh that gets executed just before the INIT process is started.

Klaus Knopper should add the following to linuxrc inside miniroot.gz just before INIT is given control:


exec /cdrom/KNOPPIX/preinit.sh

This is the eqivalent of knoppix.sh except that is executed *before* the INIT process.

Then, we can have a /cdrom/KNOPPIX/preinit.sh which contains


fbi -q /usr/share/apps/ksplash/pics/splash_top.png &

and voila - we have a graphical Knoppix boot splash screen. The big advantages of this solution:
* you can press "esc" to see the boot messages
* no kernel patches are necessary
* user then can delete or modify his preinit.sh and change the splash to what he wants - including custom images, animations (using userland applications), etc.
* no messing around with miniroot.gz once the line above is included by default by KK
* no remastering of the compressed 700 MB file

Now it would be great if KK could incorporate this. And it would be even greater if he could replace that penguin with an invisible black box.

Fabianx
06-17-2003, 09:44 AM
Now, finally, there is my solution for the graphical boot process. I tested all of this and it works like a charm. Graphical boot with just the tools that are already on the CD.

The user should be given the maximum freedom to customize this, so I usggest having a separate script /cdrom/KNOPPIX/preinit.sh that gets executed just before the INIT process is started.

Klaus Knopper should add the following to linuxrc inside miniroot.gz just before INIT is given control:


exec /cdrom/KNOPPIX/preinit.sh

This is the eqivalent of knoppix.sh except that is executed *before* the INIT process.

Then, we can have a /cdrom/KNOPPIX/preinit.sh which contains


fbi -q /usr/share/apps/ksplash/pics/splash_top.png &

and voila - we have a graphical Knoppix boot splash screen. The big advantages of this solution:
* you can press "esc" to see the boot messages
* no kernel patches are necessary
* user then can delete or modify his preinit.sh and change the splash to what he wants - including custom images, animations (using userland applications), etc.
* no messing around with miniroot.gz once the line above is included by default by KK
* no remastering of the compressed 700 MB file

Now it would be great if KK could incorporate this. And it would be even greater if he could replace that penguin with an invisible black box.

Nice, I like this idea, but why must this be before init ? (Just question)

And for the penguin, I think there was some kernel-cheatcode or framebuffer-operation that could hide it.

KK will have questions though:

"What will happen on a system, that does not have FBdev-support ?

Will it try to switch to some mode and make booting unusable ?"

I think it does not and my tests did show that, but I think we need some more proof as KK of course is right, that it's an system critical feature and should not break systems.

I think we could persuade him though to add it first with some cheatcode so that you can do:

knoppix splash

to boot with graphical splash screen.

This way many users can test this feature and if it does work, it can be made default.

But I think as time is at the moment really pressing for KK, he'll not come do this before the LinuxTag-DVD is in the pressing company.

cu

Fabian

PS: Really good work!

probono
06-17-2003, 07:12 PM
Nice, I like this idea, but why must this be before init ? (Just question)
Simply because after the init process it's too late ;-) Since we want the splash screen to show as early as possible in the boot process, it should definitely go before the init process, so that it can hide all the colorful hardware detection messages which can confuse some types of users.


And for the penguin, I think there was some kernel-cheatcode or framebuffer-operation that could hide it.
Yes, but that's something only KK can decide and do. But I think hiding the penguin will have no negative side effects on any system.


"What will happen on a system, that does not have FBdev-support ?
Let's test: Just start with knoppix vga=normal and see what happens... Unfortunately, I have only a limited number of computers to test it on ;-)


I think we could persuade him though to add it first with some cheatcode so that you can do: knoppix splash
excellent idea!

Some areas that need work (unfortunately, my shell script knowledge is very limited so we'll need your help):
* Shutdown pictures. I don't know how to rewrite the shutdown/reboot script so that my processes don't get killed. We should definitely have this in userlandsplash v1.0!
* Animation instead of static picture. Could be done in preinit.sh using bootsplash.org userland binaries and a bit of shell scripting. Perhaps something for userlandsplash v1.1
* Progress bar and graphics/animations for fsck. Could be done using bootsplash.org userland binaries, but not in the way they intended it. Would require all initscripts to be modified. Probably something for userlandsplash v2.0 ;-)

probono
08-07-2003, 01:15 PM
Fabian, would you now (as the Linuxtag is over....) like to ask Klaus to include this?

Fabianx
08-08-2003, 10:33 AM
Fabian, would you now (as the Linuxtag is over....) like to ask Klaus to include this?

I have already made a patch, but it is against knoppix-autoconfig ... I found it cleaner ...

However you can find a modified boot-floppy (which replaces knoppix-autoconfig in boot-stage) for 06-06 and earlier at:

http://debian.tu-bs.de/knoppix/2003-06-06/Bootimages/SplashPatch/boot.img
(beware its a german one)

This was alreasy as patch announced on debian-knoppix and will find with additional parameter of "knoppix splash" its way into the next iso ...

cu

Fabian

probono
08-11-2003, 06:44 PM
will find with additional parameter of "knoppix splash" its way into the next iso ...great

thanks Fabian!

Superstoned
08-26-2003, 08:18 PM
well, is it goin' to be in *any* new iso?

I like the idea...

probono
12-01-2003, 04:27 PM
well, is it goin' to be in *any* new iso?

I like the idea...
It is in the iso now! just boot with "knoppix splash"

Superstoned
12-02-2003, 10:39 AM
I saw that ;-)

really nice...