1
\$\begingroup\$

I am trying to restore a bricked BBB device. Booting Debian from the SD card works fine (thanks to http://thethingsystem.com/dev/Bootstrapping-the-BeagleBone-Black-with-Debian.html ). Once the device is booted, I try to copy the Debian image to the emmc partition:

$ xz -cd debian-wheezy-7.2-armhf-3.8.13-bone30.img.xz > /dev/mmcblk1

This works but the boot partition is 100% full.

However, I need more space on that partition as I want to install a custom boot image with a display driver support (the Debian image from http://www.element14.com/community/docs/DOC-67958?ICID=BBB-feature-viewpanel )

So, once the BBB has booted with the SD card, I try to resize the boot image with:

$ [sudo mkfs.msdos -F 32 /dev/sdc1 -n LABEL1]
mkfs.msdos 2.11 (12 Mar 2005)

$ [sudo mkfs.ext3 -L LABEL2 /dev/sdc2]

from https://code.google.com/p/beagleboard/wiki/LinuxBootDiskFormat

  • How could I make the device booting from mmcblk1p1 ? Can I copy over the image from the SD card, how to do that?

Thank you!

\$\endgroup\$
2

1 Answer 1

1
\$\begingroup\$

Interesting, with the flasher image, all steps are shown how to partition and copy an image to the embedded flash memory:

Erasing: /dev/mmcblk1 complete
-----------------------------
Writing bootloader to [/dev/mmcblk1]
dd if=/opt/backup/uboot/MLO of=/dev/mmcblk1 count=1 seek=1 conv=notrunc bs=128k
-----------------------------
0+1 records in
0+1 records out
73516 bytes (74 kB) copied, 0.0287943 s, 2.6 MB/s
-----------------------------
dd if=/opt/backup/uboot/u-boot.img of=/dev/mmcblk1 count=2 seek=1 conv=notrunc bs=384k
-----------------------------
1+1 records in
1+1 records out
393496 bytes (393 kB) copied, 0.212742 s, 1.8 MB/s
-----------------------------
Formatting: /dev/mmcblk1
Checking that no[   46.657434]  mmcblk1: unknown partition table
-one is using this disk right now ...
OK

Disk /dev/mmcblk1: 119808 cylinders, 4 heads, 16[   46.673010]  mmcblk1: p1 p2
 sectors/track

sfdisk: ERROR: sector 3069486077 does not have an msdos signature
 /dev/mmcblk1: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/mmcblk1p1   *     1     96     96      98304    e  W95 FAT16 (LBA)
/dev/mmcblk1p2        97   3743   3647    3734528   83  Linux
/dev/mmcblk1p3         0      -      0          0    0  Empty
/dev/mmcblk1p4         0      -      0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

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).)
mkfs.vfat -F 16 /dev/mmcblk1p1 -n BEAGLEBONE
-----------------------------
mkfs.vfat 3.0.13 (30 Jun 2012)
-----------------------------
mkfs.ext4 /dev/mmcblk1p2 -L rootfs
-----------------------------
mke2fs 1.42.5 (29-Jul-2012)
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/mmcblk1p2 is mounted.
Discarding device blocks: done
Filesystem label=rootfs
pm:Downloads pmu$ disutil list
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
233856 inodes, 933632 blocks
46681 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=956301312
29 block groups
32768 blocks per group, 32768 fragments per group
8064 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

-----------------------------
Formatting: /dev/mmcblk1 complete
-----------------------------
Copying: /dev/mmcblk0p1 -> /dev/mmcblk1p1
rsync: /boot/uboot/ -> /tmp/boot/
rsync: ignore the % values when shown as they are not accurate...
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
233856 inodes, 933632 blocks
46681 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=956301312
29 block groups
32768 blocks per group, 32768 fragments per group
8064 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

-----------------------------
Formatting: /dev/mmcblk1 complete
-----------------------------
Copying: /dev/mmcblk0p1 -> /dev/mmcblk1p1
rsync: /boot/uboot/ -> /tmp/boot/
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.