LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Changing default bootloader in Slackware installation!!! (http://www.linuxquestions.org/questions/slackware-14/changing-default-bootloader-in-slackware-installation-483525/)

nykey 09-14-2006 03:07 PM

Changing default bootloader in Slackware installation!!!
 
Hi. Here's what I do and want to do further. Following -current and testing it into my VMware machine I also tweaking it to make a custom Slackware install CD. Now I want to use GRUB instead of LILO and I want it to be installed and configured from the installation process. So first of all I delete the lilo----.{tgz, tgz.asc, txt} files and copy the grub----.{tgz, tgz.asc, txt} instead and modify 'tagfile' removing the 'lilo' line and adding 'grub' so it gets installed by default. The grub package is downloaded from the /extra directory from the slackware repository and it has a configure command similar to lilo's and that is 'grubconfig'. Does anyone know how to tweak the installer to run grub's config instead of lilo's ? Thanks.

Samoth 09-14-2006 03:38 PM

I would just install lilo at first and then write GRUB over it. I don't believe it would be worth it to change the slackware installer as it is easier to install slackware than write GRUB over it.

nykey 09-14-2006 03:49 PM

But still... anyone ?

rkrishna 09-15-2006 01:51 AM

i am alos curious??? :^)

Samoth 09-15-2006 06:58 AM

Well.......the first thing to figure out would be to find out what "setup" is written in. Anyone? If it is written in Python, it shouldn't be THAT hard, but it probably isn't. Most likely C. You would need to write some more menus, and then add a GRUB configuration set of menus.

nykey 09-15-2006 07:54 AM

Yes it's possible as you say but still, the menu looks exactly the same as if you would run 'liloconfig' on an already installed system, and that's what I think it actually does (the installer)... chroot's the partition where the packages have already been installed and run's 'liloconfig' so the only thing I should modify is the command from 'liloconfig' to 'grubconfig' but I can't seem to find that setup script, which runs this command...

Samoth 09-15-2006 11:05 AM

I believe it is a C program, which would mean it isn't a script. You might want to go up to the Slackware website and look for the code.

gbonvehi 09-15-2006 12:20 PM

The setup was made using bash scripts. Get initrd.img from Slackware CD or some mirror, gzip -d it and then mount it as a loop device. If my memory doesn't fail the installation scripts where under /var/setup.

nykey 09-15-2006 01:03 PM

Quote:

Originally Posted by gbonvehi
The setup was made using bash scripts. Get initrd.img from Slackware CD or some mirror, gzip -d it and then mount it as a loop device. If my memory doesn't fail the installation scripts where under /var/setup.

Actually they are on the initrd image in /var/lib/setup and I did try that, checked all the script's in there and nothing. So it must be somewhere else or the command must be triggered somehow....

gbonvehi 09-15-2006 02:01 PM

I've just found how it does. lilo package includes setup.liloconfig which is copied to /var/log/setup, then, /var/lib/setconfig (I don't know if it's setconfig i'm looking at installation files with DOS names..) script runs all post install scripts setup.* inside /var/log/setup.
Look for the line "# Post installation and setup scripts added by packages. " inside the files of the mounted image if you can't find that file.

Sometimes simplicity is great ;)

evilDagmar 09-17-2006 02:08 AM

Quote:

Originally Posted by Samoth
Well.......the first thing to figure out would be to find out what "setup" is written in. Anyone? If it is written in Python, it shouldn't be THAT hard, but it probably isn't. Most likely C. You would need to write some more menus, and then add a GRUB configuration set of menus.

It's written in freakin' bash script. Was there anything in your post actually correct? Not to be cruel, but wild guesses are not typically welcome in technical forums.

evilDagmar 09-17-2006 02:22 AM

Quote:

Originally Posted by gbonvehi
I've just found how it does. lilo package includes setup.liloconfig which is copied to /var/log/setup, then, /var/lib/setconfig (I don't know if it's setconfig i'm looking at installation files with DOS names..) script runs all post install scripts setup.* inside /var/log/setup.
Look for the line "# Post installation and setup scripts added by packages. " inside the files of the mounted image if you can't find that file.

Sometimes simplicity is great ;)

Your analysis is mainly correct according to my understanding of how that mechanism works. I can't be sure about the /var/lib/setconfig filename (since it's never really been an issue for me) but yeah the `setup` script does basically line up everything in /var/log/setup and run it in alphabetical order during the last phase of setting up the system.

I'm baffled as to why you'd want to use Grub, but to each his own.

In any case, you won't need to remove or otherwise diddle the setup.liloconfig script. All you really need to do is take that grub package from extras, modify it to have a /var/log/setup/setup.grubconfig script of your design, stick it into A, and then add it to the index (the location of which should stand out for you in the A/ directory), and at that point you're done.

Of course, as has been pointed out, this is probably way more trouble than it's worth.


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