LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Issue Booting Slackware 13 with Grub (https://www.linuxquestions.org/questions/slackware-14/issue-booting-slackware-13-with-grub-773467/)

grady34 12-04-2009 09:42 AM

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

abrouwers 12-04-2009 11:21 AM

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!

grady34 12-04-2009 11:29 AM

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.

abrouwers 12-04-2009 11:43 AM

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

grady34 12-05-2009 09:18 AM

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.

colorpurple21859 12-05-2009 09:34 AM

if you have ide harddrives use root=/dev/hda7

grady34 12-05-2009 09:36 AM

Two SATA drives unfortunately.

colorpurple21859 12-05-2009 10:17 AM

you initrd most likley needs to be redone. doesn't look like the modules are getting loaded to access your sata drives

colorpurple21859 12-05-2009 10:40 AM

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

abrouwers 12-05-2009 01:51 PM

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.

zordrak 12-05-2009 05:00 PM

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/

grady34 12-09-2009 07:42 PM

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!

arubin 12-10-2009 05:31 AM

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?

zordrak 12-10-2009 05:34 AM

Quote:

Originally Posted by grady34 (Post 3786042)
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 (Post 3786497)
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".

arubin 12-10-2009 05:48 AM

Or rather sd0,6


All times are GMT -5. The time now is 02:21 PM.