LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   grub on the slackware installer (https://www.linuxquestions.org/questions/slackware-14/grub-on-the-slackware-installer-4175455070/)

mreff555 03-25-2013 09:09 AM

Ok, I'm confused now. Are you saying you want to modify the installer? are you trying to do a batch install on a lot of systems?
I wouldn't mess with the install CD. Doing it yourself is easier and cleaner.

blackv1rus 03-25-2013 09:56 AM

Well... yes I wanted to make a bootable distro based on slack but with grub intead of lilo, and the slack installer is pretty good for my needs, the only problem(not really one) is lilo :-p

mreff555 03-25-2013 10:59 AM

Since they are both slack packages, I would think it would be a pretty simple fix. Do you have the source for the installer utility?
I imagine all you would have to do is replace the lilo package location with the grub location.

blackv1rus 03-25-2013 11:03 AM

this is what I was thinking about, but I found every part of the configuration on the script files located on the source of the installer, but i can't find the lilo installation part on the scripts... :-/

Erik_FL 03-25-2013 01:14 PM

Quote:

Originally Posted by blackv1rus (Post 4918355)
But suppose I wanted the user to be able to choose what to do during the installation, like it happens when you get to the boot loader screen on installer. then I have to find out where it is among these scripts, consequently edit it to grub syntaxes.

If I understood Didier's post correctly, you need to add an installer script in the GRUB package of Slackware. You should be able to look at the LILO package to see that script for LILO.

The LILO script asks if you want to install LILO. You should be able to answer no to that script during setup.

If you add an installer script to GRUB's package then you should be able to answer yes to that script during setup to install GRUB. That does not require changing the Slackware setup script, only adding a script to the GRUB package.

The Slackware setup could be changed to ask which boot loader to install when there is more than one package installed. Then have Slackware setup define an environment variable that the GRUB and LILO scripts (in their packages) check. If the environment variable is set, skip asking the question in the script and either install the boot loader package (or not) based on the environment variable.

The environment variable could be set like this in setup.
  • Does not exist (no boot loader specified)
  • NONE (do not install any boot loader)
  • LILO (install LILO)
  • GRUB2 Install GRUB2
  • GRUB (install GRUB)

The setup script can provide choices based on which boot loaders are installed, or ask about all of them and force the package to be installed for the selected boot loader. The setup script does not install the boot loader. It only asks which boot loader should be installed and then makes sure the package has been installed. The script in each boot loader package does the installation of the boot loader.

In each boot loader package the environment variable might be used like this.
  • If variable does not exist, ask the question about installing this bootloader.
    If answer is yes, set variable to this boot loader
  • If variable is set to this boot loader install this boot loader

Didier Spaier 03-25-2013 02:02 PM

Quote:

Originally Posted by Erik_FL (Post 4918569)
If I understood Didier's post correctly...

Of course you do ;)

@blackv1rus: please re-read my post #7.

There is nothing lilo-related in the installer. Let's make a long story short:
(during installation): installation of packages, some of them, including lilo, writing configuration scripts in /var/log/setup in the new Slackware system
(in the installer): /usr/lib/setup/SeTconfig => "execute all executable scripts found in /var/log/setup in the new Slackware system" (including setup.liloconfig is present)

So as Erik told you, just write setup.grub and grubconfig scripts with behavior inspired from setup.liloconfig and liloconfig respectively and have the former written in /var/log/setup during installation of your new grub package.

Of course you'll need to have grub installed before SeTconfig is executed for that to work (you'll need to take of that too as packages in /extra are not initially installed in a genuine Slackware).

PS you will quickly realize yourself how much work is needed to write grubconfig :cool:

mreff555 03-25-2013 02:45 PM

Quote:


PS you will quickly realize yourself how much work is needed to write grubconfig :cool:
So true. Lilo is nice and simple.

Didier Spaier 03-25-2013 03:35 PM

Quote:

Originally Posted by mreff555 (Post 4918615)
So true. Lilo is nice and simple.

That was not my the point, as I think that difficult level/amount of work needed to write grubconfig or liloconfig from scratch are similar.

blackv1rus 03-25-2013 04:23 PM

Guys you win :-) I was reading about it the whole day and I got to the conclusion that it is simpler and safer to keep things as is. now the next step is to do a custom installation with cinnamon and get rid of KDE, Games, the Linux FAQs, Emacs and then add some custom packages.

As far as I know I can do this editing the maketag.sh and the setup script... or Am I wrong?

TobiSGD 03-25-2013 04:45 PM

The first thing you would have to do is to get Gnome 3 running on Slackware, after that you can install Cinnamon, only then I would think about removing packages.
Have fun with that, you might want to have a look at the GSB project for Gnome 3, but when in the future Gnome 3 becomes hard dependent on systemd you will run out of luck anyways, unless you also plan to get that running on Slackware.

Seeing all the changes you want to make I would recommend to rethink if Slackware is the base you want to use for your project.

Didier Spaier 03-25-2013 04:45 PM

As this is actually a different topic I'd suggest you devote it a new thread.

blackv1rus 03-25-2013 06:11 PM

Quote:

Originally Posted by TobiSGD (Post 4918687)
The first thing you would have to do is to get Gnome 3 running on Slackware, after that you can install Cinnamon, only then I would think about removing packages.
Have fun with that, you might want to have a look at the GSB project for Gnome 3, but when in the future Gnome 3 becomes hard dependent on systemd you will run out of luck anyways, unless you also plan to get that running on Slackware.

Seeing all the changes you want to make I would recommend to rethink if Slackware is the base you want to use for your project.

I've managed to install Cinnamon on Slackware, it is not so tuff as the whole gnome 3, a bit different, and yes i had to install systemd and other libs to get it running properly, but at the end it was faster then KDE, its also lighter. I think i could do a tutorial explaining how I did it.

blackv1rus 03-25-2013 06:14 PM

maybe LFS would do the job but then I will need a installer... make it bootable... :cry:

whizje 03-25-2013 07:37 PM

Or you could make a system to your liking and create a image. Assumed that the target machine are reasonably alike you can create a simpler install script.

TobiSGD 03-25-2013 07:43 PM

If you consider LFS as an option, it would be interesting to know why you have chosen Slackware as the base for your project, not something with a fully scriptable installer like Debian.


All times are GMT -5. The time now is 04:02 PM.