-
Notifications
You must be signed in to change notification settings - Fork 11
BBB on SD
Daniel Farrell edited this page Mar 15, 2014
·
1 revision
This will document my attempt at installing and running RCN's Debian image from a MicroSD card (not a flasher, as described here).
Grab the latest image from here.
Following these directions and adapting for a 16GB card.
DD a blank image that's slightly smaller than the SD. We'll copy RCN's image to this.
[~]$ sudo dd bs=1M count=14400 if=/dev/zero of=bone.img
[sudo] password for daniel:
14400+0 records in
14400+0 records out
15099494400 bytes (15 GB) copied, 116.802 s, 129 MB/s
Mount it as a loopback device:
[~]$ sudo losetup -f --show bone.img
/dev/loop0
Mount RCN's image:
[~dl]$ sudo losetup -f --show bone-debian-7.4-2014-02-16-2gb.img
/dev/loop1
Copy RCN's image to the blank image we created:
[~dl]$ sudo dd if=/dev/loop1 of=/dev/loop0
340563+0 records in
340563+0 records out
174368256 bytes (174 MB) copied, 11.2203 s, 15.5 MB/s
Running fdisk -l
against our newly copied image, I see this:
[~dl]$ sudo fdisk -l /dev/loop0 2:15:52
Disk /dev/loop0: 15.1 GB, 15099494400 bytes
255 heads, 63 sectors/track, 1835 cylinders, total 29491200 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/loop0p1 * 2048 198655 98304 e W95 FAT16 (LBA)
/dev/loop0p2 198656 3481599 1641472 83 Linux
Grow the primary partition:
[~dl]$ sudo parted /dev/loop0 2:15:52
GNU Parted 2.3
Using /dev/loop0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Loopback device (loop)
Disk /dev/loop0: 15.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 102MB 101MB primary fat16 boot, lba
2 102MB 1783MB 1681MB primary ext4
(parted) rm 2
(parted) mkpart primary 102 15000
(parted) print
Model: Loopback device (loop)
Disk /dev/loop0: 15.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 102MB 101MB primary fat16 boot, lba
2 102MB 15.0GB 14.9GB primary ext4
We now need to resize the filesystem on the partition we just grew.
TODO finish