On Sun, May 27, 2012 at 8:06 PM, Arun Khan <[email protected]> wrote:
> Using 'dd' to make a backup of an openwrt image (that has been
> installed and configured) on a 64MB CF card
>
> # dd if=/dev/sdb of=openwrt.10.03.1_alix_installation.backup.img bs=4K
> dd: reading `/dev/sdb': Input/output error
> <<<<<  this line says I/O error!
> 15648+0 records in
> 15648+0 records out
> 64094208 bytes (64 MB) copied, 68.722 s, 933 kB/s
>
> but the copy is done but with return code = 1
>
> # ls -l openwrt.10.03.1_alix_installation.backup.img
> -rw-r--r-- 1 root  root  64094208 May 27 16:49
> openwrt.10.03.1_alix_installation.backup.img
>
> This shows it indeed copied over 64MB into the backup image file.
>
> # file -s openwrt.10.03.1_alix_installation.backup.img
> openwrt.10.03.1_alix_installation.backup.img: x86 boot sector; GRand
> Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2
> segment 0x200; partition 1: ID=0x83, active, starthead 1, startsector
> 63, 28609 sectors; partition 2: ID=0x83, starthead 7, startsector
> 28672, 96513 sectors, code offset 0x48
>
> This shows that indeed the file is a hard disk image with two
> partitions in it with GRUB as the boot loader.
>
> # fdisk -l openwrt.10.03.1_alix_installation.backup.img
>
> Disk openwrt.10.03.1_alix_installation.backup.img: 64 MB, 64094208 bytes
> 255 heads, 63 sectors/track, 7 cylinders, total 125184 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: 0x00074710
>
>                                       Device Boot      Start
> End      Blocks   Id  System
> openwrt.10.03.1_alix_installation.backup.img1   *          63
> 28671       14304+  83  Linux
> openwrt.10.03.1_alix_installation.backup.img2           28672
> 125184       48256+  83  Linux
>
> fdisk also recognizes the file as a hard disk image with two partitions.
>
> If there were i/o errors with the CF card then I think there would
> have been errors reported by the above tools.
>
> Any hypothesis for this anamoly?
>
> --
> Arun Khan
> _______________________________________________
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Try to mount it as loop device and check. If not try /dev/sdb1
(partition instead of full disk). I am not sure of what is going
wrong. But just giving this a try should not do any harm.
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to