LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Unable to mount root File system (http://www.linuxquestions.org/questions/slackware-14/unable-to-mount-root-file-system-605309/)

C-Sniper 12-07-2007 11:09 PM

Unable to mount root File system
 
Yes i realize there have been many threads about this problem. I have searched them all too. I only have a quick question though. Would upgrading to a different kernel (2.6.23.9) solve my problems with this since it would be running a generic kernel, or would it still be as if i am running the huge.s kernel?
Thanks

evilDagmar 12-08-2007 02:31 AM

With what information you've given, there's no guarantee anything will work.

Why it can't mount the filesystem actually matters. We need more information.

GushpinBob 12-08-2007 02:35 AM

I can't remember off the top of my head what file systems are compiled within the huge.s kernel by default. OTOH, Could you tell us what file system you're using for your / partition? Ext2/3? Reiser? XFS? FAT32 (God forbid...)?

C-Sniper 12-08-2007 10:17 AM

hmmm well the new kernel didn't work so here i go.
EXT2 FS
here's he error im getting at boot
Code:

Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown block (3,1)
i read up on how to make an initrd but im still not quite grasping what it is that i should do with that.

I have also read the CHANGES.txt and the other things PV released with Slack 12.0.
The main thing i noticed is that this happens when i disable the RAID option in my kernel. However i have a laptop which does not support RAID.

onebuck 12-08-2007 10:46 AM

Hi,

Create a initrd for the kernel. Read the '/boot/README.initrd'. Then edit '/etc/lilo.conf' to add the initrd to the correct stanza. Be sure to run 'lilo' again.

C-Sniper 12-08-2007 12:40 PM

ok so i did
cd /boot
mkinitrd -f ext2
nano /etc/lilo.conf
added initrd = /boot/initrd.gz
/sbin/lilo
reboot

**edit**
well that didn't work at all.

ok re-installed Slack 12.0
new question:
After i install and get everything running should i upgrade the kernel to the 2.6.23.9? i am guessing that the ones supplied from www.kernel.org are the "generic kernels" am i correct?

H_TeXMeX_H 12-08-2007 02:50 PM

The kernels found at kernel.org are the genuine Linux kernels. 'generic kernel' is a term used (in Slackware) to denote a kernel that is generic (can be used for day to day activities), a 'huge kernel' on the other hand is huge and bloated and may cause problems when run for daily use ... however it is useful when installing because it has more built-in and has reduced chance of not having something you need compiled in resulting in hardware not being detected. So, you can get a kernel from kernel.org and apply a config to it. If you want, you can copy in a 'generic' config or a 'huge' config file (found on the slackware disk), and start from there.

Code:

Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown block (3,1)
This error usually suggests that the kernel you are using does not have the proper drivers built-in in order to mount your root filesystem. It's likely that whatever drivers you need are not built-in but are modules instead.

Alien_Hominid 12-08-2007 05:01 PM

I suggest not to use .23 kernel. Everything what I've heard about them are complaints.

C-Sniper 12-08-2007 05:10 PM

can you post a .22 kernel then? or is there an archive i can dig through to find old ones?

GushpinBob 12-08-2007 07:02 PM

Look on kernel.org. They have an archive of linux kernels going back to the pre-1.0 days.


EDIT:

I have been using 2.6.23.9 for a couple of weeks now and have yet to run into any problems (other than forgetting to compile a module, but that's my error :) ).

onebuck 12-08-2007 07:55 PM

Hi,

Quote:

Originally Posted by C-Sniper (Post 2984127)
ok so i did
cd /boot
mkinitrd -f ext2
nano /etc/lilo.conf
added initrd = /boot/initrd.gz
/sbin/lilo
reboot

**edit**
well that didn't work at all.

ok re-installed Slack 12.0
new question:
After i install and get everything running should i upgrade the kernel to the 2.6.23.9? i am guessing that the ones supplied from www.kernel.org are the "generic kernels" am i correct?

You didn't create your initrd properly for your filesystem.

Quote:

excerpt from /boot/README.initrd;

Here's another example: Build an initrd image using Linux 2.6.21.5-smp
kernel modules for a system with an ext3 root partition on /dev/hdb3.

mkinitrd -c -k 2.6.21.5-smp -m ext3 -f ext3 -r /dev/hdb3

Apparently you did read the /boot/README.initrd.

Not to difficult.

C-Sniper 12-08-2007 08:23 PM

well i also did
mkinitrd -m ext2
and rebooted (yes i did run lilo)
still nothing then
mkinitrd --help
mkinitrd -f ext2

ah i see.... i forgot the -r argument.
whoops.

onebuck 12-08-2007 08:45 PM

Hi,

Quote:

Originally Posted by C-Sniper (Post 2984456)
well i also did
mkinitrd -m ext2
and rebooted (yes i did run lilo)
still nothing then
mkinitrd --help
mkinitrd -f ext2

ah i see.... i forgot the -r argument.
whoops.


Quote:


MKINITRD(8)

NAME
mkinitrd - create or rebuilt an initrd (initial ramdisk) using
initramfs (simple cpio+gzip).

SYNOPSIS
mkinitrd [ -c ] [ -f filesystem ] [ -k kernel_version ] [ -m mod-
ule1:module2:module3... ] [ -o output_file ] [ -r root_device ] [ -s
source_tree ] [ -C ] [ -L ] [ -V ]

DESCRIPTION

mkinitrd is used to build an initial ramdisk. An initial ramdisk is a
very small set of files that are loaded into RAM and "mounted" (as
initramfs doesn't actually use a filesystem) as the kernel boots
(before the main root filesystem is mounted). The usual reason to use
an initrd is because you need to load kernel modules before mounting
the root partition. Usually these modules are required to support the
filesystem used by the root partition (ext3, reiserfs, xfs), or perhaps
the controller that the hard drive is attached to (SCSI, RAID, etc).
Essentially, there are so many different options available in modern
Linux kernels that it isn't practical to try to ship many different

kernels to try to cover everyone's needs. It's a lot more flexible to
ship a generic kernel and a set of kernel modules for it.

OPTIONS
-c Clear the existing initrd tree (by default in /boot/initrd-
tree/) first. If this is not done, running mkinitrd will add
additional modules to the existing initrd.

-f filesystem
Specify the filesystem to use for the root partition. If this
isn't given, mount will usually figure it out. This option must
be used together with the -r option in order to be beneficial.

--help Display a help summary.

-k kernel version
Use kernel modules from the specified kernel version. mkinitrd
will look for them in /lib/modules/(kernel version).

-m module list
This is a list of colon-delimited modules to build into the ini-
trd. Any dependencies of requested modules will also be added
to the initrd. Additional options may be added to use when
loading the kernel modules (but in this case the entire list
must be wrapped with double quotes).

-o output image
The file to write the initrd to. (default: /boot/initrd.gz)

-r root partition
Specify the device to be used as the root partition. If this
isn't given, the kernel default will be used (which is usually
fine). This option must be used together with the -f option in
order to be beneficial.


mkinitrd -c -k 2.6.21.5-smp -m ext2 -f ext2 -r /dev/hdb3

If your kernel is;
-c clear tree
-k 2.6.21.5-smp
-m module list
-m module is ext2
-f filesystem
-r root partition

As I stated not that difficult if you read. 'man mkinitrd' will get the rest. Read the '/boot/README.initrd', the information is there. That's all folks!

Your re-install of Slackware 12 was not necessary.

pappy_mcfae 12-09-2007 06:44 AM

Just to make sure I don't get clobbered by the gurus, let me tell you I am no guru. With that said, your kernel panic is most likely caused by the fact that you didn't compile file system support into your kernel. You set it up as a module, and that never works...at least for me. Try compiling the kernel with file system support directly compiled into your kernel.

The 2.6.23.x kernels DO run some machines without troubles. One of my Slackware machines runs 2.6.23.1, and my Debian print server is using 2.6.23.9. They are both happily running even now.

However, it is my experience that 2.6.23.x kernels really mess with wireless networking. I'm not sure the reason why. I just know that every attempt to run a 2.6.23.x kernel on either this system, or my other laptop with wireless networking has resulted in serious instability issues, and the inability to issue iwconfig commands without locking the wireless adapter.

The 2.6.22.x family, on the other hand supports wireless networking perfectly. Therefore, both of my laptops currently run kernel version 2.6.22.14.

None of my machines have kernel panic troubles. They did until I figured out that setting up file system support as a module is a bad idea...at least my machines seem to think so.

Blessed be!
Pappy

duryodhan 12-09-2007 09:31 AM

Quote:

They did until I figured out that setting up file system support as a module is a bad idea..

its not that ... all of the major distros keep file system support as modules ..

the problem is creating a proper initrd . Although Pat has given a proper readme etc. etc., I don't think it is all working out properly. maybe the next slack would have a better script / ncurses menu based generator for the initrd.

my personal experience was I upgraded to slack 12 , but couldn't get the initrd working properly .. I just used huge26 for a boot, recompiled my own kernel and started working on that. but for noobs , this is a major and unnecessary pain imho.


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