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)