I installed Bodhi on my Acer C720P Chromebook. Before I started an Upgrade i created a backup with

dd if=/dev/sda1 of=/path/to/image
And of course the upgrade went wrong. I could set up the chromebook again and i now try to get access to my backup. But I can not mount the image and fdisk tells me there is no partition

fdisk -l chromi.img
Disk chromi.img: 23.6 GB, 23623172096 bytes
255 heads, 63 sectors/track, 2872 cylinders, total 46139008 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: 0x00000000
Disk chromi.img doesn't contain a valid partition table

Does any one can help me?


Lets start with where things went wrong:

You did not backup your disk (which is /dev/sda).
You only backed-up a single partition.

In ASCII graphics:

-------------------- whole disk sda --------------------------    
[MBR]  [partition sda1]  [possible second partition sda2] ...

Your dd command told the computer to only backup the partition /dev/sda1.
But now you are telling fdisk to look for the MBR, which is not in /dev/sda1 and thus was not backupped.

In short, fdisk is correct 'chromi.img doesn't contain a valid partition table'.

Now trying to fix this:

What is your goal:

  • Copying the old image back over the existing partition?
  • or is it reading old data from the backup?

To copy things back you could boot from something, get access to your image (wherever it is. I assume you stored it somewhere on an external HDD or on an SDcard) and reverse the dd command to restore to the situation before the backup.

dd of=/dev/sda1 if=/path/to/image

To mount the filesystem (and not the whole disk) in the image you would:

  • Create a loopback device (e.g. losetup -d /dev/loop0)
  • And tell it to use the image (losetup /dev/loop0 /path/to/image)
  • You could then mount the loopback device just as a regular device. (e.g. mount /dev/loop0 /mnt`)

For future reference (and other readers with similar problems):
What you probably wanted to do is to backup the whole disk including boot record, all partitions and empty space. To do that you would use /dev/sda (without partition number). And you might want to pile that though gzip and or netcat.

Accesing filesystems in on such a whole disk backup is possible by using an offset (e.g. losetup /dev/loop0 disk.img -o NUMBER_HERE)

  • hi, thanks for you answer. Primarily I want try to get access to the old data. I tried to mount the filesystem as mentioned but i get the error mount: wrong fs type, bad option, bad superblock on /dev/loop1 seems that my image is corrupt? – fondue Nov 16 '14 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.