LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 06-23-2007, 04:54 PM   #1
anon061
LQ Newbie
 
Registered: Apr 2005
Posts: 12

Rep: Reputation: 0
Failed to parse block device name for /dev/hda2


I tried compiling my own kernel. However, when I booted it, I got this message:

Code:
Root device /dev/hda2 doesn't exist, attempting to create it.
ERROR: Failed to parse block device name for /dev/hda2
ERROR: Unable to create/detect root device /dev/hda2
Did I forget to compile in something important?

Googling told me a bunch of stuff about using sd* instead of hd*, but it didn't make a difference.

Any idea what's wrong?

Thanks guys.
 
Old 06-23-2007, 05:12 PM   #2
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Depends on the kernel.

Think most of the newer kernels are going to the /dev/sda* for normal hard drives. Could try appending it to lilo or grub at boot.
 
Old 06-23-2007, 05:16 PM   #3
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware
Posts: 1,377

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Make sure when you compile your kernel that you add IDE support for your drives.
 
Old 06-23-2007, 06:02 PM   #4
anon061
LQ Newbie
 
Registered: Apr 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Hern_28: I tried changing the references in menu.lst and fstab from hd* to sd*, but it didn't work. Thanks though.

vtel57: I've compiled in (not modularized) everything in Device Drivers in the menuconfig that looked important.

EDIT: I tried sticking an old initrd file in there, and somehow it worked. However, it left me with another problem. I'm now stuck at this message:

Code:
VFS: Cannot open root device "hda2" or unknown-block (0,0)
Please append a correct root= boot option.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)
I Googled this, and it seems most people say to make sure both the root FS and initrd support are compiled in, which they already were in my case.

Is this weird?

Last edited by anon061; 06-23-2007 at 06:04 PM.
 
Old 06-23-2007, 06:31 PM   #5
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware
Posts: 1,377

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Create a new initrd image for your custom kernel. The one for the old (stock) kernel probably won't work.

What distro, by the way?

If you compiled the kernel with the libATA drivers, then it will force the kernel to see all devices as SCSI (sd*) devices. This will also limit you to 15 partitions or less on your IDE drives. I HATE libATA. I had to custom compile my Zenwalk kernel to get rid of that crap. I still use LARGE IDE drives with many partitions. libATA is useless on my system.

During the custom compile, depending on what method you used, you needed to make sure, as stated above, that you installed support for IDE drives. If not, then the libATA is probably the default on the kernel you're dealing with, especially if it's a newer kernel (2.6.20+).

Luck!

P.S. Here's a link to a very good kernel compiling tutorial. It might help you out a bit.

http://www.digitalhermit.com/linux/K...ild-HOWTO.html

Last edited by vtel57; 06-23-2007 at 06:40 PM.
 
Old 06-24-2007, 10:24 AM   #6
Nick Dimitri
LQ Newbie
 
Registered: Feb 2006
Location: Athens, Greece
Distribution: Arch (Duke), 2.6.21.5
Posts: 3

Rep: Reputation: 0
Is support for your filesystem compiled?

Quote:
***
VFS: Cannot open root device "hda2" or unknown-block (0,0)
Please append a correct root= boot option.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)
***

If I'm not mistaken, another possible cause for the error message you see is lack of filesystem support being compiled in to the kernel.

So, if you use ReiserFS, you have to have compiled support for it in your kernel. By default, not much support is compiled in. Also, this support must be built in, not a module (at least for the filesystem used on your root).

This support is under "File systems" in the first menu, when you configure the kernel with menuconfig.

I hope you get it working soon!

Last edited by Nick Dimitri; 06-24-2007 at 10:26 AM.
 
Old 06-24-2007, 10:58 AM   #7
anon061
LQ Newbie
 
Registered: Apr 2005
Posts: 12

Original Poster
Rep: Reputation: 0
vtel57, I'm using Arch. I'm going to check the IDE support to make sure it's all being compiled in. I'm also going to try using mkinitrd instead of mkinitcpio, as this is the first time I've used mkinitcpio and mkinitrd has always worked for me in the past. I'll try following the directions in that tutorial as well to make sure I'm doing everything properly. Thanks!

Nick Dimitri, yes, support for the fs (ext3 in my case) is compiled directly in to the kernel. Thanks though.
 
Old 06-24-2007, 02:53 PM   #8
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware
Posts: 1,377

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Okee-dokee... keep us posted.
 
Old 06-24-2007, 04:41 PM   #9
anon061
LQ Newbie
 
Registered: Apr 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Alright, thanks guys. I think using mkinitrd worked. Heh, silly mkinitcpio.

Thanks for all of your help!
 
Old 06-24-2007, 05:36 PM   #10
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware
Posts: 1,377

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
COOL! You got it working!
 
  


Reply


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
Failed to open audio device (/dev/dsp): No such device stevesk Slackware 6 01-01-2009 06:29 AM
Block device /dev/sda3 is not a valid root device.. rincewind Linux - Hardware 7 06-09-2006 04:47 AM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 08:46 PM
/dev/hda2 not a valid block device KeithKessler Slackware 13 02-10-2005 09:10 AM
HELP: /dev/scd0 is not a block device fysx Linux - Hardware 1 09-02-2003 11:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration