OpenWrt Forum Archive

Topic: dd error or my fault?help me pliz

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi...i am using dd to flash my x86 to my hdc
and it goes like this
can u help me
looks like its not copyng data from image to my hdc
[root@krismanto image]# clear
[root@krismanto image]# dd if=openwrt-x86-2.6-ext2.image of=/dev/hdc
41903+0 records in
41903+0 records out
[root@krismanto image]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda1             35278540   3848232  29638260  12% /
none                     62984         0     62984   0% /dev/shm
/dev/hdc               2029936     35832   1890988   2% /disk1
[root@krismanto image]#

can u help me???
pliz

Reboot afterwards. The kernel needs to sync the data on disk.

not sure what you are trying to show here

df is for mounted filesystems. dd changes data on raw devices. dd does not change the mounts, and dded data is not reflected on the mounted filesystems, because data was written directly to the device and not via the filesystem. usually when you dd something onto a partition that is currently mounted, you end up with corrupt data, because both filesystem and dd try to write data and overwrite each others data.

exception is read only mounted filesystems, in that case if you write on the device, you will have to unmount and mount again (or reboot and hope that what you wrote with dd makes any sense at all).

hmmm
got it.....
so i must format the secondary hardisk and make it really clean?
format using wat?
mkfs or mkefs
hmmm
can u tell me how to unmount
i know only how to mount but not unmount
thanks

sorry
mkefs=mke2fs
help me thanks

umount /dev/hdc

big_smile

Make sure you didn't start any processes which are still running while being under /disk1/<somewhere> because that will keep /disk1 busy.

The discussion might have continued from here.