Quantcast

Problems creating a bootable 4GB SD card

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problems creating a bootable 4GB SD card

MelCasey
Greetings,
     I'm trying to create a bootable SD card, I'm using a 4GB micro
card. I'm using this guide to try to partition and format the card:

http://www.gumstix.org/create-a-bootable-microsd-card.html

The dd command works fine. When trying to perform this command:

    sudo sfdisk --force -D -uS -H 122 -S 62 -C 1019 /dev/sdc1

I receive this message and it does not create the partitions at all:

--------
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK

Disk /dev/sdc1: 1019 cylinders, 122 heads, 62 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
  /dev/sdc1: unrecognized partition table type
Old situation:
No partitions found
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).

/dev/sdc1p1 :128,130944,0x0C,*
/dev/sdc1p1   *       128    131071     130944   c  W95 FAT32 (LBA)
/dev/sdc1p2 :131072,,,-
/dev/sdc1p2        131072   7708671    7577600  83  Linux
/dev/sdc1p3 :
/dev/sdc1p3             1       127        127  83  Linux
/dev/sdc1p4 :
/dev/sdc1p4             0         -          0   0  Empty
New situation:
Units = sectors of 512 bytes, counting from 0

    Device Boot    Start       End   #sectors  Id  System
/dev/sdc1p1   *       128    131071     130944   c  W95 FAT32 (LBA)
/dev/sdc1p2        131072   7708671    7577600  83  Linux
/dev/sdc1p3             1       127        127  83  Linux
/dev/sdc1p4             0         -          0   0  Empty
Warning: partition 1 does not end at a cylinder boundary
Do you want to write this to disk? [ynq] y
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Invalid argument

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
---------------------------

Any help advancing would be greatly appreciated.
Thanks
Mel Casey
Envisionier


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

JamesAng
Just use Steve's script instead.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
Greetings, thanks for your reply. Who is Steve and where can I get his script?
Thanks!
Mel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

Nathan Young-2
http://www.sakoman.com/category/8-gnome-daily-builds-r13.html
Green button near bottom of the page.


On Wed, Apr 18, 2012 at 8:03 AM, MelCasey <[hidden email]> wrote:
Greetings, thanks for your reply. Who is Steve and where can I get his
script?
Thanks!
Mel

--
View this message in context: http://gumstix.8.n6.nabble.com/Problems-creating-a-bootable-4GB-SD-card-tp4891553p4894101.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
Greetings, thanks for the point to the script. I've ran it and still getting basically the same error on two different 4GB SD cards:

#sudo ./mksdcard.sh /dev/sdc1 overo minimal
umount: /dev/sdc1: not mounted
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 4.95422 s, 212 kB/s
Disk /dev/sdc1 doesn't contain a valid partition table
DISK SIZE – 527077376 bytes
CYLINDERS – 64
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK

Disk /dev/sdc1: 64 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sdc1: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdc1p1   *       128    131071     130944   c  W95 FAT32 (LBA)
/dev/sdc1p2        131072   1029447     898376  83  Linux
/dev/sdc1p3             0         -          0   0  Empty
/dev/sdc1p4             0         -          0   0  Empty
Warning: partition 1 does not end at a cylinder boundary
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Invalid argument

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Improper partitioning on /dev/sdc1

I'm not sure if it's bad cards or the card reader or something else.
All help is greatly appreciated.
Mel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

Daniel Packard

Hi Mel,

You should use the script on the entire device (/dev/sdc), not just on the first partition (/dev/sdc1).

/d
Roadnarrows LLC

On Apr 18, 2012 8:03 AM, "MelCasey" <[hidden email]> wrote:
Greetings, thanks for the point to the script. I've ran it and still getting
basically the same error on two different 4GB SD cards:

#sudo ./mksdcard.sh /dev/sdc1 overo minimal
umount: /dev/sdc1: not mounted
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 4.95422 s, 212 kB/s
Disk /dev/sdc1 doesn't contain a valid partition table
DISK SIZE – 527077376 bytes
CYLINDERS – 64
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK

Disk /dev/sdc1: 64 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sdc1: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = sectors of 512 bytes, counting from 0

  Device Boot    Start       End   #sectors  Id  System
/dev/sdc1p1   *       128    131071     130944   c  W95 FAT32 (LBA)
/dev/sdc1p2        131072   1029447     898376  83  Linux
/dev/sdc1p3             0         -          0   0  Empty
/dev/sdc1p4             0         -          0   0  Empty
Warning: partition 1 does not end at a cylinder boundary
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Invalid argument

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Improper partitioning on /dev/sdc1

I'm not sure if it's bad cards or the card reader or something else.
All help is greatly appreciated.
Mel

--
View this message in context: http://gumstix.8.n6.nabble.com/Problems-creating-a-bootable-4GB-SD-card-tp4891553p4894325.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
That worked like a charm! Can't believe I missed that, thanks a bunch!
Mel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
Thanks for all the help so far. I have created an SD card with the script listed below, now I am getting this error when it tries to boot from the SD card:

3226028 bytes read
Booting from mmc
## Booting kernel from Legacy Image at 82000000
Image Name: Linux-2.6.34
Image Type: ARM Linux Kernel Image
Data Size: 3226004 Bytes = 3.1 MiB
Load Address: 8000 8000
Entry Point: 8000 8000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!

The files copied over to the 2GB SD card that came with the system works fine. When used on the 4GB card partitioned with the script, I get this message.
Thanks for the help!
Mel
j
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

j
On 04/19/2012 10:22 AM, MelCasey wrote:

> Thanks for all the help so far. I have created an SD card with the script
> listed below, now I am getting this error when it tries to boot from the SD
> card:
>
> 3226028 bytes read
> Booting from mmc
> ## Booting kernel from Legacy Image at 82000000
> Image Name: Linux-2.6.34
> Image Type: ARM Linux Kernel Image
> Data Size: 3226004 Bytes = 3.1 MiB
> Load Address: 8000 8000
> Entry Point: 8000 8000
> Verifying Checksum ... Bad Data CRC
> ERROR: can't get kernel image!
>
> The files copied over to the 2GB SD card that came with the system works
> fine. When used on the 4GB card partitioned with the script, I get this
> message.
> Thanks for the help!
> Mel
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/Problems-creating-a-bootable-4GB-SD-card-tp4891553p4898951.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
You sure that uImage is on your FAT partition? Does that script copy all
your files on for you? Does it copy MLO first? I thought the script was
only a partitioning script?

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
Looking at the boot partition, it has 3 files - MLO, u-boot.bin and uImage
The script partitions and copies a bootable image to the card, but this would not boot the card so I copied the files from a working 2GB card onto the created 4GB card. I did not see the error message with the initial files, but there was a blinking red light on the card.
I am performing the procedure on a virtualbox Debian machine, both partitions (boot and rootfs) appear fine on the Debian machine.
j
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

j
On 04/19/2012 10:42 AM, MelCasey wrote:

> Looking at the boot partition, it has 3 files - MLO, u-boot.bin and uImage
> The script partitions and copies a bootable image to the card, but this
> would not boot the card so I copied the files from a working 2GB card onto
> the created 4GB card. I did not see the error message with the initial
> files, but there was a blinking red light on the card.
> I am performing the procedure on a virtualbox Debian machine, both
> partitions (boot and rootfs) appear fine on the Debian machine.
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/Problems-creating-a-bootable-4GB-SD-card-tp4891553p4899014.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
Hmm not really sure. Here is what I do.

Partition sdcard with FAT and ext3

Then mount /boot
then I will copy MLO first as this can cause issues if not copied first.
Then u-boot.bin then uImage
make sure you are not cd'd into the sdcard partition then
sync
unmount boot
then mount root
then untar root
sync
unmount root
Then should be working.

Also I use fdisk to create the card. But also have had luck with
gparted. But the key I think is getting MLO on first before anything
else on a newly formatted card. Also I have noticed some file managers
if used to mount the partition messes things up and makes the sdcard
unbootable.

HTH

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
Greetings, thanks for your reply. I tried what you described step-by-step both with one of the bought 4GB cards and with the working 2GB cards (at the suggestion of my boss), and now neither will boot up the overo. Both cards are giving the same error on boot - Bad Data CRC ERROR: can't get kernel image!
I am completely stumped at this point.
One quick question - when you listed "sync" how do you do the sync command?

If I had to guess, the partition isn't quite right and the offset looking at 80000 80000 is not finding what it expects.
I have tried manually partitioning the cards and also the script listed in one of the posts, both are not working.
Thanks all for your help, this one is a stumpper.
Mel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
One other quick question about this - Is there a problem with any flavors of Linux or versions? I'm using the latest Debian.
Thanks,
Mel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

jean.gueganno
In reply to this post by MelCasey
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

Scott Ellis
In reply to this post by MelCasey
Did you mean to say 80008000 instead of 80000<space>80000 ?

You had a previous post showing this

Booting from mmc
## Booting kernel from Legacy Image at 82000000
Image Name: Linux-2.6.34
Image Type: ARM Linux Kernel Image
Data Size: 3226004 Bytes = 3.1 MiB
Load Address: 8000 8000
Entry Point: 8000 8000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!


Again with spaces in the Load Address and Entry Point
values -> '8000 8000'

That seems odd.

Here is the output from a booting system

## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Angstrom/2.6.34/overo
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2969104 Bytes = 2.8 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK




On Mon, 2012-04-23 at 06:23 -0700, MelCasey wrote:

> Greetings, thanks for your reply. I tried what you described step-by-step
> both with one of the bought 4GB cards and with the working 2GB cards (at the
> suggestion of my boss), and now neither will boot up the overo. Both cards
> are giving the same error on boot - Bad Data CRC ERROR: can't get kernel
> image!
> I am completely stumped at this point.
> One quick question - when you listed "sync" how do you do the sync command?
>
> If I had to guess, the partition isn't quite right and the offset looking at
> 80000 80000 is not finding what it expects.
> I have tried manually partitioning the cards and also the script listed in
> one of the posts, both are not working.
> Thanks all for your help, this one is a stumpper.
> Mel
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/Problems-creating-a-bootable-4GB-SD-card-tp4891553p4910172.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems creating a bootable 4GB SD card

MelCasey
Thanks for your reply,
It looks like there is a space but I think there was not one. The error I was getting was: Verifying Checksum...Bad Data CRC
ERROR: can't get kernel image!

I tried the Environment Refresh mentioned at the bottom of this tutoria:
# nand erase 240000 20000
# reset

And now I'm getting this problem:
*** Unable to read "boot.scr" from mmc 0:1 **
reading uImage

** Unable to read "uImage" from mmc 0:1 **

With this try I did use the exact  numbers partitioning the card listed in the tutorial except for the calculated cylinders (which came out to 236).  fdisk -l gives different sectors and heads (62 sectors, 60 heads).
I also get 1022 cylinders with fdisk also.

Thanks for your help,
Mel Casey
Envisionier
Loading...