LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-21-2013, 07:42 PM   #1
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Rep: Reputation: 4
grub on the slackware installer


Hi guys.

is there some one that already tried it??

what I want:

edit the Slackware installer and use grub instead of lilo, I'm just curious about the possibilities.

could someone lead me to at least a manual that is related to my needs?

thanks
 
Old 03-21-2013, 08:46 PM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,494

Rep: Reputation: 437Reputation: 437Reputation: 437Reputation: 437Reputation: 437
A manual for what, exactly?
 
Old 03-21-2013, 09:13 PM   #3
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-C ML
Posts: 885

Rep: Reputation: 78
No real need for a manual.
Install Slack without Lilo.
Boot from dvd.
Install grub leg from 32bit /extra to a separate (very small) ext2 partition.
Run:
grubconfig

Edit/Note:
If you have trouble making the grub partition bootable, SuperGrubDisk will fix it from a gui most of the time.
http://sourceforge.net/projects/supe...ce=recommended

Last edited by slackass; 03-21-2013 at 09:30 PM.
 
1 members found this post helpful.
Old 03-21-2013, 09:46 PM   #4
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Original Poster
Rep: Reputation: 4
Thanks! do you think it will work? Sorry for my lack of explanation.

I want to make the Slackware installer use grub instead of lilo from the start up (before I install my distro), or if not possible, how I could make it configurable at the installation process, i don't know where to look for it...

for example: when you boot backtrack 5, grub starts, and then you can choose whatever kernel you want. this is more my idea, i just don't know where to start working on it, and where i could get more information about this possibility, tried Google but they give a bunch of links showing how to configure and install grub after the system is installed.
 
Old 03-21-2013, 10:00 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046
You don't need Grub just to start different kernels, Lilo is perfectly capable of that.
More info here:
http://docs.slackware.com/slackbook:booting?s[]=lilo
https://wiki.archlinux.org/index.php/Lilo
 
Old 03-21-2013, 10:10 PM   #6
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Original Poster
Rep: Reputation: 4
Yes I know that, but could I also have a default installer that starts straight up with grub without breaking things?

Thanks by the way
 
Old 03-22-2013, 03:22 AM   #7
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,239

Rep: Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041
If you do that it won't stay a "default" installer

FYI the installer is not a single file that you could edit. It is a cpio archive called initrd.img in the the /isolinux directory of a Slackware tree.

If you want to look inside it you can unpack it for instance with following commands, typed as root:
Code:
mkdir -p /tmp/initrd
(cd /tmp/initrd
gunzip -cd /path/to/isolinux/initrd.img | \
cpio -i -d -H newc --no-absolute-filenames
)
Then have look at /tmp/initrd/usr/lib/setup/SeTconfig, lines #94 - 110. You will see that in fact this script executes (freshly installed) scripts in the new Slackware installation in /var/log/setup.

So actually there is nothing to change in the installer itself. You would just(!) modify grub's package so it spits an appropriate script in that directory at time of installation (you could look how lilo's package does that to get a clue there, see what's inside /source/a/lilo for that). Of course that will work only if grub is installed.

Good luck.

PS Kudos to Pat for this smart design of the installer, which makes such changes possible without having to modify it

PS2 of course what slackass proposed you is *a lot* simpler...

Last edited by Didier Spaier; 03-22-2013 at 05:03 AM. Reason: PS2 added
 
1 members found this post helpful.
Old 03-22-2013, 06:58 AM   #8
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Original Poster
Rep: Reputation: 4
Thumbs up

Quote:
Originally Posted by Didier Spaier View Post
If you do that it won't stay a "default" installer

FYI the installer is not a single file that you could edit. It is a cpio archive called initrd.img in the the /isolinux directory of a Slackware tree.

If you want to look inside it you can unpack it for instance with following commands, typed as root:
Code:
mkdir -p /tmp/initrd
(cd /tmp/initrd
gunzip -cd /path/to/isolinux/initrd.img | \
cpio -i -d -H newc --no-absolute-filenames
)
Then have look at /tmp/initrd/usr/lib/setup/SeTconfig, lines #94 - 110. You will see that in fact this script executes (freshly installed) scripts in the new Slackware installation in /var/log/setup.

So actually there is nothing to change in the installer itself. You would just(!) modify grub's package so it spits an appropriate script in that directory at time of installation (you could look how lilo's package does that to get a clue there, see what's inside /source/a/lilo for that). Of course that will work only if grub is installed.

Good luck.

PS Kudos to Pat for this smart design of the installer, which makes such changes possible without having to modify it

PS2 of course what slackass proposed you is *a lot* simpler...
Thanks!! this information was a pretty good start for what I was looking for
 
Old 03-22-2013, 03:02 PM   #9
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,239

Rep: Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041Reputation: 1041
I'm glad you found this information useful.

Now, you'll have to decide what you will (propose the user to) do in case both lilo and grub packages are installed
 
Old 03-23-2013, 04:38 AM   #10
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by Didier Spaier View Post
I'm glad you found this information useful.

Now, you'll have to decide what you will (propose the user to) do in case both lilo and grub packages are installed
It is more a experiment thing for the moment, then if the results goes as expected I will move to the next step.
 
Old 03-23-2013, 09:36 PM   #11
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 797

Rep: Reputation: 247Reputation: 247Reputation: 247
If you boot a Slackware setup DVD, what starts the Slackware installer (kernel and initrd) is ISOLINUX not LILO. You should be able to boot the same kernel and initrd files using GRUB.

The kernels are on the DVD in "kernels/huge.s/bzImage" and "kernels/hugesmp.s/bzImage". The initrd (RAM file-system) is in "isolinux/initrd.img".

Look at the file "isolinux/isolinux.cfg" for the exact boot menu entries. You will have to translate those menu entries to the correct information for the GRUB menu.

If you are actually going to install Slackware, you also need the rest of the Slackware files from the DVD.

Changing what boot loader is installed during setup is more complicated. To do that you have to change the file "/usr/lib/setup/setup" in the "initrd.img". It will be necessary to extract the files from "initrd.img" and then re-create "initrd.img". You have to add the boot loader's files to the Slackware installation files if they aren't already there. GRUB Legacy is already a Slackware package included with the installation files.

Edit: It looks like you don't have to change the "initrd.img". Thanks for the great explanation, Didier!

Last edited by Erik_FL; 03-23-2013 at 09:43 PM.
 
1 members found this post helpful.
Old 03-25-2013, 07:48 AM   #12
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Original Poster
Rep: Reputation: 4
Thumbs up

Quote:
Originally Posted by Erik_FL View Post
Changing what boot loader is installed during setup is more complicated.
This is exactly what I want to do.

Many thanks Didier and Erik_FL for the very explanatory reply.
 
Old 03-25-2013, 07:58 AM   #13
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by Didier Spaier View Post
I'm glad you found this information useful.

Now, you'll have to decide what you will (propose the user to) do in case both lilo and grub packages are installed
Actually I want to replace lilo with grub, and see what looks like.
 
Old 03-25-2013, 08:27 AM   #14
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 444

Rep: Reputation: Disabled
When you install skip lilo and make a boot disk. Use the boot disk to boot your system and install grub.

http://slackbuilds.org/repository/13.1/system/grub2/

Haven't tried it yet. but I'm assuming it works.

In my case I already had Grub on the MBR from another distro on another partition. In that case all you have to do is load up the other partition, add a slack entry to /etc/grub.d and update grub. I'd personally prefer lilo over grub just because the syntax is much more simple. Eventually I'll switch back.
 
Old 03-25-2013, 08:53 AM   #15
blackv1rus
Member
 
Registered: Apr 2005
Location: switzerland
Distribution: slackware
Posts: 54

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by mreff555 View Post
When you install skip lilo and make a boot disk. Use the boot disk to boot your system and install grub.

http://slackbuilds.org/repository/13.1/system/grub2/

Haven't tried it yet. but I'm assuming it works.

In my case I already had Grub on the MBR from another distro on another partition. In that case all you have to do is load up the other partition, add a slack entry to /etc/grub.d and update grub. I'd personally prefer lilo over grub just because the syntax is much more simple. Eventually I'll switch back.
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB - only Centos installer is able to install right ? Vilius Red Hat 4 04-04-2009 04:39 AM
GRUB - only Centos installer is able to install right ? Vilius Linux - Software 2 03-07-2009 05:38 AM
Modifying Slackware 12 installer, replacing lilo with grub zomane Slackware 2 04-05-2008 04:19 AM
GRUB disk numbering is different from SUSE installer pjo22 Linux - Newbie 4 06-11-2006 05:18 PM
SuSe 9.1 installer stops in Grub on first boot alancook Linux - Newbie 1 07-24-2004 07:16 AM


All times are GMT -5. The time now is 10:59 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration