dd image and how to ... is more a question???-
Hallo every body!!!
Well there is where i'm in troubel...
The begin:
"I read Kyle Rakin's colum about this moths Lightning hacks strike twice, my interes was focus on the dd image over ssh" before this I've heard about dd but I didn't know how wonderfull (and powerfull) it is.
Next step-the do:
I start make a hole dd over my disk to a image file...
dd if=/dev/sda of=/media/paseo/imagen/imagen.img
this works fine but now...
The problem:
The idea is that I want to mount this image...exactly is the root partition for later recover some files for example--like
mount -t ext3 -o loop /media/paseo/imagen/imagen.img /media/net
thet output of the error msg
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
En algunos casos se encuentra información en syslog, pruebe
dmesg | tail o algo parecido
this is my dmesg |tail
[16563.291016] mtrr: no more MTRRs available
[25143.183670] VFS: Can't find ext3 filesystem on dev loop0.
[27605.632847] VFS: Can't find ext3 filesystem on dev loop0.
[27609.437021] VFS: Can't find ext3 filesystem on dev loop0.
[36690.146233] VFS: Can't find ext3 filesystem on dev loop0.
so I start searching in the inet
this point me at first time to
http://www.linuxquestions.org/questions/linux-general-1/restore-files-fr...
where I extract that I have to type
fdisk -l -u /media/paseo/imagen/imagen.img
the output of this is
Debe establecer cilindros.
Puede efectuar esta operación desde el menú de funciones adicionales.
Disco /media/paseo/imagen/imagen.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, 0 sectores en total
Units = sectores of 1 * 512 = 512 bytes
Disk identifier: 0xb7d8b185
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/media/paseo/imagen/imagen.img1 63 2152709 1076323+ 82 Linux swap / Solaris
/media/paseo/imagen/imagen.img2 2152710 15759764 6803527+ 83 Linux
from this it make me clear that there was two partitions....
AND I want to mount the second yes... my file system...
in this forum the guy Halgeir point me to ---this page http://edseek.com/~jasonb/articles/linux_loopback.html
where I read on....
and at the point where it gets interest for me (at the last page I told about) with the title "Mounting by First Extracting the Partition"
I make exact what this guy tell about (with my image paramaters) and it don't function...
At the end I make a image (alone) of my root partition /dev/sda2 and have after it mounted whithout any problem...!!!
So my question is how can I extract with dd a partition (the exactly parameters or funtions), from a hole image of a disk!!!
Thanks at all.
Trending Topics
| You Need A Budget | Feb 10, 2012 |
| The Linux powered LAN Gaming House | Feb 08, 2012 |
| Creating a vDSO: the Colonel's Other Chicken | Feb 06, 2012 |
| Your CMS Is Not Your Web Site | Feb 01, 2012 |
| Casper, the Friendly (and Persistent) Ghost | Jan 31, 2012 |
| Razor-qt 0.4 - Qt based Desktop Environment | Jan 30, 2012 |
- Fun with ethtool
- Parallel Programming with NVIDIA CUDA
- Readers' Choice Awards 2011
- 100% disappointed with the decision to go all digital.
- Linux-Based X Terminals with XDMCP
- Validate an E-Mail Address with PHP, the Right Way
- You Need A Budget
- The Linux powered LAN Gaming House
- Why Python?
- Python for Android
- Employment Posters
2 hours 29 min ago - Sure the best distro is
3 hours 49 min ago - BeOS was the best
6 hours 33 min ago - I use Wireshark on a daily
11 hours 3 min ago - buena información
16 hours 10 min ago - One important "bucket" that I didn't note (désolé si qqun deja d
17 hours 10 min ago - Gnome3 is such a POS. No one
1 day 2 hours ago - Gnome 3 is the biggest POS
1 day 2 hours ago - I didn't knew this thing by
1 day 8 hours ago - Author's reply
1 day 12 hours ago





Do not work
Hy!
First thanks for your fast reply, Mitch Frazier...
But I've to inform that it don't work!!!
#mount like you tell me with out to extract
mount -o loop,ro,offset=$((2152710*512)) /media/paseo/imagen/imagen.img /media/net/
#The output
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
En algunos casos se encuentra información en syslog, pruebe
dmesg | tail o algo parecido
#The dmesg |tail
dmesg |tail
[15277.904921] EXT3-fs: write access unavailable, cannot proceed.
[15285.188111] EXT3-fs: INFO: recovery required on readonly filesystem.
[15285.188111] EXT3-fs: write access unavailable, cannot proceed.
[15643.599213] VFS: Can't find ext3 filesystem on dev loop0.
[15746.863089] VFS: Can't find ext3 filesystem on dev loop0.
[15761.026594] VFS: Can't find ext3 filesystem on dev loop0.
[15803.577323] VFS: Can't find ext3 filesystem on dev loop0.
[15864.643090] VFS: Can't find ext3 filesystem on dev loop0.
[15947.770446] EXT3-fs: INFO: recovery required on readonly filesystem.
[15947.770446] EXT3-fs: write access unavailable, cannot proceed.
#and doing the extract process
dd if=/media/paseo/imagen/imagen.img of=/media/paseo/imagen/newimagen.img bs=512 skip=2152710 count=6803527
#give me this result when I try to mount it...
mount -o loop /media/paseo/imagen/newimagen.img /media/net/
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
En algunos casos se encuentra información en syslog, pruebe
dmesg | tail o algo parecido
#the dmesg of this is...
dmesg |tail
[16232.413789] EXT3-fs: INFO: recovery required on readonly filesystem.
[16232.413789] EXT3-fs: write access unavailable, cannot proceed.
[16416.988757] kjournald starting. Commit interval 5 seconds
[16416.988757] EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
[16416.988757] EXT3 FS on loop0, internal journal
[16416.988757] EXT3-fs: mounted filesystem with ordered data mode.
[16473.681905] attempt to access beyond end of device
[16473.681929] loop0: rw=0, want=6295576, limit=6235897
[16473.681943] JBD: IO error reading journal superblock
[16473.681957] EXT3-fs: error loading journal.
#So I do some research on my own and find out that the extracted image is in size smaller than that, that I make by hand...
#I clear up
dd if=/dev/sda2 of=/media/paseo/imagen/test.img
#The size of this image is...
du -s /media/paseo/imagen/test.img
4194304 /media/paseo/imagen/test.img
#4Gb
#And the size of the extracted image is...
du -s /media/paseo/imagen/newimagen.img
3117952 /media/paseo/imagen/newimagen.img
#I think here is the point of the problem
#The calculation is wrong so I get a wrong size of the image in the two cases (extract and mount)...
#If some one can find out the right calculation... would be nice...and think would be work...!!!
Thanks at all....!!!
Try Using Parted
Try using parted rather than fdisk to display the offsets and sizes of the partitions. Set the units to bytes and then do a print. Take the byte values and divide them by 512, check to see if they match the values that fdisk is telling you.
Mitch Frazier is an Associate Editor for Linux Journal.
Use dd with an offset and count
This should extract the partition from the disk image:
Then you should be able to mount it with:
You should also be able to mount it without extracting it with:
Mitch Frazier is an Associate Editor for Linux Journal.