SD/MMC formatting problem

I have been trying to follow the instructions on the web to set up a dual boot SD/MMC card. The process breaks down when I am trying to format the partitions with mkfs. It seems that fdisk can recognize the separate partitions, but mkfs cannot. I am running Ubuntu 8.04.1 on a laptop from a CD. The card readear is an X-micro. Paper trail below. Any suggestions?



ubuntu@ubuntu:~$ stat -f /dev/sdb1

File: “/dev/sdb1”

ID: 0 Namelen: 255 Type: tmpfs

Block size: 4096 Fundamental block size: 4096

Blocks: Total: 64375 Free: 64362 Available: 64362

Inodes: Total: 64375 Free: 61387

ubuntu@ubuntu:~$ stat -f /dev/sdb1p1

stat: cannot read file system information for `/dev/sdb1p1’: No such file or directory

ubuntu@ubuntu:~$ mount -l

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

tmpfs on /lib/modules/2.6.24-19-generic/volatile type tmpfs (rw,mode=0755) tmpfs on /lib/modules/2.6.24-19-generic/volatile type tmpfs (rw,mode=0755) varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)

varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)

udev on /dev type tmpfs (rw,mode=0755)

devshm on /dev/shm type tmpfs (rw)

devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /tmp type tmpfs (rw,nosuid,nodev) gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)

/dev/sdb1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=999,utf8,umask=077,flush) []

ubuntu@ubuntu:~$ sudo fdisk /dev/sdb1

Command (m for help): p

Disk /dev/sdb1: 2032 MB, 2032632320 bytes

255 heads, 63 sectors/track, 247 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

/dev/sdb1p1 * 1 51 409626 c W95 FAT32 (LBA)

/dev/sdb1p2 52 247 1574370 83 Linux

Command (m for help): q

ubuntu@ubuntu:~$ sudo mkfs.msdos -F 32 /dev/sdb1p1 -n DOS1 mkfs.msdos 2.11 (12 Mar 2005)

/dev/sdb1p1: No such file or directory

ubuntu@ubuntu:~$ sudo mkfs.ext3 -L LINUX1 /dev/sdb1p2 mke2fs 1.40.8 (13-Mar-2008) Could not stat /dev/sdb1p2 — No such file or directory

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

ubuntu@ubuntu:~$ wrote:

ubuntu@ubuntu:~$ stat -f /dev/sdb1p1

I'm not familiar with Ubuntu, but on my debian system the naming convention is different.

/dev/sdb - the scsi device 'b' (there might also be 'a', 'c', etc) This is what you fdisk.
/dev/sdb1 - first partition on sdb. These are what you format, mount, etc.
/dev/sdb2 - second partition, etc.

I tried to do exactly the same thing under Ubuntu 8.04.1 LTS Desktop
Edition, but I could not find a device driver for the second

It worked under Kubuntu 8.04, which did have device drivers for both
partitions. In both cases I booted from a CD ROM without installing

Hi , the problem you have is that you make partitions on an existing
partition. Try to partition /dev/sdb which is the card, not /dev/sdb1 which
is a partition on the card.


Try GNOME Partition Editor. This software is easy for creating and formatting partitions.
sudo apt-get install gparted


Ragha said the following on 10/18/2008 01:33 PM:

Try GNOME Partition Editor. This software is easy for creating and
formatting partitions.
sudo apt-get install gparted

[1] might help.
Nishanth Menon
[1] Nishanth' tech rambles: How to make a bootable MMC card on Linux for BeagleBoard (using gparted)