Make a DD image with only two first partitions

Ask questions about Arch Linux ARM. Please search before making a new topic.

Make a DD image with only two first partitions

Postby Fuson51 » Sun Jan 06, 2013 3:54 pm

Hi,

With:
$this->bbcode_second_pass_code('', 'Disk /dev/mmcblk0: 2032 MB, 2032664576 bytes, 3970048 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: 0x000c21e5

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 2048 194559 96256 c W95 FAT32 (LBA)
/dev/mmcblk0p2 194560 3862527 1833984 83 Linux
/dev/mmcblk0p3 3862528 3970047 53760 83 Linux')

If I want create an image with only the p1 and p2 partion, is this possible to do this ?
$this->bbcode_second_pass_code('', 'dd bs=512 count=3862527 if=/dev/mmcblk0 of=[imagePath]')
Where count is the end of /dev/mmcblk0p2 !

Thanks again !!! Bye !
Fuson51
 
Posts: 12
Joined: Sat Jan 05, 2013 7:32 pm

Re: Make a DD image with only two first partitions

Postby pepedog » Sun Jan 06, 2013 7:35 pm

Look feasible
Why not delete (with fdisk) partition 2 an 3, immediate recreate partition 2 using rest of space, write, sync, reboot, and re size partition 2 (can't remember command but it begins resize)
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Make a DD image with only two first partitions

Postby WarheadsSE » Sun Jan 06, 2013 7:36 pm

resize2fs
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Make a DD image with only two first partitions

Postby Fuson51 » Mon Jan 07, 2013 8:33 am

I confirm that the command work fine. Just need to delete fake third partition after restore.

My goal is to use my master 8GB SD card to create other SD. Without copying third partitoion (6GB) because other SD can have only 2GB. And master 8GB can use 6GB as backup or temp working space.
Fuson51
 
Posts: 12
Joined: Sat Jan 05, 2013 7:32 pm


Return to User Questions

Who is online

Users browsing this forum: Google [Bot] and 16 guests