Compiling kernel for HDD install


Recommended Posts

First off, glad you got this far.

 

Second, the config that ships with unRAID will not boot on a C3.

 

Did you go through make menuconfig and change the appropriate drivers?

 

IIRC, "mdState not found" means the unRAID drivers and MD mods are not in the kernel.  Did you copy all the drivers from unRAID to your usr/src tree?  Are you booting from the kernel compiled with them?

 

 

Link to comment

Here is an ls of the uraid directory I got the drivers from and the source dir I compiled in.

 

root@brainNAS:~# ls -al /usr/src/linux/drivers/md/
total 1260
drwxrwxr-x  3 root root   4096 2008-06-14 11:18 ./
drwxrwxr-x 76 root root   4096 2008-06-14 11:09 ../
-rw-r--r--  1 root root     88 2008-06-14 11:00 .built-in.o.cmd
-rw-rw-r--  1 root root     51 2008-03-24 11:49 .gitignore
-rw-r--r--  1 root root    128 2008-06-14 11:18 .md-mod.ko.cmd
-rw-r--r--  1 root root  11701 2008-06-14 11:18 .md-mod.mod.o.cmd
-rw-r--r--  1 root root    135 2008-06-14 11:00 .md-mod.o.cmd
-rw-r--r--  1 root root  20203 2008-06-14 11:00 .md.o.cmd
-rw-r--r--  1 root root  20221 2008-06-14 11:00 .unraid.o.cmd
-rw-r--r--  1 root root  20349 2008-06-14 11:00 .xor.o.cmd
-rw-rw-r--  1 root root    346 2008-06-14 00:55 Kconfig
-rw-rw-r--  1 root root    118 2008-06-14 00:55 Makefile
-rw-rw-r--  1 root root  41625 2008-03-24 11:49 bitmap.c
-rw-r--r--  1 root root      8 2008-06-14 11:00 built-in.o
-rw-rw-r--  1 root root   1670 2008-03-24 11:49 dm-bio-list.h
-rw-rw-r--  1 root root   1096 2008-03-24 11:49 dm-bio-record.h
-rw-rw-r--  1 root root  26241 2008-03-24 11:49 dm-crypt.c
-rw-rw-r--  1 root root   8210 2008-03-24 11:49 dm-delay.c
-rw-rw-r--  1 root root   8228 2008-03-24 11:49 dm-emc.c
-rw-rw-r--  1 root root  16195 2008-03-24 11:49 dm-exception-store.c
-rw-rw-r--  1 root root   4385 2008-03-24 11:49 dm-hw-handler.c
-rw-rw-r--  1 root root   1617 2008-03-24 11:49 dm-hw-handler.h
-rw-rw-r--  1 root root  10638 2008-03-24 11:49 dm-io.c
-rw-rw-r--  1 root root   1861 2008-03-24 11:49 dm-io.h
-rw-rw-r--  1 root root  31852 2008-03-24 11:49 dm-ioctl.c
-rw-rw-r--  1 root root   2961 2008-03-24 11:49 dm-linear.c
-rw-rw-r--  1 root root  16832 2008-03-24 11:49 dm-log.c
-rw-rw-r--  1 root root   3424 2008-03-24 11:49 dm-log.h
-rw-rw-r--  1 root root   6411 2008-03-24 11:49 dm-mpath-hp-sw.c
-rw-rw-r--  1 root root  16530 2008-03-24 11:49 dm-mpath-rdac.c
-rw-rw-r--  1 root root  32519 2008-03-24 11:49 dm-mpath.c
-rw-rw-r--  1 root root    497 2008-03-24 11:49 dm-mpath.h
-rw-rw-r--  1 root root   2629 2008-03-24 11:49 dm-path-selector.c
-rw-rw-r--  1 root root   2401 2008-03-24 11:49 dm-path-selector.h
-rw-rw-r--  1 root root  32716 2008-03-24 11:49 dm-raid1.c
-rw-rw-r--  1 root root   4635 2008-03-24 11:49 dm-round-robin.c
-rw-rw-r--  1 root root  28471 2008-03-24 11:49 dm-snap.c
-rw-rw-r--  1 root root   3793 2008-03-24 11:49 dm-snap.h
-rw-rw-r--  1 root root   4980 2008-03-24 11:49 dm-stripe.c
-rw-rw-r--  1 root root  21705 2008-03-24 11:49 dm-table.c
-rw-rw-r--  1 root root   3265 2008-03-24 11:49 dm-target.c
-rw-rw-r--  1 root root   5526 2008-03-24 11:49 dm-uevent.c
-rw-rw-r--  1 root root   1678 2008-03-24 11:49 dm-uevent.h
-rw-rw-r--  1 root root   1535 2008-03-24 11:49 dm-zero.c
-rw-rw-r--  1 root root  32972 2008-03-24 11:49 dm.c
-rw-rw-r--  1 root root   5102 2008-03-24 11:49 dm.h
-rw-rw-r--  1 root root   8436 2008-03-24 11:49 faulty.c
-rw-rw-r--  1 root root  14159 2008-03-24 11:49 kcopyd.c
-rw-rw-r--  1 root root   1107 2008-03-24 11:49 kcopyd.h
-rw-rw-r--  1 root root  10810 2008-03-24 11:49 linear.c
-rw-r--r--  1 root root  52656 2008-06-14 11:18 md-mod.ko
-rw-r--r--  1 root root    456 2008-06-14 11:18 md-mod.mod.c
-rw-r--r--  1 root root   1632 2008-06-14 11:18 md-mod.mod.o
-rw-r--r--  1 root root  51814 2008-06-14 11:00 md-mod.o
-rw-rw-r--  1 root root  56386 2008-06-14 00:55 md.c
-rw-r--r--  1 root root  26196 2008-06-14 11:00 md.o
-rw-r--r--  1 root root  10181 2008-06-14 00:55 md_private.h
-rw-rw-r--  1 root root   2871 2008-03-24 11:49 mktables.c
-rw-rw-r--  1 root root  14486 2008-03-24 11:49 multipath.c
-rw-rw-r--  1 root root  14233 2008-03-24 11:49 raid0.c
-rw-rw-r--  1 root root  58965 2008-03-24 11:49 raid1.c
-rw-rw-r--  1 root root  59735 2008-03-24 11:49 raid10.c
-rw-rw-r--  1 root root 135988 2008-03-24 11:49 raid5.c
-rw-rw-r--  1 root root   3957 2008-03-24 11:49 raid6.h
-rw-rw-r--  1 root root   4035 2008-03-24 11:49 raid6algos.c
-rw-rw-r--  1 root root   3330 2008-03-24 11:49 raid6altivec.uc
-rw-rw-r--  1 root root   2797 2008-03-24 11:49 raid6int.uc
-rw-rw-r--  1 root root   3895 2008-03-24 11:49 raid6mmx.c
-rw-rw-r--  1 root root   3491 2008-03-24 11:49 raid6recov.c
-rw-rw-r--  1 root root   4976 2008-03-24 11:49 raid6sse1.c
-rw-rw-r--  1 root root   8535 2008-03-24 11:49 raid6sse2.c
drwxrwxr-x  2 root root   4096 2008-03-24 11:49 raid6test/
-rw-rw-r--  1 root root   1680 2008-03-24 11:49 raid6x86.h
-rw-r--r--  1 root root  43039 2008-06-14 00:55 unraid.c
-rw-r--r--  1 root root  13648 2008-06-14 11:00 unraid.o
-rw-rw-r--  1 root root    492 2008-03-24 11:49 unroll.pl
-rw-r--r--  1 root root   3627 2008-06-14 00:55 xor.c
-rw-r--r--  1 root root  14532 2008-06-14 11:00 xor.o
root@brainNAS:~# ls -al /uraid/usr/src/linux/drivers/md/
total 136
drwxr-xr-x 2 root root  4096 2008-06-14 00:53 ./
drwxr-xr-x 3 root root  4096 2008-06-14 00:53 ../
-rw-r--r-- 1 root root   346 2008-06-11 20:52 Kconfig
-rw-r--r-- 1 root root   118 2008-06-11 20:52 Makefile
-rw-r--r-- 1 root root 56386 2008-06-11 20:52 md.c
-rw-r--r-- 1 root root 10181 2008-06-11 20:52 md_private.h
-rw-r--r-- 1 root root 43039 2008-06-11 20:52 unraid.c
-rw-r--r-- 1 root root  3627 2008-06-11 20:52 xor.c

 

I then noticed this log was referenced, when I checked it out:

 

FATAL: Could not load /lib/modules/2.6.24.4-unRAID/modules.dep: No such file or directory

 

There are no directories no in /lib/modules for the kernel, so I copied them from the USB and changed some symlinks within to point to MY /usr/src/linux-2.6.24.4-unraid-special/ directory.

 

Now when I run emhttp I get:

 

ERROR: Module md_mod does not exist in /proc/modules
FATAL: Error inserting md_mod (/lib/modules/2.6.24.4-unRAID/kernel/drivers/md/md-mod.ko): Invalid module format

 

I did some googling, not much to be found, so I am recompiling the kernel, to make sure that this wasn't part of the "make modules" that somehow was skipped.

 

Any ideas?

Link to comment

Just a quick idea before I head to bed.  You need to type the commands in my how-to exactly.  After you compile the kernel you need to:

 

make modules

 

to make the modules.  Then you need to:

 

make modules_install

 

Don't just type "make modules install", you have to have the _ there.  Else you'll end up compiling the modules, but not actually installing them.

 

Of course then you'll need to make sure you edit /etc/lilo.conf properly, then run lilo -v for the changes to take affect.

Link to comment

So, several more kernels later, I ran dmesg and saw this:

 

md_mod: version magic '2.6.24.4-unRAID mod_unload PENTIUM4 ' should be '2.6.24.4-unRAID mod_unload CYRIXIII

 

Its referencing the modules that come with the unraid install zip. (The ones I copied over before I realized these should be installed during the compile).

 

So I am using the "make module install" command.  But I don't believe its creating the modules.  They should be put in /lib/modules right?

 

I want to try a few more fresh starts, but its starting to look like more trouble than its worth. =)

 

That error message raises some questions, however:

 

* Does anyone know if the newer VIA processor, namely the C7, is considered compatible and would work out of the gate?  I'm also looking at the AMD Geode processors.  But I like the VIA solutions, (Dual 1GB NICs, etc.)   

* If the modules that come packaged with unraid are for a P4, then how does a Athlon run this from the USB?

 

Thanks again for all the help!

 

Just a quick idea before I head to bed.  You need to type the commands in my how-to exactly.  After you compile the kernel you need to:

 

make modules

 

to make the modules.  Then you need to:

 

make modules_install

 

Don't just type "make modules install", you have to have the _ there.  Else you'll end up compiling the modules, but not actually installing them.

 

Of course then you'll need to make sure you edit /etc/lilo.conf properly, then run lilo -v for the changes to take affect.

 

I am not sure why they are not being installed.  I feel like I have the most problematic install.  Maybe ever.  However, my process is a bit more streamlined now, I'll try a fresh install.

 

However, this is one of the best learning experiences I have have in a very long time!

 

Thanks guys!

Link to comment

I want to thank you guys for your support! I am sure with time I would have gotten it to work, but this gives me an excuse to buy a new itx board :)

 

I went with another VIA CPU - I searched the board and found out a C7 should work fine out of the box.

 

I'm sure I'll be back with some more inane questions. :)

 

thanks again!

Link to comment

Before you buy that itx board, make sure the network adapter is supported.

(or at the very least, make sure you are ready to tackle compiling the kernel if not).

 

With my Jetway, the motherboard's network adapter was not supported.

I bought a daughter board that had 3 Intel adapters and they worked without a hitch.

OK it wasn't PCIe but it worked ;-)

Link to comment

So I bought the ITX board that day, got it in the mail today.

 

The USB stick booted without issue.

 

Even found the gigabit NICs. (I had more trouble with the generic kernel from slacky)

 

I compiled the kernel to include my controller card and after a few typos, I have a working system. =)

 

I want to thank you guys, couldn't have done it without you!

 

Here is what I ended up buying:

 

http://www.newegg.com/product/product.aspx?item=N82E16813153072

Link to comment

Posterity post #1:

 

When I tried to run httpd I received this error:

 

[Fri Jun 20 08:41:48 2008] [crit] (38)Function not implemented: mod_rewrite: could not create rewrite_log_lock

Configuration Failed

 

Turns out this is caused by the unRAID .config missing a vital library - System V IPC. Enable it under General Setup - System V IPC, and recompile

Link to comment

A C7 miniITX doesn't make much sense for an unRAID server.  You need a case that holds several drives, and hence no need for a miniITX form factor.  Plus the miniITX has only 2 drive ports, so you will need multiple PCI cards, for which the miniITX has only 1 slot, and which will suck more power than on-board ports.

 

There are C7's on microATX form factor mobos, that are a much better choice than a miniITX.

Link to comment

I made one on mini itx it was designed for small size and low power consumption.

To fit on a shelf. 

In my case, my main file repository was on my big workstation.

I wanted to offload the file repository so that I could reboot my workstation at my liesier without having to worry about the sahred files.

Plus moving my torrent downloads to the unraid server keeps it all in one nice package.

I could have gone with openfiler which is much more mature but I like the idea of single drives/single filesystems and spindown.

 

It's up to the builder to decide his uses and needs.

 

http://lime-technology.com/forum/index.php?topic=2031.msg14752#msg14752

Link to comment

A C7 miniITX doesn't make much sense for an unRAID server.  You need a case that holds several drives, and hence no need for a miniITX form factor.  Plus the miniITX has only 2 drive ports, so you will need multiple PCI cards, for which the miniITX has only 1 slot, and which will suck more power than on-board ports.

 

There are C7's on microATX form factor mobos, that are a much better choice than a miniITX.

 

Like Weebo, I needed something small, relatively quiet and that has low power consumption.  I like in a small condo with my fiance.  Speed isn't a concern.  I just don't want my mammoth desktop running all day. This is for my personal files, music and TV shows with the occasional move and system backup.

 

I picked up a Silicon Image SATA controller and a 5 in 3.

 

As far as the case, I had an old SCSI box, and after I through an old PSU in there there was JUST enough space for the ITX board.  Threw and old DvD writer in there too.

 

Speed wise, I have no complaints.  Streaming HD to my Tivo is going well =)  1.5GHz and 1GB RAM seems good enough for now.

 

I have 2x500GB drives and 2x250GB drives.  Then I have an old 120GB IDE Drive where slack lives.

 

I'll post some performance later for those interested =)

Link to comment
  • 2 weeks later...

I've been wanting a meter for a long time, so I finally got one =)

 

Right now, its running at 52 watts, 90 when spun up.  All drives except for the system drive spun down.

 

I even compiled the CPU stepping drivers and have my CPU down to 400MHz from 1.2GHz, that really didn't make a difference at all =)

 

Not sure how much more I could squeeze down, I want to keep the fans up.

 

Not to bad IMHO, though.

Link to comment

That's pretty good, but for some reason I expected it to use less power. Thanks for looking into that.

I'll stay with my duo core 2. I get 40 watts when all is spun down.

2 WD green drives, 2 Maxtor 500GB drives, 4G ram, Core 2 Duo 2.33. "Mobile".

 

FWIW, I stepped my 2.66 Core 2 DUO (not mobile) down to 1.6GHZ and it did not save any power.

Too bad I can;t adjust the CPU voltage on my motherboard. I would underclock it.

Link to comment
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.