LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-10-2009, 08:59 AM   #16
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 287Reputation: 287Reputation: 287

Grady34,
You need to first make an initrd for the generic kernel as others have said. Read the README in the /boot directory on your Slackware system for instructions on how to do that. You can boot Slackware to the huge kernel from the first install CD or the DVD by running the command that is listed when you boot up the first CD or DVD.
The command for creating the initrd will be something like:
Code:
mkinitrd -c -k 2.6.29.5 -m mbcache:jbd:ext3 -f ext3 -r /dev/hdb3
That is one of the examples in the README. For my system using ext4 file system for Slackware on /dev/sda6 I used:
Code:
mkinitrd -c -k 2.6.29.6 -m ext4 -f ext4 -r /dev/sda6
I boot Slackware 13 64bit from grub2 on Ubuntu 9.10. You will probably need to create a custom entry in /etc/grub.d/ to boot Slackware, as I did. I would recommend reading this tutorial from the Ubuntu wiki:
https://wiki.ubuntu.com/Grub2
The specific part about creating custom entries is here:
https://wiki.ubuntu.com/Grub2#User-defined Entries
For reference, here is my custom entry for booting Slackware 13 64bit on /dev/sda6.
NOTE: You will need to change the partition number and UUID number according to your system:
Code:
echo "Adding Slackware64-13.0 on /dev/sda6" >&2
cat << EOF
menuentry "Slackware64-13.0 on /dev/sda6" {
        set root=(hd0,6)
        linux  /boot/vmlinuz-generic-2.6.29.6 root=UUID=548056ce-800a-4621-9fbd-4a9dd226e094 ro 
        initrd  /boot/initrd.gz
}
EOF
It worked perfectly. Grub2 is a bit more complicated than grub-legacy. We will have to get used to that.
Remember, grub2 counts hard drives from zero, as grub-legacy did. But partitions are counted from 1, not zero. So /dev/sda1 would be (hd0,1) in grub2-speak. In grub-legacy-speak it would have been (hd0,0).

Last edited by tommcd; 12-10-2009 at 09:22 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-10-2009, 10:58 AM   #17
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Rep: Reputation: 55
arubin:
Quote:
Doesn't sda7 correspond to hd0,6?
No. That's one of the things they changed in GRUB2. The disk counting is still indexed to "0", but the partition counting starts with "1". See this thread.
Quote:
Or rather sd0,6
No. They are all "hd" to GRUB.
Regards,
Bill
 
Old 12-11-2009, 07:53 AM   #18
grady34
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Problem with that is that I can boot in to the huge kernel no problem with the exact same grub menu entry.
 
Old 12-11-2009, 09:31 AM   #19
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 115Reputation: 115
So with huge you boot ok, with generic you cannot see the block device.

Perhaps the generic kernel does not have drivers for your SATA controller. You should check what driver is required and either add it into the initrd or compile a custom kernel based on the generic config that includes the controller.
 
Old 12-12-2009, 08:09 AM   #20
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 287Reputation: 287Reputation: 287
Quote:
Originally Posted by grady34 View Post
Problem with that is that I can boot in to the huge kernel no problem with the exact same grub menu entry.
This is because the grub2 in Ubuntu (and Mint) does not add the initrd line that the generic kernel needs to boot. This is why you can boot the huge kernel, bucause it does not need an initrd. I had the same problem. That is why I created a custom entry to boot Slackware with the generic kernel as I discussed in my last post (post #16 in this thread).
 
Old 12-13-2009, 10:31 AM   #21
grady34
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Talking

Thanks tommcd, that was it.

I ran mkinitrd, and I manually edited the grub commands upon start up to point to the initrd, but with only the reiserfs.ko added it wasn't recognizing my SATA drives. Added a custom item that included the initrd line so that I don't have to type it every time, redid my mkinitrd with the options you mentioned and everything is booting properly now.

One last question -- now that grub2 is all automated and they tell you not to edit grub.cfg, is there a way for me to remove these non-working entries that don't have the initrd? From reading through the link you posted I can't think of anything short of manually editing it out, which I assume would be erased any time I did update-grub.

Not crucial, just to sooth my OCD...
 
Old 12-13-2009, 02:26 PM   #22
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Rep: Reputation: 55
grady34
Quote:
One last question -- now that grub2 is all automated and they tell you not to edit grub.cfg
I haven't found a howto simple enough to explain to me the use of grub2's automated configuration. (If someone has found/written one, let me know.) Meanwhile, I am editing grub.cfg by hand & having no problems. I would think that if you don't get too elaborate with your configuration, editing by hand would be OK.
Regards,
Bill
 
Old 12-14-2009, 11:01 AM   #23
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 287Reputation: 287Reputation: 287
Quote:
Originally Posted by grady34 View Post
Thanks tommcd, that was it.

I ran mkinitrd, and I manually edited the grub commands upon start up to point to the initrd, but with only the reiserfs.ko added it wasn't recognizing my SATA drives. Added a custom item that included the initrd line so that I don't have to type it every time, redid my mkinitrd with the options you mentioned and everything is booting properly now.
Glad you got things working!! I'm also glad that I could help with this. This moves me up one notch on the grub2 learning curve
Quote:
Originally Posted by grady34 View Post
One last question -- now that grub2 is all automated and they tell you not to edit grub.cfg, is there a way for me to remove these non-working entries that don't have the initrd? From reading through the link you posted I can't think of anything short of manually editing it out, which I assume would be erased any time I did update-grub.
Yes, you are correct that if you manually edit grub.cfg, any changes you made to grub.cfg will be overwritten the next time an update for grub2 or a kernel update comes along, since the update-grub command is automatically run when grub2 or the kernel is updated.

I admit that my grub2 menu is also looking a bit untidy, since I have those non-working Slackware entries in my grub.cfg just like you. The only thing I can think of to remove these non-working entries and tidy up the grub menu would be to add this line to /etc/default/grub
Code:
GRUB_DISABLE_OS_PROBER=true
See the end of this section of the grub2 tutorial from the Ubuntu wiki:
https://wiki.ubuntu.com/Grub2#grub (/etc/default/grub)
Quote:
GRUB_DISABLE_OS_PROBER=true
Enables/disables the os-prober check of other partitions for operating systems, including Windows, Linux, OSX and Hurd.
This would require you to manually add custom rules for booting all other operating systems on your computer, including Windows, to /etc/grub.d as specified here:
https://wiki.ubuntu.com/Grub2#User-defined Entries
Then when you run update-grub the only entries in grub.cfg would be the Ubuntu kernels, the recovery mode options for Ubuntu, plus the custom entries you have created in /etc/grub.d/. All those non-working options would be gone.
Another way to do this would be to remove the executable bit from /etc/grub.d/30_os-prober. To do that just run:
Code:
cd /etc/grub.d/
sudo chmod -x 30_os-prober
So the 30_os-prober script would not be run when grub2 is updated.
You would still need to create custom entries for booting all other operating systems in /etc/grub.d as I have discussed. Then just run:
"sudo update-grub" to have a grub menu exactly as you want it.
I have not disabled 30_os-prober, since I also boot Zenwalk, Debian and WindowsXP, and the os-prober works well for those. So I just live with the untidy non-working Slackware entries.

Last edited by tommcd; 12-14-2009 at 11:30 AM.
 
Old 12-14-2009, 11:25 AM   #24
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 287Reputation: 287Reputation: 287
Quote:
Originally Posted by TSquaredF View Post
grady34
I haven't found a howto simple enough to explain to me the use of grub2's automated configuration. (If someone has found/written one, let me know.)
The best tutorials for grub2 that I have found:
https://wiki.ubuntu.com/Grub2
http://members.iinet.net/~herman546/p20.html
If you find anything else, please post it here.
Quote:
Originally Posted by TSquaredF View Post
Meanwhile, I am editing grub.cfg by hand & having no problems. I would think that if you don't get too elaborate with your configuration, editing by hand would be OK.
There is nothing inherently wrong with editing grub.cfg. It will work. The problem is that anytime the update-grub command is automatically run, your custom edits to grub.cfg will be overwritten, and you will have to redo them. Adding custom entries to /etc/grub.d/ avoids that.
 
  


Reply

Tags
boot, grub, slackware


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 booting issue.... Udhayakrishnan Linux - Software 5 02-05-2009 12:36 AM
booting issue with GRUB threeptxstance Linux - Newbie 3 03-31-2008 03:38 PM
Booting Win2k from Grub SATA issue davnetuk Fedora 2 08-01-2004 09:25 AM
grub booting issue amoulton Linux - Software 5 04-01-2004 07:08 PM
booting issue...error 15 (grub). please help if you can =( bjozsa Linux - General 1 02-17-2004 03:58 PM


All times are GMT -5. The time now is 07:50 PM.

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