Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
I would like to beg someone to help a rookie please. I am trying to get a new gentoo dist to work on a VIA pico ITX. It has two ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    6

    Problem getting new kernel to boot on uncommon platform


    I would like to beg someone to help a rookie please.

    I am trying to get a new gentoo dist to work on a VIA pico ITX. It has two HDD's, one ancient PATA having some equally ancient gentoo kernels (they work) and a new fancy SATA SSD that has problems. The SSD having one of the ancient kernels (that works on this disk as well) but the new one I'm trying to get running is hopeless (the new dist with issues are 2.6.31-r10).

    I'm getting this :
    > Cannot open root device "sda3" or unknown-block(0,0)
    > Please append a correct "root=" boot option; here are available partitions:
    > Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

    I think I have the correct kernel choices, like SCSI-support and all that, but I'm not sure any more. I have tried using the old kernel config set up to the new one, but after a few weeks of trying I just find myself guessing.

    I attached some files with system information and things that may be needed for fault trace.

    Help is, needles to say, appreciated.

    Oh, one more thing, the old kernel puts the SATA disk as HDA, while the new one names it SDA. I know this has to be changed in the fstab-thing, but that is a later problem. I think I need it to find its partitions first.

    Kind regards
    //Pelle
    Attached Files Attached Files

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,225
    What the kernel calls your hard drive depends on what driver you have configured. If you have used the old IDE driver, it will use the hd* convention. If you have ticked the new PATA/SATA driver (which is supposed to work on both IDE and SCSI disks), it will use sd*. People often bypass this problem by using UUIDs rather than partition designations for their drive partitions in both grub and fstab, but that only works if you use an initrd image; I think Gentoo makes one for you if you use genkernel to build your kernel but not otherwise.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    6
    Hi there Hazel,

    I'm not quite following you, maybe cause I'm not that familiar with the Linux semantic yet. But to me it seams that the kernel can't talk to the scsi
    devices despite I have enabled the scsi block device driver in the kernel. If I used the wrong drive letters wouldn't the screen output something about my drives if it actually could read something from the devices? Now it just states: "here are available partitions:" then "Kernel panic...".

    I'm not using genkernel I choose the kernel options myself. I don't think I use initrd or UUID (I have not actively come across those terms yet either). The thing is, I have one kernel on my new SATA disk that works, its only the new kernel that fails so I don't mind fiddling with the drive letters if its possible to get the new kernel to work as simple and slim as possible.

    Thanks for your input and kind regards.

    //Pelle

  4. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Quote Originally Posted by Pelle View Post
    I have tried using the old kernel config set up to the new one, but after a few weeks of trying I just find myself guessing.
    ...
    Oh, one more thing, the old kernel puts the SATA disk as HDA, while the new one names it SDA. I know this has to be changed in the fstab-thing, but that is a later problem.
    What do you mean by this ... do you have a .config for the old kernel version which you have copied across to your new kernel /usr/src/new_kernel_folder and run oldconfig and then compiled the kernel using the resulting .config or is your old kernel 2.4 - in which case have you used this?

    Quote Originally Posted by hazel View Post
    People often bypass this problem by using UUIDs rather than partition designations for their drive partitions in both grub and fstab
    I started using uuid information for most partitions, so end up with entries in fstab something like
    /dev/disk/by-uuid/the_uuid_for_the_partition / ...
    But if you prefer you can use /dev/sd... or /dev/hd... instead - or you could use label= instead.

  5. #5
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,225
    Quote Originally Posted by Pelle View Post
    Hi there Hazel,

    I'm not quite following you, maybe cause I'm not that familiar with the Linux semantic yet.

    I'm not using genkernel I choose the kernel options myself. I don't think I use initrd or UUID (I have not actively come across those terms yet either).
    Sorry for jargon! An initrd is an "initial root device", actually a ramdisk with a miniature disk image on it. The kernel mounts this as its root device and loads any necessary drivers from it, then switches to the actual root partition on your hard drive. You really only need one if you are using a generic precompiled kernel such as most Linux distros provide.

    In Gentoo, you are supposed to compile your own kernel (as you have done) and include only the drivers you actually need, so you don't need to use an initrd.

    UUIDs are universal identifiers for partitions, an alternative to the traditional hd*/sd* designations. However they only work if you have a fully populated /dev directory and that will only be the case if you have some kind of root device mounted - either an initrd or your real root partition. You have not got that far yet.

    I would definitely see to it that grub and fstab agree on what the partitions are called. You can try both hd* and sd* to see which one works but do use the same one in both places.

    If it's any comfort, you are going to end up knowing a good deal more about Linux as a result of solving this problem.
    Last edited by hazel; 03-22-2010 at 03:48 PM.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  6. #6
    Just Joined!
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    6
    No problem Hazel, one have to learn the jargon eventually, now better then later. Don't want to stay rookie forever...

    But the thing that bothers me most is that I actually solved this problem once (after a bottle of champagne and some heavy drinking in the pub) all worked nicely until I should type in "root", then the keyboard didn't work. Then I must accidentally (or possibly had think it was a good idea then) have remove or overwritten the .config file or changed something back. Because now I'm back to where I began and I don't have a clue of what I did...

    If I haven't figured this one out to the weekend I have to buy another bottle Billicarte Salmon again, It was nice. I can recommend it.

  7. #7
    Just Joined!
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    6
    Quote Originally Posted by Jonathan183 View Post
    What do you mean by this ... do you have a .config for the old kernel version which you have copied across to your new kernel /usr/src/new_kernel_folder and run oldconfig and then compiled the kernel using the resulting .config or is your old kernel 2.4
    Yes I have saved some .configs for kernels (old kernels that is 2.6.25-r that I know work for this platform. And I tried allot of variants for exporting the configurations to the new one.

    However the method I prefer is to run the old kernel on the old disk and then mount the new disk in /mnt/new-gentoo/.

    Then I start up x and run [/mnt/new-gentoo/usr/linux/make menuconfig] and [/usr/linux/make menuconfig] in two different consoles. Then I simply compare them side by side, menu for menu... And when I'm done I answer Yes to save changes, then I umount the disk from /new-gentoo/. Then I reboot and starts the kernel on the new disk and compile the new kernel there.

    I'll think I got a few more ideas while reading your posts, I think I may try some more (unless you think my possible unorthodox way of making menuconfigs is bizarre and non-functional that is)..

    Best regards and have a great day/evening folks!

    //Pelle

  8. #8
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043

    Suggest using oldconfig then menuconfig

    I'd copy your old .config from your 2.6.25 kernel and run oldconfig ... then run menuconfig after to double check for sensible entries. You should be prompted for new entries and get clues about default values as well. When I update kernel I run a script like this ... which has worked for me up until now at least. I have a copy of .config which I keep in /usr/src with relevant sudo entries for nopasswd use of sudo commands in the script. I keep one backup kernel image to allow system boot incase the new kernel will not boot
    Code:
    echo Check output of eselect is correct for symlink - press enter
    eselect kernel list
    read
    echo Change to source folder
    cd /usr/src/linux
    echo Now clearing old compile info - press enter to continue
    read
    sudo chown jonathan /usr/src/linux/* -R
    sudo chown jonathan /usr/src/linux
    make mrproper
    echo Copy config to source folder
    sudo cp -p /usr/src/.config /usr/src/linux/
    echo Next configure the kernel
    make oldconfig
    make menuconfig
    echo Now compile the kernel - press enter to continue
    read
    #sudo chown jonathan /usr/src/linux/* -R
    make && make modules
    echo Now install modules
    sudo make modules_install
    echo Now copy latest image to /boot/kernel-latest - press enter
    read
    cp arch/i386/boot/bzImage /boot/kernel-current
    echo Check kernel dates
    ls /boot -l
    echo now re-emerge nvidia drivers - press enter
    read
    sudo emerge -av nvidia-drivers

  9. #9
    Just Joined!
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    6
    Thanks allot Jonathan and Hazel.

    New kernel is up and running: keyboard, piezo-electric PC-speaker, discs... Everything you'll ever need to power a motorcycle GUI. Neat!

    Well then, time to tell the world what the matter was; I didn't realize that the menu [Serial ATA (prod) and Parallel ATA (experimental) drivers] had sub menus. The resolution caused the window to precisely remove the '--->'. I also must have looked in the wrong .config when I was sure about the SCSI-drivers being enabled. Quite embarrassing this actually!


    Summarize: Kernel error; [Serial ATA (prod) and Parallel ATA (experimental) drivers] ---> [ATA SFF support] was not selected.

    Again thanks allot, I think your input got me on right track. B.T.W Jonathan I was thinking to copy part of that script you posted, if you don't mind of course...

    Have a good night now

    //Pelle

  10. #10
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Quote Originally Posted by Pelle View Post
    B.T.W Jonathan I was thinking to copy part of that script you posted, if you don't mind of course
    no problem ... it's not optimised but hope it helps - my main reason for the script was compiling the kernel as a regular user, which it seems to work for. When I make a mess of things or decide to play with the config further once I have compiled the kernel I run another script ... similar but uses existing config
    Code:
    echo Change to source folder
    cd /usr/src/linux
    sudo chown jonathan /usr/src/linux/* -R
    sudo chown jonathan /usr/src/linux
    make oldconfig
    make menuconfig
    echo Now compile the kernel - press enter to continue
    read
    #sudo chown jonathan /usr/src/linux/* -R
    make && make modules
    echo Now install modules
    sudo make modules_install
    echo Now copy latest image to /boot/kernel-latest - press enter
    read
    cp arch/i386/boot/bzImage /boot/kernel-current
    echo Check kernel dates
    ls /boot -l
    echo now re-emerge nvidia drivers - press enter
    read
    sudo emerge -av nvidia-drivers

Page 1 of 2 1 2 LastLast

Posting Permissions

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