[solved] booting from sata

Discussion in 'Troubleshooting' started by schnabelvieh, Jan 18, 2015.

  1. schnabelvieh

    schnabelvieh New Member

    Jan 18, 2015
    Likes Received:
    Hello All,

    i'm new to this forum and really new to embedded linux. I've been trying for quite a while to figure out how to boot from a sata disk. Well, I didn't succeed. My aim is to install a gentoo-distro.

    The following is the partition-layout of my sata disk:

    /dev/sda1          20480    307199    143360  83 Linux
    /dev/sda2         307200  20787199  10240000  82 Linux swap / Solaris
    /dev/sda3       20787200 234440703 106826752  83 Linux
    and my fstab:

    /dev/sda1               /boot           ext2            noauto,noatime  1 2
    /dev/sda3               /               ext4            noatime         0 1
    /dev/sda2               none            swap            sw              0 0
    /dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
    /dev/fd0                /mnt/floppy     auto            noauto          0 0
    proc                    /proc           proc     defaults        0 0
    sysfs                   /sys            sysfs     defaults        0 0
    I've tried several things.

    1) I used the unico Kernel, which is available at git. I compiled the kernel using the config from
     cat /proc/config.gz 
    from a running UDOObuntu_quad_v1.1.zip
    I compiled it with
     make -j5 LOADADDR=0x12000000  uImage 
    , copied it to my boot-partition which is /dev/sda1 and did all the uboot - commands step by step to make sure the kernel would be found.

    NOTE: The kernel was done in a "chrooted" environment with a fresh gentoo stage 3 installation.

    Unfortunately that was all I was able to achieve. The boot process stopped imediately after the Kernel Welcome Message "Starting Kernel" was issued.

    2) I copied the kernel form a running UDOObuntu_quad_v1.1.zip to my boot-partition, modyfied the uboot variables to
     sataargs=setenv bootargs console=${console},${baudrate} root=${sataroot} ${hdmi_patch} ${memory} ${video}   
    sataboot=if sata init; then echo Booting from sata ...; run sataloaduimage; run sataargs; bootm; else sata boot failed; fi
    sataloaduimage=ext2load sata 0:1 0x12000000 uImage
    and did a run sataboot.

    This time the kernel booted until it stopped with

    NOTE: On my sata disk was a fresh gentoo stage 3 installation.

    [    3.026253] snvs_rtc snvs_rtc.0: setting system clock to 2015-01-18 17:22:14 UTC (1421601734)
    [    3.035514] VFS: Cannot open root device "sda3" or unknown-block(0,0)
    [    3.041971] Please append a correct "root=" boot option; here are the available partitions:
    [    3.050342] b300        15558144 mmcblk0  driver: mmcblk
    [    3.055675]   b301         6803527 mmcblk0p1 00000000-0000-0000-0000-000000000000
    [    3.063248] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [    3.071551] [<800475d4>] (unwind_backtrace+0x0/0xfc) from [<8065e690>] (panic+0x74/0x19c)
    [    3.079750] [<8065e690>] (panic+0x74/0x19c) from [<80008cc4>] (mount_block_root+0x16c/0x220)
    [    3.088204] [<80008cc4>] (mount_block_root+0x16c/0x220) from [<80008e50>] (mount_root+0xd8/0xf4)
    [    3.096998] [<80008e50>] (mount_root+0xd8/0xf4) from [<80008f8c>] (prepare_namespace+0x120/0x184)
    [    3.105899] [<80008f8c>] (prepare_namespace+0x120/0x184) from [<800083dc>] (kernel_init+0x108/0x144)
    [    3.115053] [<800083dc>] (kernel_init+0x108/0x144) from [<80041080>] (kernel_thread_exit+0x0/0x8)
    [    3.123941] CPU1: stopping
    Well, mmm, what I don't understand is the fact, that I'm offered a couple of partions from the sd card and not from the sata disk. Is the kernel missing some sata-support?

    Can anybody give me a hint ?

    Thanks in advance and have a nice evening,

  2. schnabelvieh

    schnabelvieh New Member

    Jan 18, 2015
    Likes Received:
    Hello again,

    well, it is up and running now ;-) I copied my gentoo installation to a root partition with an ext3 filesystem instead of an ext4 filesystem. I dont't know wether this is a kernel-configuration or a uboot-configuration problem.

    My uboot - image is the U-Boot 2013 release 2.1 available at udoo.org, the kernel is still identical to the one used in the UDOObuntu_quad_v1.1.zip release.

    Haven't tried yet with a self-compiled unico kernel.

    Have Fun,

  3. delba

    delba Administrator Staff Member

    May 8, 2013
    Likes Received:
    schnabelvieh, glad you solved your issue, and thanks to sharing it with us ;)

Share This Page