How to correctly boot Debian form uSD from BBB

I am new to BBB. I just started using it for a project I just got involved into. I have a BBB RevA5C. The BBB originaly comes with Angstrom on the eMMC. The problem I have is that I will need to install OLA on my BBB but the eMMC is too small and it will crash, so I need to have the OS running from the uSD card. I downloaded at beagleboard.org from the latest firmware images the Debian version that says that runs on the BBB without flashing the eMMC. I mounted the image on the uSD card and everything was fine. When I inserted it to my BBB I had some problems:

  1. BBB boot but after a while both middle user LEDs remain on. I cycle power the BBB and works fine but everytime I unplug it and plug it back in after a few hours to try to work on it I have the same problem again.

  2. When I get it running how do I know if I am running the OS on the eMMC or the one on the uSD. I used the command “df -h” and what I got was something that makes me think I am not on my uSD’s OS:

/dev/mmcblk0p1 96M 70M 27M 73% /boot/uboot

/dev/mmcblk1p2 1.7G 1.3G 284M 83% /media/Angstrom

/dev/mmcblk1p1 96M 80M 17M 83% /media/BeagleBone

  1. I needed to expand the file system partition (I am using a 16GB Class 4 uSD card) and used this commands:
<b><i>cd /opt/scripts/tools/
git pull
sudo ./grow_partition.sh
sudo reboot</i></b>

but I get an error telling me that expansion could not be completed and shows me the partitions that are available and I see there is a second partition that corresponds to my 16GB uSD card but I really don't know what's going on here.

Could anyone help me with this stuff. I am a bit new to linux and I am trying to do my best because this project is getting closer. 

Thank you!

“bone-debian-7.5-2014-05-14-2gb.img”
“bone-debian-7.5-2014-05-14-2gb.img”
“bone-debian-7.5-2014-05-14-2gb.img”

It usually says an error, however on reboot, what does "df -h" show?

Regards,

This is what I get

root@beaglebone:/var/lib/cloud9# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 1.6G 1.6G 0 100%
udev 10M 0 10M 0% /dev
tmpfs 100M 600K 99M 1% /run
/dev/mmcblk0p2 1.6G 1.6G 0 100% /
tmpfs 249M 0 249M 0% /dev/shm
tmpfs 249M 0 249M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/mmcblk0p1 96M 70M 27M 73% /boot/uboot

This is what I get when trying to use unused space

root@beaglebone:/opt/scripts/tools# sudo ./grow_partition.sh
Media: [/dev/mmcblk0]
Disk /dev/mmcblk0: 474496 cylinders, 4 heads, 16 sectors/track
Old situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
/dev/mmcblk0p2 97 14827 14731 15084544 83 Linux
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
/dev/mmcblk0p2 97 14827 14731 15084544 83 Linux
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table …
BLKRRPART: Device or resource busy
The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
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).)

This is what I get

root@beaglebone:/var/lib/cloud9# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 1.6G 1.6G 0 100%
udev 10M 0 10M 0% /dev
tmpfs 100M 600K 99M 1% /run
/dev/mmcblk0p2 1.6G 1.6G 0 100% /
tmpfs 249M 0 249M 0% /dev/shm
tmpfs 249M 0 249M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/mmcblk0p1 96M 70M 27M 73% /boot/uboot

This is what I get when trying to use unused space

root@beaglebone:/opt/scripts/tools# sudo ./grow_partition.sh
Media: [/dev/mmcblk0]
Disk /dev/mmcblk0: 474496 cylinders, 4 heads, 16 sectors/track
Old situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
/dev/mmcblk0p2 97 14827 14731 15084544 83 Linux
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
New situation:
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System
/dev/mmcblk0p1 * 1 96 96 98304 e W95 FAT16 (LBA)
/dev/mmcblk0p2 97 14827 14731 15084544 83 Linux
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table …
BLKRRPART: Device or resource busy
The command to re-read the partition table failed.
Run partprobe(8), kpartx(8) or reboot your system now,
before using mkfs
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).)

Yeap, just reboot (sudo reboot)

Then run:

sudo resize2fs /dev/mmcblk0p2

and it should be fine..

Regards,

Thanks it worked perfectly!

Robert,

I need to install any audio library on my BBB. I’ll work with python, so I guess I have to install a python audio library. Could you help me out with this?

Thanks a lot!

Robert,
Thanks for helping Oscar on this! We are all preparing for a big music and interactive lighting workshop in Guatemala in the next few weeks. We will use several different Arduino/Teensy platforms, but I also wanted the BBB to be an available option for the advanced guys. Something like this design challenge video here...
https://m.youtube.com/watch?v=EQN6cBO5is8

Oscar,
For a Python audio library, I have gotten "PyAudio" working on the BBB. I have also heard about PyGame, which is a lot heavier, but has much more functionality (like Midi integration and other things). I didn't try PyGame yet. Also don't forget to check out PyBBIO which my buddy Alex created (though it doesn't do audio).... But we could use it to control loads and read inputs. Lastly, yes we should consider using OLA for DMX lighting control and also for sending/receiving professional lighting protocols to/from other software like Lightjams. I think someone recently built a BBB distro with OLA pre-installed ... It takes me 4+ hours to build OLA from source on the BBB .

Talk soon!
-frenchy
www.voltvision.com

Robert,
Thanks for helping Oscar on this! We are all preparing for a big music and interactive lighting workshop in Guatemala in the next few weeks. We will use several different Arduino/Teensy platforms, but I also wanted the BBB to be an available option for the advanced guys. Something like this design challenge video here...
https://m.youtube.com/watch?v=EQN6cBO5is8

Oscar,
For a Python audio library, I have gotten "PyAudio" working on the BBB. I have also heard about PyGame, which is a lot heavier, but has much more functionality (like Midi integration and other things). I didn't try PyGame yet. Also don't forget to check out PyBBIO which my buddy Alex created (though it doesn't do audio).... But we could use it to control loads and read inputs. Lastly, yes we should consider using OLA for DMX lighting control and also for sending/receiving professional lighting protocols to/from other software like Lightjams. I think someone recently built a BBB distro with OLA pre-installed ... It takes me 4+ hours to build OLA from source on the BBB .

Talk soon!
-frenchy
www.voltvision.com