How do I create a .dsl from source/binaries?


Forum: Other Help Topics
Topic: How do I create a .dsl from source/binaries?
started by: curaga

Posted by curaga on Mar. 02 2007,14:51
There's nothing about that in the wiki nor this forum.. Atleast I couldn't find anything from the forum search..
Posted by mikshaw on Mar. 02 2007,17:03
There is information in the wiki:
< http://damnsmalllinux.org/wiki/index.php/Creating_MyDSL_Extensions >

Although it does not cover all possible methods, it does explain a few of the more common methods.

Basically, any means of getting an application running in DSL can be used as a base for a mydsl extension.  The main things to consider, in my experience, are:
1) The application itself must run well in DSL, before even considering the mydsl package.
2) The myDSL package should not contain any files, including directories, which may clobber existing files. Clobbering includes overwriting existing files with potentially conflicting versions of the same file or files that have different ownership and/or file permissions.
3) The application's license must allow redistribution without penalty to receiving parties (GPL-compatible licenses are ideal).

Posted by curaga on Mar. 03 2007,10:10
I was going to create an extension for grub 0.97 with splash support. I thought I'd make an install script which would backup the current grub say to grub.old.tar.gz and then extract the new files, thus avoiding overwriting.. It is gpl, but would making this kind of extension be okay? I mean a tar.gz not able to install through the mydsl system, but through a script..
Posted by mikshaw on Mar. 03 2007,18:45
If it requires a script to install, it will probably need to be looked into and tested more thoroughly than most other extensions, just to make sure it's safe to distribute. You might think of it as similar to the gtk2 extension, which needs to be "enabled" before using. With a grub extension, however, there's no way to know where the user wants to install teh bootloader itself (in the mbr, a partition, floppy), so it might be best simply to have the application files installed normally and leave it up to the user to run grub-install to install the bootloader.

As far as the bootsplash goes, I have no idea if it's possibe to use this freature from a mydsl extension, since I assume it would need to be installed before grub loads.

Posted by curaga on Mar. 04 2007,12:00
I just looked at the previous grub extension. It seems to be a normal tar.gz, but tar is in posix format, not gnu (is it a must?)

The previous grub extension overwrites the earlier grub files (if any), so it is a clobberer by your point 2, but it got accepted, didn't it? So I could just make a .dsl extension..

And it ain't bootsplash, it's grub splash, which shows an image only on the grub screen. In hd-install everything would work right out of the box, in frugal I guess /boot needs to be a separate partition, so that grub can fetch the image there (doesn't it fetch the stage1_5 and stage2 files from /boot/grub always? How then can frugal boot using grub if those are compressed?)

Also it can get the image from any folder, so the images could be put to some folder on the partition for frugal.

One more point: I only thought about a script 'cause you told to avoid overwriting. It was only going to backup the old grub ;)

Posted by mikshaw on Mar. 04 2007,14:11
I think if you are upgrading an existing application it wouldn't necessarily be clobbering, as long as it doesn't interfere with other applications. I'd say grub probably doesn't have much influence on other apps.

I didn't know there was a difference between grub splash and bootsplash, so you can probably ignore that bit. However, I still don't see how grub could be installed via mydsl unless you have a persistent filesystem. Wouldn't it need to be already available before init is run?

Posted by curaga on Mar. 04 2007,14:42
Yes, it would need to be available beforehand. I think it is useful for livecd and frugal users if they install to hd on the same session, or if they have other OSs and wish to have a nice bootup eye candy. I'll take a picture of my grub screen, so you can see it ;)

Oh, and grub 0.97 does have a different set of stage1_5 files than the dsl grub, 0.91. Do the dropped ones need to be removed somehow, or can they just be left there in hope no-one uses them?


BTW, bootsplash is also possible. It's files are only used for creating the initrd, and possibly for animation. If the image is still, and the initrd somewhere persistent, it'll also work..
The kernel has to be patched, but it is kept uncompressed in frugal and livecd, I think..

Posted by curaga on Mar. 04 2007,16:23
Here's the screenshot:

< Click to see the full-sized version (212k) >

So sorry for the quality of the bigger image, I took it with my celly ;)
The black lines are also from the celly cam..

Posted by lucky13 on Mar. 04 2007,16:26
Quote (curaga @ Mar. 04 2007,09:42)
Yes, it would need to be available beforehand.

I personally wouldn't trust an extension that touches my MBR. I would openly and probably very loudly discourage others from using one.
Quote
I think it is useful for livecd and frugal users if they install to hd on the same session, or if they have other OSs and wish to have a nice bootup eye candy. I'll take a picture of my grub screen, so you can see it ;)

How long do you let GRUB run before it boots a default, and is that worth "eye candy"? I set mine to 10 seconds since I generally want my default loaded and it doesn't take me that long to move down to my other options if I need to. I can live without any fancy graphics for that long. Maybe others can't. I don't think some 10-30 second "eye candy" is worth enabling a script that affects my MBR in any manner.

Posted by curaga on Mar. 04 2007,16:32
lucky13, you are a bit wrong about that. The extension won't touch your MBR if you don't tell it to. The pic has nothing to do with MBR, nor does it require any script. The modified grub puts the same thing into MBR as an unmodified. The pic is shown with a line in menu.lst:
splashimage (hd0,0)/boot/grub/Coolpic.xpm.gz
And my grub is shown for 7s, but it is quite cool to have something else than a black screen with text

Posted by lucky13 on Mar. 05 2007,04:29
Quote (curaga @ Mar. 04 2007,11:32)
lucky13, you are a bit wrong about that. The extension won't touch your MBR if you don't tell it to.

Your script would re-write GRUB to MBR for those who've installed it to MBR. That's "affecting" MBR. That's something which could create a wide range of issues regardless of your intentions.
Quote
The pic has nothing to do with MBR, nor does it require any script. The modified grub puts the same thing into MBR as an unmodified.

Which contradicts what you wrote above. Figure out how to do it without touching any MBR. You're also contradicting what you wrote earlier:
Quote
I thought I'd make an install script which would backup the current grub say to grub.old.tar.gz and then extract the new files...

What exactly would this "script" -- or whatever you want to call it now -- do? Would it replace, rewrite, or otherwise affect anything any user has written to MBR or not?
Quote
The pic is shown with a line in menu.lst:

Fine, edit it and leave MBRs alone.
Quote
And my grub is shown for 7s, but it is quite cool to have something else than a black screen with text

I guess beauty really is in the eye of the beholder. How long do you sit there rebooting your computer just to see GRUB for seven seconds? I seldom go less than two or three weeks between rebooting any of my computers. Usually, it's a matter of months. My complacency:

$ uptime
22:22:31 up 9 days, 20 min...

Posted by curaga on Mar. 05 2007,06:36
Quote
Your script would re-write GRUB to MBR for those who've installed it to MBR. That's "affecting" MBR. That's something which could create a wide range of issues regardless of your intentions.

If you read the whole thread, you would've seen that I only thought about a script 'cause mikshaw told to avoid overwriting. And you would've also noticed all the script was for was backing up the previous grub, not for anything else!

I won't even do any script now, since mikshaw told it's ok to upgrade an app..

And though all my comps have Linux, I don't keep them running all the time, since I use them like couple of hours a day, that would mean a huge electric bill!

If you want the splash image, grub does have to be installed again, but if you have a problem with that then don't. If someone gets the extension and wants to get the pic, he will surely install it like it's supposed to. The pic doesn't take any of the functionality away

Posted by mikshaw on Mar. 05 2007,15:16
Please don't take anything I say as official rules or permissions. I'm just a user like you, and what I post is merely help and suggestions (note most of my posts include terms like "probably" and "i think"). Most of my suggestions are based on my own experience, on what I've read from other users, or simply on what seems rational to me.

The *suggestion* about upgrading grub concerned only the installation of the program files, which in itself is not enough to make a useable grub system. The user would still need to install the bootloader into the desired location.

Now that I've thought again about it, it seems to me that grub is probably among the least appropriate apps for a mydsl extension. The existing extension itself is not a click-and-run package, but merely gives the user access to the grub program without the need to compile it himself. You still need to create a config for it, and that will need to be available somewhere before the system begins init (meaning before a mydsl extension can be installed). This means that the only way it will be truly useable (as far as I can tell) is if you are using it in a remaster, a boot disk, or a debian-style system.

I agree that users should have the option to install whatever bootloader they want, but just keep in mind that the typical DSL system is not a typical Linux system. The user should be made aware that grub is not a click-and-run app in DSL, and provided with documentation on how to make it work in DSL and how to make it persistent (namely a remaster, a floppy, or a debian-style system). I agree with lucky13 that Grub should not be automatically installed as most mydsl extensions are. It probably also should not be installed over existing grub files, since this might cause the system to fail to boot if the user does not complete the manual installation of the bootloader and configuration. I might be completely wrong on this last point, however.

Posted by curaga on Mar. 05 2007,15:51
This is going ty be my first extension. I'll need an answer to a couple of things (asked before) still before I can do it:

1. The different set of stage1_5 files. Some filesystem file that was with grub 0.91 is not on 0.97. Do I need to remove them somehow?

2. How is frugal with grub done? Grub files have to be somewhere persistent.. This is for writing some doc for frugal users..

For your last point: unless menu.lst (and if stage2 hasn't changed too much between 0.91 and 0.97) is overwritten, the system will boot using the previous config

Posted by lucky13 on Mar. 05 2007,16:34
Quote (curaga @ Mar. 05 2007,01:36)
Quote
Your script would re-write GRUB to MBR for those who've installed it to MBR. That's "affecting" MBR. That's something which could create a wide range of issues regardless of your intentions.

If you read the whole thread

I did, which is why I pasted back what you'd previously written. :-)
Quote
I won't even do any script now

Excellent!
Quote
If you want the splash image, grub does have to be installed again

I realize very well that it doesn't add any function whatsoever, which is why I don't understand why anyone would touch something as important/delicate/tricky as the MBR to do it. Still curious why anyone needs an image like that to figure out which OS to boot or to look at and go "ahh" while waiting a few seconds for a default to load. Is that really worth fiddling with MBRs, even if you reboot daily or hourly?

Posted by curaga on Mar. 05 2007,16:45
lucky13, notice it's a newer version, that's why it has to be installed again. It may add some functionality, correct bugs etc. over the older version, besides showing the pic.. Not sure, but try here:

< Debian unstable grub changelog >

Posted by lucky13 on Mar. 05 2007,17:01
Quote (mikshaw @ Mar. 05 2007,10:16)
The *suggestion* about upgrading grub concerned only the installation of the program files, which in itself is not enough to make a useable grub system. The user would still need to install the bootloader into the desired location.

Correct. And for those who've installed it to MBR, it would affect MBR. Not good unless they are experienced and/or knowledgeable enough to handle issues that could arise. This isn't a trivial area of a computer, and I fear those most inclined to have "pretty pictures" at every chance they get are the least able to "fix" a gimpy, totally (bleep!)ed-up MBR.
Quote
Now that I've thought again about it, it seems to me that grub is probably among the least appropriate apps for a mydsl extension. The existing extension itself is not a click-and-run package, but merely gives the user access to the grub program without the need to compile it himself. You still need to create a config for it, and that will need to be available somewhere before the system begins init (meaning before a mydsl extension can be installed). This means that the only way it will be truly useable (as far as I can tell) is if you are using it in a remaster, a boot disk, or a debian-style system.

That was my initial hunch when I first read curaga's post. Extensions generally are used for loading things once the system is already up; but GRUB gets the system up. It would work best on a remaster or on a HD install, but I don't think it's suitable as an extension for use with frugal installs, etc.
Quote
I agree with lucky13 that Grub should not be automatically installed as most mydsl extensions are. It probably also should not be installed over existing grub files, since this might cause the system to fail to boot if the user does not complete the manual installation of the bootloader and configuration.

This is the part that concerns me the most. It's one thing to set something up on one partition that won't affect your entire computer. If that (bleep!)s up or conflicts with anything, it should be a relatively easy "fix."

It's completely different if someone starts re-writing or overwriting MBRs. That can affect a whole hard drive, rendering every OS on it unusable. That's further complicated if the user or the person putting together such an extension or upgrade isn't absolutely on the ball about it. All of a sudden, you have a computer that won't boot from hard drive, and -- in the hands of the wrong person, like one whose enthusiasm totally overshadows his abilities -- it can go downhill very quickly from there.

I would discourage anyone from using something like that just to get a picture for a few seconds when turning on a computer.
Quote
I might be completely wrong on this last point, however.

No, you're completely right. On your imaginary set of scales, weigh the benefits of having a pretty picture for a few seconds when you boot against the risks of totally (bleep!)ing up your MBR. Risks totally outweigh benefits.

Posted by lucky13 on Mar. 05 2007,17:20
Quote (curaga @ Mar. 05 2007,11:45)
lucky13, notice it's a newer version, that's why it has to be installed again. It may add some functionality, correct bugs etc. over the older version, besides showing the pic.. Not sure, but try here:

< Debian unstable grub changelog >

I've outlined my concerns previously in this thread. In a nutshell, I don't like the idea of rewriting things -- third-hand scripts -- to MBR. I especially don't like it in the hands of people who really don't know what they're doing, who like the idea of flashy stuff without realizing that they could render their entire hard drive unusable. There are just way too many bad things that can happen to outweigh the good.

As for your points...
1. Newer isn't necessarily better.
2. It's in Debian unstable. GRUB itself isn't a "mature" boot loader, it's still pre-1.0. The current version works well. I don't care if it's all jazzed up because (a) I see mine maybe once a month, if that; and (b) mine loads my default OS in a few seconds.
3. What functionality does it add over the existing DSL version?
4. How many of the patches in the current version are for bugs in versions between the DSL version and current? This is very important to know before just saying it patches some bugs. How many of those bugs affect the DSL version?
5. Are there any significant issues that need to be addressed with DSL's GRUB not working when properly configured that this more recent version addresses?

I'm not trying to rain on your parade, I just don't like the idea of people capriciously messing with things like MBRs unless they have very good reason to do it. This isn't like adding a buggy application or library that can be deleted/fixed easily, this could totally ruin someone's day.

I'm glad you like your boot screen; it's very nice. I'm just thinking down the road how many people will start posting to the DSL forums or, worse, in other distro forums, ragging about the problems they have with something they got from DSL and blaming DSL for all their woes. It won't matter to them that they did something risky (altering MBR), just that it messed up their hardware and their lives. I don't think the benefits are worth the risks.

Posted by curaga on Mar. 06 2007,10:48
For your points:
1: I agree
2: DSL is based on Knoppix which is based on Debian testing/unstable
3: I don't know, that's why I gave the link
4: see 3: and maybe check bugs in 0.91 from somewhere
5: see 4 and maybe ask someone from the DSL team

Quote
That's further complicated if the user or the person putting together such an extension or upgrade isn't absolutely on the ball about it.

Does that mean me ;) bet it does.. I know what I'm doing (about grub, not entirely sure about the extension), I upgraded grub on my hd-install the manual way, installed it to MBR and have the tools to fix it if it goes wrong..

Could you answer my two questions? (frugal-grub and stage1_5?)

Posted by lucky13 on Mar. 06 2007,16:08
Quote (curaga @ Mar. 06 2007,05:48)
For your points:
1: I agree
2: DSL is based on Knoppix which is based on Debian testing/unstable
3: I don't know, that's why I gave the link
4: see 3: and maybe check bugs in 0.91 from somewhere
5: see 4 and maybe ask someone from the DSL team

2a. A lot of Debian-based distros have switched to unstable or testing because of the speed -- or lack thereof -- of Debian updates to their repositories. This is especially the case with respect to distros with frequent release schedules, such as Ubuntu (which now affects Mepis) and Knoppix. This move to other-than-stable wasn't to be "bleeding edge," but rather to fulfill the desire of most users to have regularly updated applications when the latest distro release is issued. (Which makes some sense if your distro is on a 6-12 month release cycle and the Debian pool is stagnant for a couple years or longer: your "upgrade" isn't an upgrade at all if it's 98% the same as the previous version. The point is moot with DSL and other distros that attempt to retain as much legacy support as possible.)

2b. Careful. DSL is based on Knoppix 3.4, not Knoppix current. DSL's updates have been based on issues related to utility, performance, bug fixes, and rewriting DSL-based apps in shared scripting languages. DSL is not Knoppix, and not everything that works in one will necessarily work with the other.

3, 4, 5. I'm not the one trying to convince others of a need for (a) an upgrade to DSL, or (b) an extension that would affect MBRs.

Quote
Quote
That's further complicated if the user or the person putting together such an extension or upgrade isn't absolutely on the ball about it.

Does that mean me ;) bet it does.. I know what I'm doing (about grub, not entirely sure about the extension), I upgraded grub on my hd-install the manual way, installed it to MBR and have the tools to fix it if it goes wrong..

It was meant generically and with a couple recent threads related to that issue very fresh in my mind. I don't know what your specific skill level is. I also don't know the specific skill levels of other users who might innocently or naively attempt to rewrite GRUB to MBR and render their hardware inoperable. That's the basis of my concern, and given the real risks -- problems that can occur with writing/rewriting MBRs-- I really would want to see a lot more reward than a few seconds of pretty graphics at boot.

I do know the general world population is probably highly unqualified to start fiddling around with a MBR. This is something that has to be considered when working on anything that will affect a MBR regardless of your own intentions or skills. In the hands of most people, and that includes less technical-savvy people who are inclined to things like style over function, this can be a very bad thing.

I'd have a lot less issue about this if Robert wants to update to a version of GRUB that allows this kind of thing. It won't affect me too much if he does or doesn't since I only upgrade and use the current version on USB installs (my traditional hard drive installs are DSL 2.4 or earlier).

I promise it's nothing personal against you.  :-)
Quote
Could you answer my two questions? (frugal-grub and stage1_5?)

I'm not sure what your question was/is. If it's about compression, vmlinuz is compressed (hint: z). In a frugal install, you're putting the ISO on its own partition; GRUB loads the ISO off the hard drive the same as if it were on the live CD or USB. Clarify or rephrase your question so we can get on the same page.

Posted by curaga on Mar. 06 2007,16:14
With that question I referred to my post on page 3, which you ignored:
Quote
This is going ty be my first extension. I'll need an answer to a couple of things (asked before) still before I can do it:

1. The different set of stage1_5 files. Some filesystem file that was with grub 0.91 is not on 0.97. Do I need to remove them somehow?

2. How is frugal with grub done? Grub files have to be somewhere persistent.. This is for writing some doc for frugal users..


I just thought about some of your earlier points, about people trashing their MBR's, it is possible already, since grub is part of DSL, and if they don't know what they are doing, they can well trash their comps with the existing grub (and dd..)

If I'm clear about your points, they meant that this extension will increase the times people mess with their MBRs, correct?

Posted by ^thehatsrule^ on Mar. 06 2007,18:06
Some notes on this thread:
- afaik grub cannot load iso's
- grub is mature enough - version numbers usually just correspond to the developers' goals.  As it stands, grub legacy is done.
- I personally have no problem for someone to create a grub extension.  If you are paranoid on the whole messing up scenario, just add the warnings in the '.info'.  However, I would suggest it being contained (ie in /opt), and not replace the originals.

1.  I think this depends on how you compiled grub.. afaik 1.5 files are just used for different filesystems - not a biggie since DSL really only uses ext2.
2.  See frugal_grub.sh if you mean DSL's default script.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.