Help with Kernel for SATA
HELP!
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 2.6.22.1), 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: Code:
failed to IDENTIFY (I/O error, err_mask 0x4) 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, 2.6.22.1, as that's the version currently recommended by the SVN version of the LFS book. I'm not using any patches, simply: Code:
make mrproper 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! http://pastebin.com/m4bc53f00 |
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 ... Quote:
|
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. EDIT: CONCERNS - 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: http://www.mediafire.com/?sy9nu3yzwsy This is for GCC 4.3 and below e.g. (4.1 - 4.2.4) http://www.mediafire.com/?zyfd94jg1s0 Build instructions: Code:
# cp linux-2.6.31-zen1.tar.bz2 /usr/src && cd /usr/src 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. EDIT: 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. Thanks again! |
1 Attachment(s)
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. HINT: 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: Code:
# /etc/bash/bashrc 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. Code:
. /root/.bashrc 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) Code:
# export PS1="(clfs) $PS1" Code:
# source .bashrc Code:
# make -j5 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. |
Quote:
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. |
Good luck with your write-up. I'll give it a try when I finish my clfs. I'll have a look through the boot options when I finish work tonight (12:30!).
|
FYI, I made some edits to my previous posts ... have a look...
|
Sorry, ignore this post. I had some trouble with cloog but I posted prematurely and it's sorted now. Mods please delete if reading.
My apologies. |
Curious ... Did you get the Gentoo Live disk working..? & how did the kernel .config work out for ya...?
|
Wayhay! My system is alive! I didn't get the gentoo disk working, just used the lfs livecd with the clfs book and sources. That seemed to be easiest as I knew I already had x working on there.
The config you made me worked great! Thanks so much for that. I'm now looking forward to your hints, let me know when they're done! I shiuld be able to work on the system for a couple of hours tonight, then spend some proper time on it (blfs stuff) on saturday. The only problem i've encountered so far is that it won't bring up eth0, so no network access. This is my no. 1 priority at the moment as I need to get wget-ing! I don't know where to start though, weather it's a kernel thing or what. Thanks again! EDIT: Got eth0 up and running with a kernel recompile. Had to enable the forcedeth drivers. Now I'm gonna quickly try and get wget installed and running before I head off to work again. |
Quote:
I take no credit in any way for this kernel, just helping with your .config (This credit goes to the maintainers of the zen-overlay at Gentoo & the developers @ zen-sources.org) Also, I am sure you are using the standard LFS bootscripts right...? You should take a look @ Roy Marples OpenRC 0.5.0, I implemented it into my init startup ... and man... so much better... a way clean startup (boot), that I also can run in parallel, and with using Gentoo's dhcpcd init daemon for dhcp. Also, it has a boot logging feature that writes to a log file in /var/log/rc.log for any troubleshooting of any startup issue's (very handy). Much better than any BSD, or LFS setup I could find. I have been documenting this implementation, and have been working on some patches for the CLFS pure64 svn setup. I am having trouble with installing the CLFS multilib-svn at the moment ... Going to try it with a liveDVD instead, to see if that will work. Once I have setup the Multilib, and have tested and added ARCH's ABS support, I'll post on my up and coming blog (still a work in progess) BTW: Did you use any of my hints with the .bashrc and the DIR_COLOR..? It makes a great colored console, and sets your global gcc flags. Things I have implemented into my CLFS pure64 & issue's I had: 1- Custom .bashrc with/ colors (some borrowed from Gentoo) 2- Implementation of Roy Marples OpenRC 0.5.0 inits and tool sets :D, awesome stuff IMHO. (I had to patch the source to get it to compile correctly and have confirmed it with Roy & he has said there will be new release soon to resolve this issue.) 3- A big problem was with my locale's ... arrgh ... all my console characters where way out of wack... even with exporting the locale in my /etc/profile :banghead: I decided on using Debians tool called "locale-gen" which reads a config file in /etc called locale.gen. This tool sources my init's function.sh; to set the right terminal & then uses the config file to set my global locale's (awesome fix...!) Now all of my dialog boxes (e.g. menuconfig, pkgtools), and any console commands are set correctly. No more garbled console output..Woo Hoo..! If you have a similiar problem let me know, so I can upload the scripts and config files for this fix. OVERVIEW & CONCLUSION: You inspired me to give CLFS pure64 a try ... thanks & in no way did I intend on hijacking your thread .. just wanted to contribute... Now I am at a base install w/ all proper inits, udevd rules, and with proper shutdown scripts. So now I am at the level of adding any additional packages and programs. I have added nano, rsync & wget ... that's about it. The reason for this is I am looking into & researching a "TRUE" solution to managing packages properly, once you enter the realm of BCLFS. This is all dandy, being able to add packages from their source, and using InstallWatch to monitor where each file is installed .. etc.. What a pain when it comes to removing any packages or upgrading... I have been asking around in the ARCH's forums addressing this issue... I gave a brief synopsis and have had some great responses to my challenge, and some contribution to implementing ARCH's ABS system into CLFS, their are MAJOR advantages to this IMHO, like making and editing the PKGBUILDS, and using ARCH's AUR... some might disagree with this, because it takes away from the LFS philosophy of a true LFS Linux environment... I say config at one's hearts content... & borrow any tools and source code along the way, no limitations. I have briefly tried a Slackware solution, and with my lack of knowledge of Slackware's pkgtool's & issues with tar, and the lack of any documentation on this, I've abandoned using pkgtool... Would be great to see it I could get working ... So if you have any idea's on managing your package source... please share. It would be nice to implement a true fakeroot environment to build a package from source, and then install the package into the correct FHS layout of CLFS. A good example of this is Gentoo's ebuilds & sandbox, or ARCH's pacman, makepkg & PKGBUILDS. |
Try the Sis900 2.6.0a driver for that. I think you'll find it doesn't have the problems the old one did.
|
All times are GMT -5. The time now is 07:29 PM. |