LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-05-2012, 01:57 AM   #1
autior
LQ Newbie
 
Registered: Apr 2012
Location: Italy - Naples
Posts: 2

Rep: Reputation: Disabled
How to boot Slackware with GRUB?


Hi guys, I just finished to install Slackware on my net-book, but before of doing it, I installed Debian with GRUB. So, I tried to log in Debian and launch grub-update, but it doesn't recoignize Slack. What I have to do to boot it with GRUB?

Thanks.
 
Old 04-05-2012, 04:05 AM   #2
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 530

Rep: Reputation: Disabled
You might have to edit the grub configuration file by hand.
Code:
editor /boot/grub/grub.conf
Then you'll need to add in Slackware into that file, something like...
Code:
title Slackware
root (hd0,0)
kernel /boot/vmlinuz-<kernel> root=/dev/sda1
There will be a few things you need to manually change from my example. The first is the root (hd0,0). That is the partition in which the kernel is located. GRUB doesn't discriminate between the old IDE drives and the newer SATA drives, so even though my example looks like it links only to hda1, it also links to sda1. The first 0 refers to the drive letter, in this case "a" while the second number refers to the partition number both starting from 0. For example, hd(2,1) could be either hdc2 or sdc2. Just make sure you get the correct partition that has the kernel in it.

The next part selects which kernel we're going to be using from the partition. We know it's in /dev/sda1, so we just need to find it a bit more specifically. In this case the kernel is located in /boot, and then we identify which kernel.

The next part on the same line after that identifies the real root directory. Basically where / is located. This time, it does discriminate between the old IDE drivers and the newer SATA drivers, but it is exactly the way "fdisk" would show it, and in the example, it's /dev/sda1.
 
Old 04-05-2012, 09:21 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Using the correct command would be a good place to start. Boot in to Debian and log in as root in a terminal. If you have the latest version of Debian, it is using Grub2. As root run: update-grub rather than grub-update.

If that is just a typo and you actually ran the correct command, it would be useful if you gave some detail about what actually happens.

If you have an older version of Debian with Grub Legacy, the suggestions above should work but I would expect to find a menu.lst file and not a grub.conf file in the /boot/grub/ directory.
 
Old 04-05-2012, 10:50 AM   #4
autior
LQ Newbie
 
Registered: Apr 2012
Location: Italy - Naples
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TommyC7 View Post
You might have to edit the grub configuration file by hand.
Code:
editor /boot/grub/grub.conf
Then you'll need to add in Slackware into that file, something like...
Code:
title Slackware
root (hd0,0)
kernel /boot/vmlinuz-<kernel> root=/dev/sda1
There will be a few things you need to manually change from my example. The first is the root (hd0,0). That is the partition in which the kernel is located. GRUB doesn't discriminate between the old IDE drives and the newer SATA drives, so even though my example looks like it links only to hda1, it also links to sda1. The first 0 refers to the drive letter, in this case "a" while the second number refers to the partition number both starting from 0. For example, hd(2,1) could be either hdc2 or sdc2. Just make sure you get the correct partition that has the kernel in it.

The next part selects which kernel we're going to be using from the partition. We know it's in /dev/sda1, so we just need to find it a bit more specifically. In this case the kernel is located in /boot, and then we identify which kernel.

The next part on the same line after that identifies the real root directory. Basically where / is located. This time, it does discriminate between the old IDE drivers and the newer SATA drivers, but it is exactly the way "fdisk" would show it, and in the example, it's /dev/sda1.
I have tried to modify the file '/etc/grub.d/40_custom' writing the three lines as you suggested, so now it look like this:
Code:
#!/bin/sh
exec tail -n +3 $0
title Slackware 13.37
root (hd0,8)
#The Slackware partition is sda9, I used fdisk to bbe sure of that
kernel /boot/vmlinuz-2.6.32-5-amd64 root=/dev/sda9
#Simply the kernel I found in the /boot/
But no new line appeared in Grub menu. Then I tried to do update-grub again, but nothing changed..

Quote:
Originally Posted by yancek View Post
Using the correct command would be a good place to start. Boot in to Debian and log in as root in a terminal. If you have the latest version of Debian, it is using Grub2. As root run: update-grub rather than grub-update.

If that is just a typo and you actually ran the correct command, it would be useful if you gave some detail about what actually happens.

If you have an older version of Debian with Grub Legacy, the suggestions above should work but I would expect to find a menu.lst file and not a grub.conf file in the /boot/grub/ directory.
I'm sorry, I was referring to update-grub, my bad. Anyway yes, I'm using the latest version of Debian, and installed GRUB (version: 1.98+20100804-14+squeeze1) in the MBR. I have 4 OS installed in the Hard Disk: Windows 7, Debian Squeeze, Fedora 16 and Slackware 13.37, and everything except Slackware have been recognized by GRUB (that, anyway, don't give me any error or something). When I installed Slackware I haven't installed LILO... I don't know what other info could be useful, just ask me and I'll do my best.
 
Old 04-05-2012, 02:17 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
The suggestions by TommyC7 will only work on Grub Legacy which you do not have. When you run update-grub, do you not see any output referring to Slackware?

The easiest way to get information so that someone can help you would be to run the bootinfoscript and post the results.txt file here. That will provide detailed information on your boot files and partitions. The link to it is below, read the instructions first:

http://sourceforge.net/projects/bootinfoscript/
 
  


Reply



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
How to boot Slackware 13.37 from grub for first time? Blaeu Linux - Newbie 1 11-28-2011 09:32 PM
[SOLVED] How come I can't edit /boot/grub/grub.conf or /boot/grub/menu.lst in Fedora 14? trien27 Fedora 4 01-22-2011 04:02 PM
boot loader (grub - slackware) sycamorex Slackware 6 06-11-2006 04:45 AM
Episode III Revenge of the Sith jaz General 53 06-10-2005 12:28 AM
grub can not boot slackware? shanenin Linux - Software 5 11-28-2003 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration