Help with Kernel for SATA
I'm trying to build an LFS system on my PC and everything was going fine, until... the reboot into the new system.
To clarify, I'm building LFS for the x86_64 platform (pure64), but it's not a cross-lfs build. I downloaded the SVN x86_64 LiveCD and went from there.
My problem is that the system just won't boot up from my new installation. I went through the book as normal, and everything worked fine. I installed a bootloader and got it to load the new kernel (version 184.108.40.206), but it crashes out with some messages about SATA.
As the only other working OS I have at the moment is Windows 7, I can't give you the exact output I saw, but here are a few lines that I thought were significant and wrote down:
Does anyone know what is wrong? I have tried everything I can think of.
My hardware is an ASUS M3N-78 PRO motherboard with Nvidia 8300 chipsets (the integrated-GPU one). I'm using AHCI for the SATA, and in total have 5 SATA devices connected (four hard drives and a bluray/DVD-RW).
I'm absolutely positive that I compiled AHCI support into the kernel, but I'm not sure about this libata thing that I've read about - don't know where to find the option in make menuconfig.
PLEASE can anyone help me?!? This has been driving me up the wall for the last 3 days now and I'm seriously considering abandoning LFS and going to a "normal" distro.
Thanks in advance!
Or would my question be better placed in the Linux - Kernel section?
hmm, well, it's been a while since i compiled my kernel but.....
1. make sure raid is turned on on your motherboard, if available. mine just wouldnt like the drives until it was (i dont use raid, it just has to be enabled).
2. just go and double-check that you ticked the right box to include your on-board sata drives into the kernel, not as modules, but compiled directly into the kernel (i have spent a day troubleshooting to figure out i'd *'d the wrong line).
3. make sure you have compiled in (not modular) support for both "ATA Devices" and "AHCI SATA Devices", as iirc, it needs both sets.
i'd go with checking the driver first, make sure it's compiled in, not modular, and it's the right driver. as it seems to be the most likely culprit.
if i have missed something obvious, forgive me, i am stuffed up with flu atm and floating on a pink fluffy cloud of medication.
Thanks for that post. I was beginning to think I wouldn't get any replies at all!
Well, I've recompiled the kernel as advised, but still no luck. I get the same wierd error messages and the system just doesn't boot. I enabled all the sata options I could find, and definitely enabled AHCI. Nothing was a module, all were *'s.
Maybe I need to use a more up to date kernel source? Would that work with the LFS build? Maybe worth a shot.
Does anyone else have a self-compiled kernel working in 64bit on an Nvidia 8300 chipset? I'd like to hear your experiences and advice, if so.
Any more ideas?
Thanks in advance.
Please post your .config file in a pastebin ... I had this problem at first, when learning about compiling kernels. I now have learned to select only what is pertinent to my system. Also what version of the kernel are you using? Vanilla, git-sources, etc... Along with the version number 2.6.**
This way I can look at you .config and help you configure your chipset and devices. I too have a ASUS board, so I can look at what you have configured so far, and make any changes and post your new .config. This way you can see the diff between the .config files, and see your errors.
Wow, thankyou thankyou thankyou for your generous offer, manwithaplan - if you can get this working for me I will be forever grateful!
I've had a few .config files now, but here is the latest one.
I've been using vanilla kernel, 220.127.116.11, as that's the version currently recommended by the SVN version of the LFS book. I'm not using any patches, simply:
My system: I have an ASUS M3N78-PRO, which features the Nvidia 8300 chipset, I have four HDDs connected via SATA and one DVDRW/Bluray also connected via SATA. I therefore have to set AHCI mode in the bios, as there's no other way to use that many drives without an add on card. IDE mode only gives me 4. My processor is a Phenom X4 9950 if that makes any difference.
Looking forward to my amended config file!
Why use the old kernel...? I know the LFS book says to use this ... I suggest the newer kernel 2.6.31 This has many improvements with scheduling, File system support, newer drivers (which you need) etc...
If you want I can still use this old kernel...
Though, I could make a nice static kernel for you that is current, and has some performance patches. Like the new zen-sources 2.6.31-zen1... It shouldn't effect the LFS handbook, and you wont need a initrd. And is stable
I've done this many times, especially in the last few days trying out new kernels and features.
Also, you have an AMD... I have a patched, and performance kernel that would work great with your hardware. I can tar.bz2 up the source and edit the .config and have you try it..? I can setup my ftp so you can download it? Just a suggestion
EDIT: From what I have been reading about the nVidia 730a chipset... Is that you need a more current kernel 2.6.26 and above ...
That would be absolutely fantastic if you could. The newer the better I guess! I'm very grateful for all this help. Pm me with the download details when you're ready.
What version of GCC are you using ...? I want to set custom CFLAGS for compiling
Also, I have added the Raid configuration, I assume you are using all sata ports, I also added DVB support with autodetect... Not sure about revision "S2", but it should work. You'll need to add any additional support for any printers or misc. usb devices, I left that open, too just only the basics.
1) Your Raid controller is NVIDIA's & I'm not certain if its going to be problem (never tested it)
2) Your onboard NIC, should work with the Realtek driver (8169) in the kernel. If not, you'll need to look for a patch or a workaround ... I wouldn't worry so much on this one
3) I have the VESA driver set for your initial display, (using nvidia fb is usually a nightmare) You can always use the source binaries from nVidia's site for your X.
All right here is the links to the source:
This is for GCC 4.3 and above:
This is for GCC 4.3 and below e.g. (4.1 - 4.2.4)
There is know need to make clean or make mrproper, I have already cleaned the source. This would erase the .config file I've created.
As a optional task you can make menuconfig before executing the build (you need dialog installed to use menuconfig)
The .config has full support for iptables.
Cheers hope this helps ... reply if any questions
I noticed that you are using the LFS live_cd ... way out dated. I just downloaded the latest svn handbook, and reviewing it now. It references all up to date packages and a current GCC 4.4.1
I think, if you want a better LFS setup, you should download the new Anniversary Gentoo live_DVD, and download the svn LFS pdf handbook. I use Funtoo, which is a variant of Gentoo, and love it. The new Live_DVD will have all current build utilities needed in a host system to build LFS. If not you can always use emerge to grab the tools needed.
I haven't built a LFS system in sometime, so you got me interested. I am reviewing the svn version Linux From Scratch - Version SVN-20090924. This is current. Since I wont need a Live_DVD, I'd suggest that you use the new Gentoo Live_DVD, which you can download here This is current, and would make a great introduction to Gentoo and make a good live host. They dont make a live DVD very often, if at all anymore since they transitioned to a rolling release distro.
This is a multi-arch release DVD... Check it out on there website.
I actually was referring to the 32bit LFS build with the pdf (as above)... For a pure 64bit build I will be using CLFS SVN-20090922-x86_64-Pure64 located here. This is for a pure 64bit CLFS build. Going to give it a try myself.
Keep in mind about the Gentoo Live_DVD version 10, as a live distro for your build
Thanks for that, will try out the kernel tonight!
As for the outdated LFS, it was the only x86_64 version I could find. I'm not sure about CLFS, is there a way to do x86_64 from the "normal" LFS (x86) book? Or should I just give CLFS a try instead?
EDIT: Having had a look, I'm gonna go the CLFS route and see how that goes. I'll use the kernel you prepared for me (massive thanks for that, by the way!) and hopefully tonight I'll end up with a fully working system!
I'm gonna try out your kernel on my current "in-progress" LFS build, though, before I wipe all that and start again with the bleeding-edge CLFS.
I'm also going to take your suggestion about using the Gentoo live DVD.
Since I have taken up this challenge also ... I wanna share with you some hints about the GCC 4.4.1, also share my hacked .bashrc file you can use when you reach step:
(Chapter 10. Installing Basic System Software)
FYI: I have chosen the chroot route, much easier since my arch types match, I suggest you do the same if you boot the Gentoo Live_DVD with the 64bit kernel.
It mentions a link in Chapter 10 to the gcc optimizations etc... etc... there outdated for your processor, and mine.
So... I made a little hack to make things a little nicer... :)
Once you have chrooted and have reached CHPT 10, create a .bashrc file in /root directory and add these contents:
NOTE: if your having any compiling error's try removing "-ftracer" first and then try compiling again, it shouldn't be a problem, and I haven't had any trouble with similar flags.
Also, if you want this .bashrc sourced for the colored prompt every time you login, you need to add this line to your .bash_profile.
Check out the aliases I added, "cd /" to the base directory and type "du" you'll notice a nice readable du format & then try the command "path" you'll then noticed that there is a nice print out of your $PATH variable. These are nice aliases to have building this CLFS, IMHO. You can use the "du" command in any directory to give you the directory sizes (disk space used).
Also if you ever get confused, because you have multiple terminals open with the same colors. In the "chrooted" CLFS terminal window type this:
(I added this to the .bashrc above)
I added a file called "DIR_COLORS" this is the file Gentoo uses to set its colors in prompt for files,dir ... etc. Remove the ".txt" and add it to the /etc directory of the CLFS install. So, when you ever source ~/.bashrc, you'll have colors for your tar files, and others...
And remember to source ~/.bashrc whenever you chroot.
I'm having some trouble with the Gentoo Live DVD. Can't get it to start X. It just goes to a black screen with a cursor at the top, as if waiting for text input. Nothing else happens, and every 30 seconds or so, I see the DVD activity light come on for a few seconds, then go off.
Any ideas? I'd like to get started with this ASAP. Thanks.
Have you tried the different kernel? Or, any of the boot options? I am guessing it might be conflicting with your video card. Try kernel gentoo-nofb and see if that has an effect, along with a boot option. You can read the boot options on the DVD in a text file, or at startup hit F2, to list all the options. If all else fails, I have had the best luck and hardware detection with Sabayon's Live DVD 4.2. Its way bloated, but it works, and even autoloads my nvidia drivers.
BTW, I finished up my CLFS, and hacked the sh*t out of it. I dont know if you know much about sysinit... Its the init that starts all the devices and any loadable modules & daemons on bootup. In the CLFS book they bundle there own, (There crappy and not manageable- total hacks) So, I added Roy Marple's OpenRC 5.0 . I had to patch the code to get it to work with my CLFS, but man what a difference. I think I am going to write up a CLFS hint for this project. It makes a world of difference.
I also recommend you follow my previous hints, it helps alot:
(I have edited it, and also added an attachment for more colors at the prompt. The attachment is from Gentoo).
I have another hint that can be extremely useful when downloading all of those packages. It grabs all the downloads in one full scoop. Let me know when you get up and running, and I'll help you through this... Let me know if i you want the commands to DL all the packages at once.
|All times are GMT -5. The time now is 12:12 PM.|