Find the answer to your Linux question:
Results 1 to 7 of 7
I am a novice for Linux. I have tried to boot the LFS kernel 2.6.11.12 from a SATA Hard drive. I have done the following steps to bring the Linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    6

    LFS Kernel on SATA drive: VFS: Cannot open root device "sda1" or unknown-block(0,0)


    I am a novice for Linux. I have tried to boot the LFS kernel 2.6.11.12 from a SATA Hard drive. I have done the following steps to bring the Linux OS up.



    I have used LFS live CD and a setup file to create two partitions sda1 and sda2 and copied the linux image along with my application onto sda1 and sda2 is left blank.
    I have modified the etc/fstab to include /dev/sda1 to be mounted as / (root).
    I have modified the boot/grub/menu.lst to include the following lines.
    root (hd0,0) ŗ one hard drive and first partition

    kernel /boot/lfskernel-2.6.11.12 root=/dev/sda1 ŗ kernel image is in /dev/sda1 and is verified with grub command line by pressing TAB

    Now when I rebooted the PC, it showed the following error.
    VFS: Cannot open root device "sda1" 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 could understand that it is something related to loading File System but why it says cannot open root device /dev/sda1 as this partition is available and the grub itself gets loaded from this location only. I would be grateful if you could answer the following questions.

    1. With this state, Can I confirm that the Linux kernel 2.6.11.12 has identified SATA hard drive (i.e., SATA driver support is available in the kernel)? Also I tried building the LFS kernel again with SATA related changes by reconfiguration and that also failed.

    2. What is the problem with /dev/sda1? as the same procedure works fine with PATA hard drive (IDE).

    3. I have also tried using a Initial RAM disk to support the temporary file system but nothing fruitful. But the initrd image what I used is not the same kernel image but taken from Fedora core 4 installation. I think it does not matter to boot the Linux.



    I have gone through many linux forums and I didnít get the problem completely. It would be helpful if you could suggest me on what exactly went wrong.



    Best Regards,

    Murali

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,040
    The method you have used does not sound like the one from the LFS handbook. It sounds as though the kernel does not have support for you hard drive built in. I had similar problems when I tried to strip everything out of the Gentoo kernel. I suggest you go back into the kernel config and check you have all hard drive support. You can generate the kernel image and save it with a suitable name to allow you to boot back into the system in future - without having to boot from the live CD again. Then remove support from the kernel you think you don't need and give your new kernel image a different name.

    You will probably struggle to get much support if you are not following the LFS handbook. Anyway ... good luck building your system.

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    6
    Dear jonathan,

    Thanks for the reply. As per your suggestion, i have tried rebuilding the LFS kernel 2.6.11.12 by enabling all the SATA hard disk related drivers and initial RAM disk support as given below:

    #cd /usr/src/linux-2.6.11.12
    #make menuconfig
    #make bzImage
    #cp arch/i386/boot/bzImage /boot
    #cp System.map /boot
    #reboot

    When i again see the /boot folder, i could not find the initrd image there. Should i need to do any thing? I believe the new lfs kernel will have all the SATA build-in drivers and when i used it, no difference and it throws the same error.

    Let me know what exactly am missing here.

    Best Regards,
    Murali

  4. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,040
    I had a quick look at the LSF manual and there is no mention of initrd. Which makes me think the default setup is probably not using ramdisk, and you will need to look at the readme file the manual refers to. You should be able to put all the disk support in the kernel and remove things gradually once you get the system to boot.
    It may also be worth you taking a look at something like the Gentoo handbook.

  5. #5
    Just Joined!
    Join Date
    Mar 2008
    Posts
    6

    Regarding LFS 6.3 Profile

    Hi All,

    I want to take LFS build with kernel version 2.6.23. Is there any profile available to build the same? Should i need to right my own profile to do so?

    Awaiting early reply.

    Best Regards,
    Murali

  6. #6
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    A couple things here. Check both the LFS book AND the kernel README for the proper way to build a kernel. Not only are you not building and installing modules, but the bzImage target hasn't been used directly for quite awhile, the 2.4 kernel IIRC. Also, you're not building an initrd with your commands, and you're once again not even building the modules to put into your initrd. If the kernel is only going to boot this one box though then likely you won't even need an initrd. The problem with the kernel not booting though could be your filesystem drivers. Make sure the ones you need to boot are built in, and not modules. Same with the SATA drivers, though you already mentioned they are built in.

  7. #7
    kmj
    kmj is offline
    Just Joined!
    Join Date
    Feb 2010
    Posts
    1
    Quote Originally Posted by valan View Post
    A couple things here. Check both the LFS book AND the kernel README for the proper way to build a kernel. Not only are you not building and installing modules, but the bzImage target hasn't been used directly for quite awhile, the 2.4 kernel IIRC. Also, you're not building an initrd with your commands, and you're once again not even building the modules to put into your initrd. If the kernel is only going to boot this one box though then likely you won't even need an initrd. The problem with the kernel not booting though could be your filesystem drivers. Make sure the ones you need to boot are built in, and not modules. Same with the SATA drivers, though you already mentioned they are built in.
    I have had the similar challenge while making a Live CD of my own. I was compiling kernel 2.6.17 and in the .config i erred. Important things like ext3 filesystem, SATA support etc. need to be built into the kernel (not as modules). Did the following change in .config:
    .....
    CONFIG_SCSI_SATA=y
    CONFIG_SCSI_SATA_AHCI=y
    ....
    and it booted fine. Hope that helps somebody. I m attaching my config file sample also.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •