LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 02-17-2011, 07:38 PM   #1
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Rep: Reputation: 7
Slackware13.1/ubuntu10.10 dual-boot grub2 question


I have read that installing ubuntu 10.10 will inevitably install grub2 with it(unless you use flash drive workaround). i am wondering how slackware 13.1 reacts to grub2.
Does it go on like nothings changed (if configured correctly)?
Or does it freak out and have a fit?

If slackware doesn't play nice with grub2. i don't think i will use ubuntu 10.10.
 
Old 02-17-2011, 08:10 PM   #2
tacticalbread
Member
 
Registered: Jan 2011
Location: IN
Distribution: Arch x64 multilib
Posts: 79

Rep: Reputation: 13
I had Ubuntu 10.10 installed with GRUB2, then I installed Slackware, added Slackware to GRUB2's menu, and had no problems.

unrelated question: If you already run Slackware, why install Ubuntu? o:
 
Old 02-17-2011, 08:18 PM   #3
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by tacticalbread
I had Ubuntu 10.10 installed with GRUB2, then I installed Slackware, added Slackware to GRUB2's menu, and had no problems.
Ok. Thanks for the info. :D
Does grub2 have the same syntax as grub1?

Quote:
Originally Posted by tacticalbread
unrelated question: If you already run Slackware, why install Ubuntu? o:
The very first linux i experienced was ubuntu. i still prefer ubuntu over slackware. however, slackware is my work os and learn how to use linux os.

EDIT:
Is there some way to permenately disable emoticons in my posts?
Rather than the manual way for each post?

Last edited by ewsmith; 02-17-2011 at 08:20 PM.
 
Old 02-17-2011, 08:20 PM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,439

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Quote:
Originally Posted by ewsmith View Post
Does grub2 have the same syntax as grub1?
Nope.
 
Old 02-17-2011, 08:22 PM   #5
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Richard Cranium View Post
Nope.
Time to consult the oracle.
 
Old 02-17-2011, 08:22 PM   #6
tacticalbread
Member
 
Registered: Jan 2011
Location: IN
Distribution: Arch x64 multilib
Posts: 79

Rep: Reputation: 13
Quote:
Originally Posted by ewsmith View Post
Ok. Thanks for the info.
Does grub2 have the same syntax as grub1?
nope, Grub2 is actually quite a bit different.

https://help.ubuntu.com/community/Grub2
 
Old 02-17-2011, 10:19 PM   #7
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,229

Rep: Reputation: 286Reputation: 286Reputation: 286
Quote:
Originally Posted by ewsmith View Post
i am wondering how slackware 13.1 reacts to grub2.
Does it go on like nothings changed (if configured correctly)?
Or does it freak out and have a fit?
I have been booting Slackware from Ubuntu's grub2 ever since Ubuntu switched to grub2. Here is my experience:
I install Ubuntu first and let grub2 control the MBR.
When I install Slackware I choose to not install lilo.
Then I boot into Ubuntu and run: "sudo update-grub".
This will create 4 entries in the grub2 menu for booting Slackware. One each for the huge, huge-smp, generic, and generic-smp kernels.
Then when you create an initrd to boot the Slackware generic-smp kernel, running "sudo update-grub" from Ubuntu will for some reason not add the initrd line that you need to boot Slackware's generic-smp kernel.
The solution is to create a custom boot entry for booting Slackware's generic-smp kernel. The details on how to do that are in the link that tacticalbread posted:
https://help.ubuntu.com/community/Gr...Menu%20Entries
For reference, here is my custom boot entry for booting Slackware 13.1 32 bit that I have installed on /dev/sda5:
Code:
echo "Adding Slackware32-13.1 on /dev/sda5" >&2
cat << EOF
menuentry "Slackware32-13.1 on /dev/sda5" {
        set root=(hd0,5)
        linux  /boot/vmlinuz-generic-smp-2.6.33.4-smp root=/dev/sda5 ro 
        initrd  /boot/initrd.gz
}
EOF
Note: You don't need the line that starts with echo, or the EOF stuff. That is just there to provide visual feedback when running "sudo update-grub". All that you really need is:
Code:
menuentry "Slackware32-13.1 on /dev/sda5" {
        set root=(hd0,5)
        linux  /boot/vmlinuz-generic-smp-2.6.33.4-smp root=/dev/sda5 ro 
        initrd  /boot/initrd.gz
}
Note2: You may need to start your custom boot entry with these 2 lines as in the tutorial I linked to:
Code:
#!/bin/sh
exec tail -n +3 $0
I have never needed those lines at the beginning of my custom boot entries for some reason. However, some people in the Ubuntu forums were not able to boot other linux distros with grub2 without starting their custom boot entries with those lines.
Write back if you need more help. And read that tutorial on grub2. It has all you need to know.

Last edited by tommcd; 02-17-2011 at 10:28 PM.
 
Old 02-17-2011, 10:50 PM   #8
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 60
Grub2 will boot Slackware just fine. If you're into letting LILO boot Ubuntu, you might run into some problems because Ubuntu's boot process is not clear. I tried to do that and had no success. I have a thread in their forums asking for more information and no one was able to suggest me anything.
 
Old 02-17-2011, 11:27 PM   #9
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 517

Rep: Reputation: 132Reputation: 132
Yesterday I installed Slackware on GPT partitions (just for fun), and since Grub Legacy doesn't support GPT, I'm using Grub2.

All is working well.

If you're using one of the generic kernels, make sure your initrd is named like "initrd.img-`uname -r`" instead of the usual "initrd.gz". Otherwise, grub2 won't automatically detect it.

Last edited by piratesmack; 02-17-2011 at 11:39 PM.
 
1 members found this post helpful.
Old 02-18-2011, 07:42 PM   #10
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: 7
I got grub2 booting both ubuntu and slackware. i had to wipe my disk to do it, though. the placement sort of screwed saving anything.
but it gave me an excuse to nuke my windows partition, so i'm happy.

I have one problem now. i used some script to make an initrd, but i forgot what it was... :[

EDIT:
i have slackware and ubuntu sharing /home on a separate partition.
thanks to whoever gave me the idea (i forgot who :/).

Last edited by ewsmith; 02-18-2011 at 07:46 PM.
 
Old 02-18-2011, 08:05 PM   #11
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
I have one problem now. i used some script to make an initrd, but i forgot what it was... :[
In Slackware jut run :
Code:
su -c "$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)"
and it will make you an initrd at /boot/initrd.gz to suit your running kernel and filesystem options.
 
1 members found this post helpful.
Old 02-18-2011, 08:18 PM   #12
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by bgeddy View Post
In Slackware jut run :
Code:
su -c "$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)"
and it will make you an initrd at /boot/initrd.gz to suit your running kernel and filesystem options.
That's it! thanks!
 
Old 02-18-2011, 09:23 PM   #13
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,229

Rep: Reputation: 286Reputation: 286Reputation: 286
Quote:
Originally Posted by piratesmack View Post
If you're using one of the generic kernels, make sure your initrd is named like "initrd.img-`uname -r`" instead of the usual "initrd.gz". Otherwise, grub2 won't automatically detect it.
Thanks a lot for this. So this is why Ubuntu's grub2 never finds the initrd for Slackware's generic-smp kernel.

I just checked my Xubuntu install and, indeed, the Xubuntu 10.10 initrd is named
initrd.img-2.6.35-25-generic instead of just initrd.gz.
 
Old 02-19-2011, 08:27 AM   #14
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by piratesmack
If you're using one of the generic kernels, make sure your initrd is named like "initrd.img-`uname -r`" instead of the usual "initrd.gz". Otherwise, grub2 won't automatically detect it.
I forgot to mention, i have no problem with the default name for the kernel.
I prefer to edit text files for customizing. so i made a 10_ubuntu and an 11_slackware in /etc/grub.d/ and turned of the executable bit on 10_linux and 30_osprober.
 
  


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
[SOLVED] How to repair grub2 in MBR? win7/10.10 dual boot. Nizzok Linux - Newbie 9 01-11-2013 09:56 AM
[SOLVED] Cannot boot slackware13, even with the slackware13 created flashdrive yanfaun Slackware 59 02-13-2011 06:40 PM
[SOLVED] Editing the grub2 boot menu in a dual boot machine Chriscrof Linux - Newbie 13 07-15-2010 01:14 AM
Problems with dual boot, grub2 auto os prober mhbell Ubuntu 2 11-04-2009 10:11 AM


All times are GMT -5. The time now is 12:31 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