Writing USB Linux to Flash

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
jimeney
Posts: 122
Joined: Thu Oct 13, 2011 6:08 pm

Writing USB Linux to Flash

Post by jimeney »

i've taken the Ubuntu Server Base image and made a few tweaks, I'd now like to replace the operating system on eMMC (Tango) with this. Here's the partition structure from fdisk -l - I know I need to do some partition resizing to make this work, as I'm way above 1gb on the primary partition (although the OS comes in at around 500mb).

Is it just a case of using DD to rewrite /dev/mmcblk0 with /dev/mmcblk0 as a whole, or should I be looking to keep the partition structure, using dd to replace
/dev/mmcblk0p1 with /dev/uba1
/dev/mmcblk0p2 with /dev/uba2
/dev/mmcblk0p4 with /dev/uba3

If there's a wiki article on this, please point me in the right direction and I'll refer to this. I found a section on creating a bootable, read only Ubuntu but this was incomplete.

Thanks,

James

Disk /dev/mmcblk0: 1028 MB, 1028128768 bytes
4 heads, 16 sectors/track, 31376 cylinders, total 2008064 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: 0x00065065

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 16 125055 62520 ef EFI (FAT-12/16/32)
/dev/mmcblk0p2 125056 625151 250048 83 Linux
/dev/mmcblk0p4 626688 2007039 690176 83 Linux

Disk /dev/uba: 8042 MB, 8042577920 bytes
4 heads, 32 sectors/track, 122720 cylinders, total 15708160 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: 0x00010642

Device Boot Start End Blocks Id System
/dev/uba1 * 2048 126975 62464 e W95 FAT16 (LBA)
/dev/uba2 126976 626687 249856 82 Linux swap / Solaris
/dev/uba3 626688 3899391 1636352 83 Linux
Post Reply