Sata drive issues.

Discussion in 'General Discussion' started by evilpengw1n, Feb 22, 2014.

  1. evilpengw1n

    evilpengw1n New Member

    Joined:
    Oct 21, 2013
    Messages:
    26
    Likes Received:
    0
    So now that I've figured out the drive, I'm not quite sure what's going on. I installed linaro 12.04 on the microsd (so i could have u-boot 2013) as well as on the sata drive. same procedure, then used gparted to fill up both drives (16gb micro, 500gb sata). Booted, watched 115200, used 'setenv root root=/dev/sda1' the 'boot', and it booted succesfully. However, 'df -mh' shows:

    Code:
    ubuntu@udoo:~$ df -mh                                                           
    Filesystem      Size  Used Avail Use% Mounted on                                
    /dev/root       6.7G  2.4G  4.0G  37% /                                         
    devtmpfs        438M  4.0K  438M   1% /dev                                      
    none             88M  2.6M   86M   3% /run                                      
    none            5.0M     0  5.0M   0% /run/lock                                 
    none            438M  100K  438M   1% /run/shm
    Which is weird, because it booted succesfully and fdisk -l looks like I thought it would:
    Code:
    ubuntu@udoo:~$ fdisk -l                                                         
                                                                                    
    WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn
    't support GPT. Use GNU Parted.                                                 
                                                                                    
                                                                                    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes                                     
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors           
    Units = sectors of 1 * 512 = 512 bytes                                          
    Sector size (logical/physical): 512 bytes / 512 bytes                           
    I/O size (minimum/optimal): 512 bytes / 512 bytes                               
    Disk identifier: 0x000c356e                                                     
                                                                                    
       Device Boot      Start         End      Blocks   Id  System                  
    /dev/sda1           16065   970928127   485456031+  83  Linux                   
    /dev/sda2       970928128   976773119     2922496   82  Linux swap / Solaris    
                                                                                    
    Disk /dev/mmcblk0: 15.7 GB, 15707668480 bytes                                   
    255 heads, 63 sectors/track, 1909 cylinders, total 30679040 sectors             
    Units = sectors of 1 * 512 = 512 bytes                                          
    Sector size (logical/physical): 512 bytes / 512 bytes                           
    I/O size (minimum/optimal): 512 bytes / 512 bytes                               
    Disk identifier: 0x000c356e                                                     
                                                                                    
            Device Boot      Start         End      Blocks   Id  System             
    /dev/mmcblk0p1           16065    14201459     7092697+  83  Linux

    Problem resolved. Resolution:
    Code:
    setenv mmcroot /dev/sda1 rootwait rw
    U-boot 2013 uses mmcroot.
    Code:
    ubuntu@udoo:~$ df -mh
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/root       456G  2.4G  431G   1% /
    devtmpfs        438M  4.0K  438M   1% /dev
    none             88M  2.6M   86M   3% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            438M   88K  438M   1% /run/shm
    
     
  2. rolly

    rolly New Member

    Joined:
    May 12, 2014
    Messages:
    14
    Likes Received:
    0
    How might I make this correction?
     
  3. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Enter this line by line :-

    setenv sataroot "/dev/sda1"
    setenv satadev 0
    setenv satapart 1
    setenv loaduimagesata 'ext2load sata ${satadev}:${satapart} ${loadaddr} ${uimage}'
    setenv sataargs 'setenv bootargs console=${console},${baudrate} root=${sataroot} ${hdmi_patch} fbmem=24M video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32'
    setenv sataboot 'echo Booting from sata ...; run sataargs ; bootm'
    setenv bootcmd 'sata dev ${satadev}; run loaduimagesata; run sataboot;'
    saveenv
    reset

    But how I do it is :

    Boot from the SD image with default uboot setting with sata drive backed up in a state you can reformat and start again:
    fdisk /dev/sda ... delete all partition and make two new partitions , 16gb and the other the rest .
    format the first partition .. mke2fs -j /dev/sda1
    mount /dev/sda1 /mnt
    download / unzip and copy the rootfs to your mount point
    download / unzip and copy kernel and modules to the mount point
    reboot
    set up uboot to uses the sata drive to boot
    format the second partition .. mke2fs -j /dev/sda2
    mount the big partition to the mount point so you can share it.
     
  4. rolly

    rolly New Member

    Joined:
    May 12, 2014
    Messages:
    14
    Likes Received:
    0
    I have an inexpensive ($70) 120 GB SATA SSD hooked up to my UDOO.
    I had originallly followed the proceedure in http://www.elinux.org/UDOO_boot_from_sata.
    Using it bootup was OK (albeit slow), I could see both the micro sd card & the sata drive, but the system was slow.

    I performed bootus-interuptus using a serial connection to a pc, entered
    Code:
    setenv mmcroot /dev/sda1 rootwait rw
    as you suggested,
    along with
    Code:
    saveenv
    , rebooted, & magic happened.

    My UDOO went from disappointing slow, to a real speed daemon. Bootup & program execution became comfortably fast.

    Consequences noticed so far:
    - micro SD card no longer appears (but that's OK as I didn't want it to be used for anything).
    - Firefox disappeared (
    Code:
    sudo apt-get install firefox
    got it back.
    - desktop background & icons vanished.

    Thanks for the help.
     

Share This Page