Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel unknown-block(1,0)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Sat Dec 09, 2006 2:06 am    Post subject: genkernel unknown-block(1,0) Reply with quote

Hi,
After building the kernel with the genkernel script, installing it and lanching with grub I get to the message which says that there is a kernel panic because no filesystems could be mounted for root on an unknown-block(1,0).

My machine has the following disks connected:
ATA
SATA
USB-card reader which is empty

I boot and work off SATA. ATA is just sitting there for backup purposes.

Now this is my config in grub:

Code:

title=Gentoo Linux (2.6.18-gentoo-r3)
root (hd0,0)
kernel (hd0,0)/kernel-genkernel-x86_64-2.6.18-gentoo-r3 root=/dev/ram0 init=/linuxrc \ real_root=/dev/sda3 udev video=vesafb:ywrap,mtrr,pmipal vga=0x318 \ splash=silent,fadein,theme:livecd-2006.1 quiet CONSOLE=/dev/tty1
inird (hd0,0)/initramfs-genkernel-x86_64-2.6.18-gentoo-r3


I took the initial kernel config file from the genkernel package that is installed on my system and not from a liveCD, from the directory: /usr/share/genkernel/x86_64/kernel-config-2.6

I copied that file into /usr/src/linux/.config and issued the command make --oldconfig.
then genkernel all --install and blah blah.

Upon a reboot I get a kernel panic which i already mentioned.

Where to look for clues?

Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
aysther
n00b
n00b


Joined: 05 Sep 2005
Posts: 68
Location: Charlotte, NC

PostPosted: Sat Dec 09, 2006 2:35 am    Post subject: Reply with quote

Adding "udev" to the boot options in grub.conf solved my problem.

Code:
title=Gentoo
root (hd0,2)
kernel /boot/vmlinuz root=/dev/sda6 udev

_________________
Microsoft Ceo "I'm Going to F'ing Kill Google."
Back to top
View user's profile Send private message
richfish
Apprentice
Apprentice


Joined: 03 Mar 2006
Posts: 202
Location: Phoenix, AZ

PostPosted: Sat Dec 09, 2006 4:24 am    Post subject: Re: genkernel unknown-block(1,0) Reply with quote

agrypa1 wrote:
Hi,
After building the kernel with the genkernel script, installing it and lanching with grub I get to the message which says that there is a kernel panic because no filesystems could be mounted for root on an unknown-block(1,0).


1,0 would be the ramdisk....

agrypa1 wrote:

Code:

title=Gentoo Linux (2.6.18-gentoo-r3)
root (hd0,0)
kernel (hd0,0)/kernel-genkernel-x86_64-2.6.18-gentoo-r3 root=/dev/ram0 init=/linuxrc \ real_root=/dev/sda3 udev video=vesafb:ywrap,mtrr,pmipal vga=0x318 \ splash=silent,fadein,theme:livecd-2006.1 quiet CONSOLE=/dev/tty1
inird (hd0,0)/initramfs-genkernel-x86_64-2.6.18-gentoo-r3



...based on the filename I suspect that genkernel built an initramfs instead of an initrd. Verify that with:

zcat /boot/initramfs-genkernel-x86_64-2.6.18-gentoo-r3 | cpio --list

If the above command outputs file names, you have an initramfs. To fix your problem, try removing the root= and init= options. For an initramfs, only /init is possible (genkernel takes care of renaming linuxrc to init, btw), and root= is nonsensical. Note that with an initramfs, and genkernel 3.4.4 or later, you can use either root=/dev/sda3 or real_root=/dev/sda3 to boot your system...the choice is yours.

My other idea is...what is with the '\' characters appearing on the kernel command line in your original post? Do they actually appear in your grub.conf file? Are they being used to try and escape the end-of-lines? If so, remove them and make sure all the kernel options are on a single line.
Back to top
View user's profile Send private message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Sat Dec 09, 2006 4:43 am    Post subject: Re: genkernel unknown-block(1,0) Reply with quote

HI, this is what I get when genkernel script finishes:
Code:

 Merging
*     initramfs-base-layout.cpio.gz
*     initramfs-aux.cpio.gz
*     initramfs-busybox-1.1.3+gentoo.cpio.gz
*     initramfs-insmod-0.9.15-pre4.cpio.gz
*     initramfs-modules-2.6.18-gentoo-r3.cpio.gz
*
* Kernel compiled successfully!
*
* Required Kernel Parameters:
*     real_root=/dev/$ROOT
*
*     Where $ROOT is the device node for your root partition as the
*     one specified in /etc/fstab
*
* If you require Genkernel's hardware detection features; you MUST
* tell your bootloader to use the provided INITRAMFS file. Otherwise;
* substitute the root argument for the real_root argument if you are
* not planning to use the initrd...

* WARNING... WARNING... WARNING...
* Additional kernel cmdline arguments that *may* be required to boot properly...

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest genkernel before reporting bugs.


The command that you suggested to check gives this result:

Code:

localhost boot # zcat /boot/initramfs-genkernel-x86_64-2.6.18-gentoo-r3 | cpio --list
.
etc
etc/fstab
temp
var
var/lock
var/lock/dmraid
dev
dev/console
dev/null
dev/tty1
proc
lib64
sbin
sys
bin
usr
usr/sbin
usr/bin
5 blocks


Now what is the difference between initrd image and initramfs image? Are you are suggesting that my genkernel script did something that was not meant to be done?

Aha, and my genkernel version is 3.4.4.
The "\" characters I added to the post just to assure the readers that they ARE on the same line :-) sorry for the confusion. The BBcode would wrap them up, that's why.
Thanks for any info.
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
richfish
Apprentice
Apprentice


Joined: 03 Mar 2006
Posts: 202
Location: Phoenix, AZ

PostPosted: Sat Dec 09, 2006 5:06 am    Post subject: Re: genkernel unknown-block(1,0) Reply with quote

agrypa1 wrote:

Now what is the difference between initrd image and initramfs image? Are you are suggesting that my genkernel script did something that was not meant to be done?


No no, not at all. initramfs is fine, and in fact I use one to boot my system. :-) You just don't need the init= or real_root= options in this case.

So try adding this entry to your grub.conf and booting with it:

Code:

title Safe
    kernel (hd0,0)/kernel-genkernel-x86_64-2.6.18-gentoo-r3 root=/dev/sda3
    initrd (hd0,0)/initramfs-genkernel-x86_64-2.6.18-gentoo-r3


If that works, then you can fiddle with adding back in all of the splash and video options.

As to the question of the difference....an initrd uses a ramdisk as its initial "root" filesystem. A ramdisk is a block device that consumes some pre-defined amount of memory, and can be formatted with any desired filesystem. In contrast an initramfs is just a compressed archive of files that can be extracted into the rootfs (the *real* root of the mount heirarchy in linux, all filesystems including / mount under rootfs.) The advantages of initramfs over initrd are:

1. it is available much earlier in the boot process. An initrd cannot be mounted until the kernel itself is basically booted and ready to mount the root filesystem. An initramfs is available even before any drivers start. This is good for things like pretty splash screens that you want to appear as soon as possible. :-)

2. it doesn't consume a fixed amount of space...it only consumes as much RAM as the files it contains, and that RAM is reclaimed as soon as the files are removed (which is done by the genkernel init when they are no longer needed).
Back to top
View user's profile Send private message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Sat Dec 09, 2006 5:21 am    Post subject: Re: genkernel unknown-block(1,0) Reply with quote

Hi,
I have succesfully booted with the lines you recommended in the previous post. My intention to try genkernel in the first place was to see the same booting messages as the livecd. I do not see the "detecting hardware" message. Why?
I presume it is because of the missing root=/dev/ram0 line. But when I try to boot with this line the system ends up with kernel panic. I am stunned. Where do I miss a point. I've read howtos and tips and tricks on gentoo-wiki.com and the docs from gentoo.org site.

Agyppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
richfish
Apprentice
Apprentice


Joined: 03 Mar 2006
Posts: 202
Location: Phoenix, AZ

PostPosted: Sat Dec 09, 2006 5:31 am    Post subject: Re: genkernel unknown-block(1,0) Reply with quote

agrypa1 wrote:
Hi,
I have succesfully booted with the lines you recommended in the previous post. My intention to try genkernel in the first place was to see the same booting messages as the livecd. I do not see the "detecting hardware" message. Why?


Well 2 things possibly:

1. What options did you give to genkernel when you ran it? I would expect --initramfs and --gensplash to be useful options for you. And looking more closely at the listing you posted earlier, it looks like the init script and bootsplash stuff is missing from the initramfs even.

2. Because I had you remove all of the video= and splash= options on the kernel command line. If you kept (or recreate) that same entry, you can try it again.

agrypa1 wrote:

I presume it is because of the missing root=/dev/ram0 line. But when I try to boot with this line the system ends up with kernel panic.


Can you tell at what point that happens? Is it after starting some specific service? Or before starting anything?
Back to top
View user's profile Send private message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Sat Dec 09, 2006 6:14 am    Post subject: Re: genkernel unknown-block(1,0) Reply with quote

Hi,
the kernel panic occurs with root=/dev/ram0 init/=linuxrc entries. It doesn't happen with real_root=/dev/sda3 only entry.

The panic message is displayed before any service gets launched but after several other communiques about disks, ACPI, CPU ann so on.

Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum