LinuxQuestions.org
Register a domain and help support LQ
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-04-2009, 09:42 AM   #1
grady34
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Rep: Reputation: 0
Issue Booting Slackware 13 with Grub


Hi all, somewhat new Linux convert here with a first post.

For a few months I've been running WinXP, Slackware 13 (32-bit) and Linux Mint 7, using Grub as my bootloader. I recently decided to upgrade Mint to 8 and it upgraded Grub to version 1.97~beta4 in the process. It boots in to WinXP and Mint 8 with no problems, but all of the sudden there is a kernel panic when I try to load Slackware 13 (which I did not change).

Here are some details...

Error message (directly following the listing of all partitions):

Quote:
No Filesystem could mount root, tried: romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on uknown-block(8,7)
From grub.cnfg (which as I understand it replaces menu.lst in the updated grub):

Quote:
insmod ext2
set root=(hd0,7)
linux /boot/vmlinuz-generic-2.6.29.6
root = /dev/sda7
It all worked fine before the Mint upgrade, which leads me to believe that something has changed in Grub.

Thanks, and let me know if I can provide any more details.

Mike
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-04-2009, 11:21 AM   #2
abrouwers
Member
 
Registered: May 2005
Location: Michigan
Distribution: Slackware -current
Posts: 98

Rep: Reputation: 37
I see a couple things that could be wrong. The main issue is that you don't have any information relating to the initrd, so the generic kernel won't work here. Which file system are you using?

I would at least add an entry for the huge kernel. For grub2, something like:


menuentry "Slackware 2.6.29.6 huge" {
set root=(hd0,7)
linux /boot/vmlinuz-huge-2.6.29.6 root=/dev/sda7 ro
}


Good luck!
 
Old 12-04-2009, 11:29 AM   #3
grady34
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for the response, I will definitely look in to the initrd. That came up a lot in my searches to try and fix this, but I'm always pretty hesitant to start trying anything resembling a solution until I find the one that makes sense to me. It always leads to a million failed attempts at fixing it by modifying files, adding files, deleting files, etc. and I always feel dirty at the end of that process...I digress.

I'll research the initrd -- don't really understand what it is, but I'm sure a few searches can catch me up.

As far as the huge kernel, I do actually have that. I've got four different menu items for Slackware in grub, but all of them come to a grinding halt with the same kernel panic.
 
Old 12-04-2009, 11:43 AM   #4
abrouwers
Member
 
Registered: May 2005
Location: Michigan
Distribution: Slackware -current
Posts: 98

Rep: Reputation: 37
Alright, a quick kernel how-to lesson for slackware

Slackware provides a huge, and a generic kernel. On 32-bit, it actually provides 2-huge kernels (one for -smp, and one for non-smp CPUs), and 2 generic (again, one -smp, and one for non-smp). Most systems these days can handle -smp kernels (even if they are single-processor), and this is typically the default.

On 64-bit, there are only two kernels - one huge, and one generic. 64-bit capable processors will always handle -smp kernels just fine, so Pat only needs to provide 1 of each.

So, the difference between huge and generic? Huge is, as it sounds, packed with just about every option enabled in the configuration. This means that most stuff, including chipset support, file systems, etc, are built into the kernel. The main use for this is installation, as almost all PC's will be have support without any trouble. However, in day-to-day tasks, it might be a little overkill.

The generic kernel is more modular kernel. So, stuff like file systems, chipset, etc. are all compiled as modules, and loaded only as your system requests it. This means it will run a little more efficiently than the huge kernel, because you are only loading stuff you need.

The huge kernel, since the file system and chipset are built into the kernel, will not require this initrd. However, the generic kernel, which has everything as a module, will. You need to have support in the ram disk for your file system + IDE/sata controller, otherwise the kernel will panic trying to mount your root partition (this is the error you are hitting trying to load that generic kernel).

Check out this document, which kind of explains what an initrd is, why it is used, and even how to create one. If you've been using slackware for a few months, and haven't created one yet, you probably have been using the "huge" kernel up until now. I would at least fix the grub entry to boot this kernel before doing anything else, and then transition to a generic kernel if you'd like.

http://slackware.osuosl.org/slackwar.../README.initrd
 
3 members found this post helpful.
Old 12-05-2009, 09:18 AM   #5
grady34
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for the lesson, very enlightening!

So I understand the concept now, and in fact when I went down to the third option an attempted loading the huge kernel everything worked fine. So it does appear to be an intitrd issue, and I read through that link which makes perfect sense, copied the correct packages off the install dvd, installed them and created my initrd tree with no problems and......

Progress! Still isn't working. Here are the last few lines:

Quote:
initrd.gz: Loading kernel modules from initrd image:
Using /lib/modules/2.6.29.6/kernel/fs/reiserfs/reiserfs.ko
mount: mounting /dev/sda7 on /mnt failed: No such device
At this point it allows me to "try and fix it" but knows there is "trouble ahead".

I followed the instructions to use the reiserfs -- should I be doing the second example for an ext3 system using mbcache, jbd, etc?

Here again I don't really understand what I'm doing. Obviously reiserfs is a type of file system, but is it referring to the one that is used for the initrd, or does it need to match the one slack is on, or...confusion...

Thanks again for all your time, I truly appreciate it.
 
Old 12-05-2009, 09:34 AM   #6
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,348

Rep: Reputation: 184Reputation: 184
if you have ide harddrives use root=/dev/hda7
 
Old 12-05-2009, 09:36 AM   #7
grady34
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Two SATA drives unfortunately.
 
Old 12-05-2009, 10:17 AM   #8
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,348

Rep: Reputation: 184Reputation: 184
you initrd most likley needs to be redone. doesn't look like the modules are getting loaded to access your sata drives
 
Old 12-05-2009, 10:40 AM   #9
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,348

Rep: Reputation: 184Reputation: 184
add this to your mkinitrd

ata_piix libata sd_mod scsi_mod

got it from here:
http://ubuntuforums.org/archive/index.php/t-30233.html
 
Old 12-05-2009, 01:51 PM   #10
abrouwers
Member
 
Registered: May 2005
Location: Michigan
Distribution: Slackware -current
Posts: 98

Rep: Reputation: 37
Cool - glad it made some sense

You are right, you do need reiserfs in there. Basically, the kernel is trying to load support for your root partition, but without the reiserfs module, it won't know how.

So, to fix, boot the huge kernel first, to get into the slackware environment. Then, as the README suggests, something like:

# mkinitrd -c -k 2.6.29.6 -m reiserfs

or, if you're on 32-bit slackware, and trying to use the -smp kernel:

# mkinitrd -c -k 2.6.29.6-smp -m reiserfs

This will add the reiserfs module to the initrd. If you are NOT using reiserfs as your file system, you will have to adjust. For example, "jfs" file system would be:

# mkinitrd -c -k 2.6.29.6 -m jfs

Then, to finish, you need to tell grub about the initrd image. I haven't tried this from grub2, but something like:

menuentry "Slackware 2.6.29.6 generic" {
set root=(hd0,7)
initrd /boot/initrd.gz
linux /boot/vmlinuz-generic-2.6.29.6 root=/dev/sda7 ro
}

I would ADD to your grub.cfg, and keep the huge kernel in there too, "just in case"

Check the name if for the kernel; again, if you are on 32-bit, it may be "vmlinuz-generic-smp-2.6.29.6-smp" or whatever.
 
Old 12-05-2009, 05:00 PM   #11
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 115Reputation: 115
Might i suggest simply making your own generic kernel and completely removing the need for an initrd?

http://blog.tpa.me.uk/2009/08/30/the-evil-of-initrd/
http://blog.tpa.me.uk/2009/08/31/com...ckware-kernel/
http://blog.tpa.me.uk/slackware-kernel-compile-guide/
 
Old 12-09-2009, 07:42 PM   #12
grady34
LQ Newbie
 
Registered: Dec 2009
Posts: 7

Original Poster
Rep: Reputation: 0
More helpful advice from all, but even with the initrd I can't seem to get the non-huge kernels to boot:

Quote:
Using /lib/modules/2.6.29.6-smp/kernel/fs/reiserfs/reiserfs.ko
mount: mounting /dev/sda7 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead...
Same type of message as before. There's gotta be something that I'm missing here. Followed the links to compiling your own kernels, looks very promising and I will no doubt try it in the future when I have more time. For now I'm just going to go ahead with the huge kernel, but it nags at me that I can't figure out what the issue is...

Thanks again to all for your help!
 
Old 12-10-2009, 05:31 AM   #13
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
Quote:
menuentry "Slackware 2.6.29.6 generic" {
set root=(hd0,7)
initrd /boot/initrd.gz
linux /boot/vmlinuz-generic-2.6.29.6 root=/dev/sda7 ro
}
Doesn't sda7 correspond to hd0,6?
 
Old 12-10-2009, 05:34 AM   #14
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by grady34 View Post
Quote:
Using /lib/modules/2.6.29.6-smp/kernel/fs/reiserfs/reiserfs.ko
mount: mounting /dev/sda7 on /mnt failed: No such device
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead...
Quote:
Originally Posted by arubin View Post
Doesn't sda7 correspond to hd0,6?
Certainly seems like he's just pointing to the wrong disk; especially given that its response to the mount request for sda7 is "No such device".
 
Old 12-10-2009, 05:48 AM   #15
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
Or rather sd0,6
 
  


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


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