Errors formatting SD card

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

Errors formatting SD card

Postby brickinthecloud » Sun Nov 10, 2013 12:59 am

Hi,

I'm running Virtualbox on my Mac Pro, on my Mac Pro the Card Reader is not exposed as a USB device, so i had to follow these steps (https://forums.virtualbox.org/viewtopic.php?f=8&t=50946&sid=57442d36e4bdf9e5e7613452ae8cdf73#p234604) to get it visible in Ubuntu.

So far so good, i can see the files currently on the SD (called Burt) and a 'mount' command shows this.

/dev/sdb on /media/ubuntu/Burt type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

I've run the format command, but am not able to plug and unplug the device, it doesn't seem to recognise this (maybe due to how its been exposed to the VM?). Anyway, i pressed on with giving it sdb as the device name, after prompting me for the ubuntu password it started formatting. However it eventually fails with the report below.

Any ideas? Is this due to the way the SD card had to be exposed, as I noticed the standard notes don't mention the article i linked above.

Thanks in advance!

*** FORMAT SDCARD ********************************** TCP120706 ***


!!! ALL DATA ON DRIVE WILL BE LOST !!!

FORMAT "sdb"
press enter or Ctrl-C to skip ?

....formatting.sdcard
[sudo] password for ubuntu:

....making.kernel.partition

....making.filesystem.partition

....checking.partitions

******************************************************************

Command (m for help):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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): No partition is defined yet!

Command (m for help): 1: 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): No partition is defined yet!

Command (m for help): 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):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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): Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): Partition number (1-4, default 1): First sector (2048-3967238, default 2048): Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3967238, default 3967238):
Command (m for help): Selected partition 1
Hex code (type L to list codes): Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): Partition number (1-4, default 2): First sector (104448-3967238, default 104448): Using default value 104448
Last sector, +sectors or +size{K,M,G} (104448-3967238, default 3967238): Using default value 3967238

Command (m for help):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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 104447 51200 b W95 FAT32
/dev/sdb2 104448 3967238 1931395+ 83 Linux

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 25: Inappropriate ioctl for device.
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)

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
/dev/sdb1: No such file or directory
mkfs.msdos 3.0.13 (30 Jun 2012)
mke2fs 1.42.5 (29-Jul-2012)
Could not stat /dev/sdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

Command (m for help):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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 104447 51200 b W95 FAT32
/dev/sdb2 104448 3967238 1931395+ 83 Linux

Command (m for help): Partition number (1-4):
Command (m for help): Selected partition 2

Command (m for help): 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):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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): Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): Partition number (1-4, default 1): First sector (2048-3967238, default 2048): Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3967238, default 3967238):
Command (m for help): Selected partition 1
Hex code (type L to list codes): Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): Partition number (1-4, default 2): First sector (104448-3967238, default 104448): Using default value 104448
Last sector, +sectors or +size{K,M,G} (104448-3967238, default 3967238): Using default value 3967238

Command (m for help):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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 104447 51200 b W95 FAT32
/dev/sdb2 104448 3967238 1931395+ 83 Linux

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 25: Inappropriate ioctl for device.
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)

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
/dev/sdb1: No such file or directory
mkfs.msdos 3.0.13 (30 Jun 2012)
mke2fs 1.42.5 (29-Jul-2012)
Could not stat /dev/sdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

Command (m for help):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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 104447 51200 b W95 FAT32
/dev/sdb2 104448 3967238 1931395+ 83 Linux

Command (m for help): Partition number (1-4):
Command (m for help): Selected partition 2

Command (m for help): 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):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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): Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): Partition number (1-4, default 1): First sector (2048-3967238, default 2048): Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3967238, default 3967238):
Command (m for help): Selected partition 1
Hex code (type L to list codes): Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): Partition number (1-4, default 2): First sector (104448-3967238, default 104448): Using default value 104448
Last sector, +sectors or +size{K,M,G} (104448-3967238, default 3967238): Using default value 3967238

Command (m for help):
Disk /dev/sdb: 2031 MB, 2031226368 bytes
255 heads, 63 sectors/track, 246 cylinders, total 3967239 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 104447 51200 b W95 FAT32
/dev/sdb2 104448 3967238 1931395+ 83 Linux

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 25: Inappropriate ioctl for device.
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)

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
/dev/sdb1: No such file or directory
mkfs.msdos 3.0.13 (30 Jun 2012)
mke2fs 1.42.5 (29-Jul-2012)
Could not stat /dev/sdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
******************************************************************

SDCARD NOT FORMATTED PROPERLY !!!

REMOVE sdcard

******************************************************************


FORMAT ANOTHER ONE
press enter or Ctrl-C to skip ?
brickinthecloud
New User
 
Posts: 21
Joined: Thu Nov 07, 2013 1:56 am

Re: Errors formatting SD card

Postby brickinthecloud » Sun Nov 10, 2013 5:13 am

Ok, i think the card had an odd set of partitions on it originally, i formatted with a single one on my Mac first and things got further. However when formatting the second partition, the vm machine reported io errors and froze. I tried it several times, it just didn't like formatting the second partition. Its now 5am, little tired.... :-)

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: 1/15
Warning, had trouble writing out superblocks.
....checking.partitions
./format_sdcard.sh: line 86: /bin/sync: Input/output error
Last edited by brickinthecloud on Sun Nov 10, 2013 5:33 am, edited 1 time in total.
brickinthecloud
New User
 
Posts: 21
Joined: Thu Nov 07, 2013 1:56 am

Re: Errors formatting SD card

Postby brickinthecloud » Sun Nov 10, 2013 5:22 am

Going to try putting the sd card in a USD adapter tomorrow, hopefully Virtualbox will see it!
brickinthecloud
New User
 
Posts: 21
Joined: Thu Nov 07, 2013 1:56 am

Re: Errors formatting SD card

Postby cfin » Sun Nov 10, 2013 9:34 am

Hi,
I have the same problem.
Running win7 with ubuntu guest system. Adding the sd-card-reader as usb-device worked only so far, that linux could see the device, but it could not see the medium inside. I always got the message "no medium inside" from fdisk. The diskutility also only shows the empty sdcard reader.

The second try with the raw device in virtualbox worked so far, that I could see the medium and I could partition it under linux. But after that whenever I write something to the sd-card (doesn't matter which partition), the vm freezes. Reading is no problem.

Next week I meet with a friend with a native ubuntu installation and a sd-card-reader. So I hope I get around this problem.
cfin
New User
 
Posts: 15
Joined: Fri Oct 25, 2013 8:04 pm

Re: Errors formatting SD card

Postby brickinthecloud » Sun Nov 10, 2013 5:48 pm

Ok at last i got it working, using a USB card reader, no raw disk crazyness! Though to get Virtualbox to see it i had to setup a catch all USB filter (don't pick the option to setup a filter for your specific usb device). This ment that what ever usb drive i plugged into the mac, got caught by Virtualbox and the guest OS. The two format and update scripts then ran flawlessly! I'm so happy!

What I will do is see if I can create a .dmg of the memory card, though need to confirm if the network config file is available first, otherwise its not going to be much good to anyone other than me! ;-)
brickinthecloud
New User
 
Posts: 21
Joined: Thu Nov 07, 2013 1:56 am

Re: Errors formatting SD card

Postby gloomyandy » Sun Nov 10, 2013 6:25 pm

You might want to take a look at the legal agreement you clicked on for the JVM before you make a .dmg available if it contains the JVM...
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3967
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Errors formatting SD card

Postby brickinthecloud » Sun Nov 10, 2013 8:25 pm

Ah yes, good point!! Thanks!
brickinthecloud
New User
 
Posts: 21
Joined: Thu Nov 07, 2013 1:56 am


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff