# NVRAID Kernel Issues?- root block device is unspecified.....

## jteddy

I have been trying to get my installation of gentoo working on my DFI Lanparty UT M/B, which has an nvidia chipset, which I am using 2x SATA drives for RAID 0.

I started by first using genkernel to create my kernel image

```

# genkernel --dmraid --install --bootloader=grub --save-config all

```

I then continued onto configuring grub.

I read the following will be needed.

Before I chrooted,

```

# cp /proc/mounts /mnt/gentoo/etc/mtab

```

In my new chrooted environment

```

# emerge -av device-mapper udev

# dmsetup mknodes

```

Next came configuring grub.

```

# /sbin/grub --device-map=/dev/null

grub> device (hd0,0) /dev/mapper/${devicename_of_your_bootpartition}

grub> device (hd0) /dev/mapper/${devicename_of_your_raid}

grub> root (hd0,0)

grub> setup (hd0) 

quit

```

To my suprise no entry was made by genkernel to /boot/grub/grub.conf

I edited grub.conf just leaving the timeout and default # in there, and tryed to re-emerge

```

# genkernel --no-clean --no-mrproper --install --dmraid  --bootloader=grub all

```

Still nothing added to grub.conf, although this time it has been replaced.

I receive one error

end_request: I/O error, dev fs0, sector 0

which could be the reason why nothing is added to grub.conf

After booting into what is hoped to be gentoo bliss I receive the following errors

```

Activating mdev

Activating Device-Mapper RAID(s)

ERROR: dos: reading /dev/mapper/nvidia_debfcaec[No such file or directory]

Determining root device...

!! Block device /dev/mapper/nvidia_debfcaec4 is not a valid root device...

!! The root block device is unspecified or not detected.

  Please specify a device to boot, or "shell" for a shell...

boot() ::

```

Any help would be appreciated.

----------

## NeddySeagoon

jteddy,

My first piece of advice is don't use dmraid. However, if Windows and Linux both need to access the raid set, there is no choice.

If you have no floppy drive, grub also needs the -no-floppy option. It looks like grub works because the kernel appears to load.

What is actually in your grub.conf when you get this error?

What files exit is your /boot too?

Please post your

```
 ls -l /boot
```

----------

## jteddy

Thanks.

Unfortunately I am dual booting windows and linux on the same RAID0 controller.

I started the install from scratch again, just for a sanity check, and came up with the same results.

this time configuring grub with the below and started the same configuration again.

```

grub --no-floppy --device-map=/dev/null

```

Sorry, I am using the gen2dmraid CD, and anytime I execute passwd the box panics!  Below is the /boot directory (typed out)

# ls -l /boot

System.map-genkernel-x86-2.6.18-gentoo-r3

boot -> .

grub

initramfs-genkernel-x86-2.6.18-gentoo-r3

kernel-genkernel-x86-2.6.18-gentoo-r3

lost+found

grub.conf looks like the below

```

timeout 10

default 0

splashimage=(hd0,1)/grub/splash.xpm.gz

title=Linux

root (hd0,0)

kernel /kernel-genkernel-x86-2.6.18-gentoo-r3 root=/dev/ram0 init=/linuxrc real_root=/dev/mapper/nvidia_debfcaec4 dodmraid

initrd /initramfs-genkernel-x86-2.6.18-gentoo-r3

```

----------

## NeddySeagoon

jteddy,

That all looks good. I assume the 

splashimage=(hd0,1) and root (hd0,0) being different is just a typo ?

What version of dmraid is in the initrd ?

It need not be the one that portage provides with emerge. You need at least -rc12

----------

## jteddy

Thanks for the quick reply... I have been reading around the forums, and it appears you are quite the pro on this topic... Do you do some kind of work related to storage/raid?  Feel free not to answer if you wish  :Smile: 

 *Quote:*   

> 
> 
> splashimage=(hd0,1) and root (hd0,0) being different is just a typo ?
> 
> 

 

I have my /boot partition setup as (hd0,0) so this should be fine.

0. /boot

1. windows

2. swap

3. /

I just finished reading the below forum post by LoSeR_5150, and his method of editing /etc/genkernel.conf, adding "  DMRAID_VER="1.0.0.rc11"  " and downloading http://people.redhat.com/~heinzm/sw/dmraid/tst/old/dmraid-1.0.0.rc11-pre1.tar.bz2 worked fine.  (After of course copying and renaming the file over to /usr/share/genkernel/pkg/ 

https://forums.gentoo.org/viewtopic-t-482692-highlight-dmraid.html

Do you know why this solved the problem?  I am about to start reading what the difference is between the dmraid packages.

Thanks for your help.

----------

## NeddySeagoon

jteddy,

At kernel 2.6.15, there was a bug fix that had a knock on effect to dmraid. In turn dmraid was fixed too.

That means that with kernels later than 2.6.15 you need the fixed dmraid, which I think was -rc12.

I'm not sure if the converse is true, that is, with kernels 2.6.15 and below you need the older dmraid.

----------

## net-0

O man.... I thought this would be fixed by now, I tired doing this back in like july.

I had it working until I broke it too, dmraid is a tuff cookie...

I want to try again, but Im curious whats the best solution?

Like which packages work the best, I remember I had to use different versions to get it to work correctly. Needy could like do a quick sum up of what you did and used? <3   :Shocked:  and good luck jteddy... I restarted tons of times, and got it to work then I broke it... I cryed.

----------

## jteddy

Everything is working fine now, although my build is so unstable.  It will just hang at various points in time, and usually when I emerge a package.

I am hoping this isn't related to dmraid, and perhaps unbloating my kernel will help... Logs do now show much either.

----------

## net-0

Hmm, did you use the most upto date packages except the dmraid package? I have been playing with it again today, and it seems like nothing really has changed since I tried back in july.

I tried using the newest version of dmraid in the portage tree, along with the newest genkernel... and It didnt work, so Ill try kicking dmraid back down to dmraid-1.0.0.rc11.

Which version of genkernel did you use if you used it?

Haha dmraid is so odd   :Shocked:  I really thought about getting rid of the raid because of it, that and I really dont notice a performance boost.

----------

## net-0

Wow Im retarded, you used genkernel.... you even put into code view... I swear Im losing my mind.   :Rolling Eyes: 

----------

## net-0

So Neddy just to recap, I read the solved dmraid thread... 

With a kernel > than 2.6.17 use dmraid-1.0.0-rc12 right? And the dmraid that genkernel uses is different than the one I emerge right?

Im using 2.6.19-gentoo-r1, genkernel 3.4.5 and dmraid-1.0.0.rc12-pre1.tar.bz2  renamed following LoSeR_5150 post.

This should work right? Sorry If I didn't post this where it should be I'm a noob.   :Razz: 

----------

## NeddySeagoon

net-0,

Heres your summing up

Rule 1. Do not use dmraid - its sofware raid like kernel raid but less well developed.

Rule 2. If Windows and Linux must share a raid set, ignore Rule 1.

kernels <= 2.6.15 work with dmraid -rc8

Kernels > 2.6.15 have a bugfix that requires dmraid -rc12 (approx)

Gotcha - the versions of dmraid you get by running emerge dmraid and genkernel may not be the same.

What do I use?

I follow Rule 1, since I don't suffer from Windows.

My dmraid knowledge comes from assembling the dmraid with kernel > 2.6.15 [SOLVED] thread when it was a sticky.

----------

## net-0

Hmm Im having trouble...

I tried changing loser5150's post to fit my newer kernel....

```
DMRAID_VER="1.0.0.rc12"

DMRAID_DIR="dmraid/${DMRAID_VER}"

DMRAID_SRCTAR="${GK_SHARE}/pkg/dmraid-${DMRAID_VER}.tar.bz2"

DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2"
```

However when I try to make an initrd it says....

* Gentoo Linux Genkernel; Version 3.4.1

* Running with options: --dmraid initrd

* Linux Kernel 2.6.19-gentoo-r1 for x86...

* initramfs: >> Initializing...

*         >> Creating base_layout cpio archive...

*         >> Creating auxilary cpio archive...

*         >> Creating busybox cpio archive...

*         >> Creating dmraid cpio archive...

* DMRAID: Adding support (compiling binaries)...

* ERROR: DMRAID directory ${DMRAID_DIR} is invalid!

* -- Grepping log... --

*         >> Creating dmraid cpio archive...

* DMRAID: Adding support (compiling binaries)...

* Gentoo Linux Genkernel; Version 3.4.1

* Running with options: --dmraid initrd

* ERROR: DMRAID directory ${DMRAID_DIR} is invalid!

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any

* errors that were reported above.

* Report any genkernel bugs to bugs.gentoo.org and

* assign your bug to genkernel@gentoo.org. Please include

* as much information as you can in your bug report; attaching

* /var/log/genkernel.log so that your issue can be dealt with effectively.

*

* Please do *not* report compilation failures as genkernel bugs!

When I change it to 1.0.0.rc13 it works but I haven't restarded to check it.... Im afraid too... I have been chrooting all day and I'm getting depressed.

I don't understand, and you seem to be on top of things.

If you need to me to specify more I can

Anyways thanks,   :Shocked: 

----------

## NeddySeagoon

net-0,

I don't know what dmraid works with the 2.6.19-r1 kernel. -rc13 sounds promsisng.

----------

## net-0

K thanks, for your insanely speedy replies ... Ill keep working with it, I think I might have made a grub mistake... Ill cross my fingers and try rc13 with 2.6.19-r1

Thanks,

----------

## net-0

No luck I'm bummed out...

Jteddy which source, dmraid, genkernel did you use?

----------

## net-0

So as of right now... whats the most upto date packages that people have got this working with? I tried all day yesterday... and I would like this to work. 

I have nvraid, and I'm willing to reinstall many times if need be to get this working... I'm not going to let dmraid beat me... I'm not the greatest with Linux ethier but I'm sure I can figure this out.

How would I tell portage to grab old packages? I'm still trying to figure out how portage works with all its features... I guess I'll have to read the handbook on it. 

But I have figured out how to go back on a few packages, but it seems like if its to old I can't do it...

I don't really care how out of date my install is, so long as I have it working for the time being.... I just need to know how to grab the old packages.... Like I said I had this working back in july... and I still have my old kernel and it works, but I don't understand... can I use an older kernel with a newer stage3 install or does that matter?

What I really don't understand is how the kernel works with the install... I understand I can boot different kernels... but can I salvage that old of a kernel from like a few months back?

I'm still trying to figure out how I broke this... because I like I said I don't really understand it... I know that dmraid works out side of the kernel, and I also know that I have to build it into it with genkernel. When I broke my install I was trying to emerge -uD world and I might have overwrote the older dmraid that was making it work... damn I don't know... anything that might be of help I would greatly appreciate.

----------

## net-0

bump?

----------

## jteddy

 *net-0 wrote:*   

> Hmm Im having trouble...
> 
> ```
> DMRAID_VER="1.0.0.rc12"
> 
> ...

 

Net-0

If you change the DMRAID=VER you must ensure you copy the dmraid package to /usr/share/genkernel/pkg/

Give that a try and let me know how you go.

----------

## jteddy

My system is currently unstable running dmraid.. (it was very stable in the past while I was using dmraid on gentoo-64) although for some reasons I migrated back to 32-bit gentoo.

I noticed a constant error in /var/log/messages

```

Dec  6 18:33:25 hostname attempt to access beyond end of device

Dec  6 18:33:25 hostname sdc: rw=0, want=277538946, limit=234441648

```

I`ve tried an fsck, creating new partitions, (restoring from gentoo from backup).

Does anyone have any ideas?

----------

## jteddy

 *NeddySeagoon wrote:*   

> net-0,
> 
> Heres your summing up
> 
> Rule 1. Do not use dmraid - its sofware raid like kernel raid but less well developed.
> ...

 

If I decide to eradicate my windows partition and use Rule 1.  

Now following the below guide.

http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

This looks like the best way.Last edited by jteddy on Wed Dec 06, 2006 12:05 pm; edited 1 time in total

----------

## net-0

Hmm after I broke my install my grub still worked, I'm not sure what your asking though. Are you saying that you want to switch to raid within the kernel? If so I don't think that it would affect your grub if its still working. Heh disreguard this if it's not what you meant.

I would think you could nuke all your partions after the boot partition and start over, if grub is working then you can still use it.

What I think I'm going to do is have linux on one of my extra ide drives and keep my windows raid seperate. But will I be able to mount the raid stripe with dmraid still? Like the raid0 array is all ntfs, and say I want to look at files on it from my windows partition on a seperate drive, will device mapper pick it up still?

Anyways I'm starting to get to the point where it doesn't seem worth... you got it working and said it was flakey.. so I think I will go with option 2 also.

Well good luck, Ill keep checking to see what others have to say.

----------

## net-0

 *jteddy wrote:*   

>  *net-0 wrote:*   Hmm Im having trouble...
> 
> ```
> DMRAID_VER="1.0.0.rc12"
> 
> ...

 

O ya I did that after I sent neddy that genkernel crash, I didn't include the -pre in the genkernel config. It built the kernel and initrd fine... but dmraid is poopy still   :Embarassed: 

----------

## NeddySeagoon

net-0,

Where to start ... ?

A quick run down of the boot process ...

The BIOS sets up the motherboard hardware, runs POST, then reads the MBR from the drive its told to boot from.

The BIOS exits by jumping to the first location in the MBR code.

Grubs stage 1 lives here, it uses BIOS calls to read Grub stage 1.5 from sectors 2 .. 62 (not all of them) from the otherwise wasted space before the first partition,

Grubs stage 1.5 can read exactly one filesystem, notice all the different stage1.5 files in /boot/grub.

Grubs stage 1.5 reads the file system where the boot files live (its not mounted  - there is no kernel running yet) and loads Grubs stage2 file.

The stage 2 reads grub.conf and works out what to do based on that and user input.

Stage 2 loads the kernel and initrd file (if you have one) the initrd appears to the kernel as /dev/ram0 hence the entry on the kernel line.

Grub exits by passing control to the kernel, the kernel decompresses and starts doing its thing 

The initrd is a miniture root filesystem, you can decompress it and mount it with the -o loop option. You can even chroot into it. When you need modules like dmraid to mount the root filesystem, the modules are inside the initrd at the usual place of /lib/modules/`uname -r`/..  just like on a running system

If you poke about in your initrd you can see the modules and load them. Be aware the the shell is busybox, so its somewhat simplified.

When it comes to failed to mount root, tyoe shell for a shell (or something like that) go into the shell, check that dmraid is loaded and look in /dev for yor dmraid partitions.

Daft question ... do you have   dodmraid   on the kernel line in grub ?

Read man portage to find out how to go back a version or so. There are a number of files in /etc/portage that control that behaviour. If you want a version no longer in the tree, fetch the ebuild (and supporting files) from CVS. there is a link on the gentoo.org home page. Should you need to go down the fetching old ebuilds, then you need to learn about overlays too, since all the out of date ebuilds will be removed from your tree when you emerge --sync next.

----------

## net-0

Hmm, could I use a different initrd with a different kernel? Or would that not work? I mean would I be able to make a newer kernel and then use say the initrd off the 2006.0 livecd where the dmraid works? 

Haha ya I did put the dodmraid into grub.conf, I think I tried dmraid too.

So when I make my kernel and initrd dmraid is getting built into both right? And I can even build a different version into the initrd image right? So I probly didnt break my install by updating right? The only way I could have broke it would have been to update to a version of dmraid that didnt work, and then make a new kernel and initrd image right?

So the initrd is what is getting loaded in the beginning? Thats why when the array isnt picked up busybox loads? So is it a problem with the dmraid in the kernel or the initrd... or am I mistaking?

----------

## net-0

Well im pretty upset I killed my raid with the livecd install which is retarded as shit.

So Im starting over, with everything... and I can't help but look at neddys signature and smile.  :Very Happy: 

No more dmraid, dmraid is not a good choice. Let all who read this know this.

Bleh starting from scratch  :Embarassed: 

----------

