how to check booting on ubuntu from sd card for a13 wifi

Started by vaishali, February 11, 2013, 06:31:15 AM

Previous topic - Next topic

vaishali

hi everyone.i want to know how to check that my a13 wifi is booting from sd card.i have loaded debian with gui on my 16gb sd card.but i am always getting boot from nand with android image held in nand.can anyone help me with this.
dinks

drspastic

as far as i know the sd card should override the nand flash. there are ways to permanently disable nand but im sure you wont want that.

bear in mind that some sd cards just refuse to work for some reason. it seems manufacturers dont abide by a strict standard of geometry, bytes, and who knows what else. personally i had most luck with transcend but try a few brands (if you can).

what image are you using? how are you writing it? have you tried to write it several times?
https://www.olimex.com/forum/index.php?topic=537.0
thats the one i had good luck with, the guy really knows his stuff.
if your writing the card with dd from linux i have a few tips that helped (me):

partition the card before you start as one block fat32.
dd from your linux machine from console without x running, ie not in a window. press ctrl alt backspace to shut x down.
make sure dd finished without errors.
mount card in linux (in x) and check all files and folders look ok and are accessible.
do this from sudo startx incase you dont have permissions (you have to dd from sudo su.

test for boot, if all is good then partition the rest of your card with what you want as the image only uses 4gig. so either grow the partition 2 to fill the disk or add swap, home, or just a blank storage space, whatever you need, and remember to set mount points, swapon, etc if you need to.

the above steps made all the difference to me getting a working card for the first time, now i just change the kernel as updates come out which is quick and easy, and well documented on the thread above.

(if some of what i write is obvious, its not talking down to you, but other people might read the thread and be helped. im a newbie myself and while things like partitioning and formating the card before dd should make no difference (dd overwrites at the lowest level) in practice it did)

it drove me crazy the first few times getting a booting card, best of luck to ya.

vaishali

sorry drspastic,but i really didn't get what u have said.i am trying to copy the debian with gui image R12 of jwischka.i have a quati on that whether i shoud directly copy the r12 image withot partition on sd card or do i need to make partition on it.i have tried many atimes partitioning my usd card, and copy the image r12.but i don't know what to do after attaching my usd card to a13 wifi board.and is there any need to install gcc and kernel and the rest of the thing.
dinks

vaishali

and one more quation,how can i select booting fron sd card.after power on i get messege of androi boot on putty.i have pressed the key to stop automatic booting from nand.But i don't understand what should i write in the putty terminal to start booting from sd card.and i thing i have corrupted my sd card.please anyone can help me with this.
dinks

jwischka

Quote from: vaishali on February 11, 2013, 04:18:51 PM
sorry drspastic,but i really didn't get what u have said.i am trying to copy the debian with gui image R12 of jwischka.i have a quati on that whether i shoud directly copy the r12 image withot partition on sd card or do i need to make partition on it.i have tried many atimes partitioning my usd card, and copy the image r12.but i don't know what to do after attaching my usd card to a13 wifi board.and is there any need to install gcc and kernel and the rest of the thing.

Did you follow the instructions for imaging the card in the thread? Specifically, use WinDiskImager32 (in Windows) or dd (in Linux)?

Also, is there some reason you are using R12 instead of R15?

There is nothing you will have to do to get the board to boot from SD - if there is a bootable card, it will boot from SD. If not, it will boot from NAND. Pausing uboot does not let you select between flash/nand - it only pauses the boot on whichever one is being booted from.

vaishali

yes i did followed the instructions for sd card partitioning and loading image, but still i am getting the same android boot.currently i havn't downloaded r15 image. i have R12 so i am trying to load it on my a13 wifi.i have partitioned my 16gb sandisk card using below commands.


gmd5@gmd5:~$ sudo su
[sudo] password for gmd5:
root@gmd5:/home/gmd5# Is /dev/sd
sda   sda1  sda2  sda5  sda6  sda7  sdb   sdb1  sdb2  sdc   
root@gmd5:/home/gmd5# Is /dev/sd
sda   sda1  sda2  sda5  sda6  sda7  sdc   
root@gmd5:/home/gmd5# fdisk -u=sectors /dev/sdb

Command (m for help): p

Disk /dev/sdb: 15.9 GB, 15931539456 bytes
64 heads, 32 sectors/track, 15193 cylinders, total 31116288 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048       34815       16384   83  Linux
/dev/sdb2           34816    31116287    15540736   83  Linux

Command (m for help):
Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Selected partition 2

Command (m for help): 2
2: unknown command
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-31116287, default 2048): 2048
Last sector, +sectors or +size{K,M,G} (2048-31116287, default 31116287): 34815

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 2): 2
First sector (34816-31116287, default 34816):
Using default value 34816
Last sector, +sectors or +size{K,M,G} (34816-31116287, default 31116287):
Using default value 31116287

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
root@gmd5:/home/gmd5# mkfs.vfat /dev/sdb1
mkfs.vfat 3.0.9 (31 Jan 2010)
mkfs.vfat: /dev/sdb1 contains a mounted file system.
root@gmd5:/home/gmd5# mkfs.ext3 /dev/sdb2
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
972944 inodes, 3885184 blocks
194259 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3980394496
119 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
   32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@gmd5:/home/gmd5# dd bs=4M oflag=sync if=olinuxino_xfce-r12.img of=/dev/sdb46+1 records in
46+1 records out
194576384 bytes (195 MB) copied, 0.0990989 s, 2.0 GB/s
root@gmd5:/home/gmd5#


then i have inserted my sd card in a13 wifi board , with my putty open. now i have started my board by giving power to it. i have connected vga screen , but i am still getting android image. do i need to do any password or login for this.
please be patience cause i am really new to these linux environment.
thank you in advance. 

dinks

JohnS

If you're using a jwischka IMG then you should not partition your SD card because inside the IMG is already partitioned.  (If you want to check, mount the img using the loopback device or run sfdisk -l on the img.)

Just dd the img straight to /dev/sdb

Use sync when it finishes and then use the SD in your A13.

John

vaishali

HI JOHNS,I TRIED TO DD STRAIGHT TO DEV/SDB.
BUT NOW I AM GETTING  FOLLOWING MSG IN MY PUTTY AT THE TIME OF BOOT.

U-Boot SPL 2012.10-40268-GF925EEA-DIRTY (JAN 20 2013 -15:46:58)
DRAM: 512MB
SUNXI SD/MMC: 0


AND NOW NOTHING IS HAPPENING IN PUTTY AND MY VGA SCREEN. I HAVE COPIED R15 IMAGE AT THIS TIME.
NOW I AM NOT ANYTHING ON BOARD OR SCREEN.


dinks

JohnS

If you look at the U-Boot line, it's not the same as you were seeing before - right?

That's because the uboot has been loaded from the SD card.

Is what you posted ALL you get?  You don't get a message about autoboot or any kernel messages at all?

I'd try a different rNN image as I know at least one had some minor problems, but otherwise it is probably that now you have moved forward to a different problem.  Whether it's a marginal SD card or power or what I don't know.

John

drspastic

#9
Quote from: vaishali on February 12, 2013, 01:38:43 PM
HI JOHNS,I TRIED TO DD STRAIGHT TO DEV/SDB.
BUT NOW I AM GETTING  FOLLOWING MSG IN MY PUTTY AT THE TIME OF BOOT.

U-Boot SPL 2012.10-40268-GF925EEA-DIRTY (JAN 20 2013 -15:46:58)
DRAM: 512MB
SUNXI SD/MMC: 0


AND NOW NOTHING IS HAPPENING IN PUTTY AND MY VGA SCREEN. I HAVE COPIED R15 IMAGE AT THIS TIME.
NOW I AM NOT ANYTHING ON BOARD OR SCREEN.

hi, would you like to try again to dd the image (and better get the latest if you can) to your card and post your console here. post everything from your console from the point you login until dd finish and report files in/files out.
before you do that, go into your favorite partition software and repartition it as one big fat32. there should be no reason to do this, but for some reason it helps.

all you should be doing on command line to flash the image to the card is

sudo dd if=[full mounted address of image; eg /mnt/hda1/home/myimage.img] of=[full HARDWARE address of card, eg. /dev/sdb]

make sure you dont put /dev/sdb1 or it will go to partition, you want to burn to the entire device sdb.

after you should be able to view the card on your partition software and see one tiny partition, one 3.6g (or close) partition, and about 12 gig of empty upartitioned space.

vaishali

hi. i have tried another debian image given in wiki.
i had written the following commands to format, partition and loading image in my 16gb sandisk sd card..


root@gmd5:/home/gmd5# Is /dev/sd
sda   sda1  sda2  sda5  sda6  sda7  sdb   
root@gmd5:/home/gmd5# fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 15.9 GB, 15931539456 bytes
64 heads, 32 sectors/track, 15193 cylinders, total 31116288 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-31116287, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-31116287, default 31116287):
Using default value 31116287

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
root@gmd5:/home/gmd5# mkfs.vfat /dev/sdb1
mkfs.vfat 3.0.9 (31 Jan 2010)
root@gmd5:/home/gmd5# dd bs=4M oflag=sync if=A13_debian_WIFI_GCC_GPIO_IN_OUT_AUTO_load_third_release.img of=/dev/sdb
477+1 records in
477+1 records out
2001731584 bytes (2.0 GB) copied, 17.844 s, 112 MB/s
root@gmd5:/home/gmd5#

then i opened putty , but again no result.
there is only android symbol on my screen and it got hang.
can anyone tell me where i am doing mistake.
and what is this login and password given with this images, i am not getting anything to do login or password.
dinks

vaishali

now even my andriod from nand is also not starting.
i even tried to cross compile and make image on sd card , but cross compilation is also not working.
what should i do man...everything has stopped .
i even made my usb bootable with given debian image on wiki , but no progress.
is there anyone to rescue me.

dinks

jwischka

Quote from: vaishali on February 13, 2013, 01:49:45 PM
now even my andriod from nand is also not starting.
i even tried to cross compile and make image on sd card , but cross compilation is also not working.
what should i do man...everything has stopped .
i even made my usb bootable with given debian image on wiki , but no progress.
is there anyone to rescue me.

Ok - you do not need to run fdisk with an image. Ever. They are full images which you are "burning" to a card.

Download the latest image from my thread, and dd it to your card:

dd if=olinuxino_xfce-r15.img of=/dev/sdb

Put it in. Boot. Look at the serial console (not VGA) and tell us what you get.

JohnS

That's 3 people all saying just to use dd and how.

Stop using fdisk

vaishali

hi guys.
i have finally got started my r15 image from sd card.
the error was of my sd card reader , it was not writing the image properly.
so i have purchased the new card reader and got the image written.
thank you so much for your help guys.
but now i don't know how to start my wifi to access internet on this r15 image.
and the version of r15 is linaro 13.0 ubuntu.
is there any image for ubuntu 11.10 available.
dinks