PDA

View Full Version : I make a DD image to restore, but I can't mount the disk



Jeroen1000
09-30-2008, 08:43 AM
I own a Netgear Readynas with 2 500G drives installed (mirrored RAID-setup).
Because I'm customizing it, which is really a lot of work for me, I made a backup with DD using following command:


dd if=/dev/hdc1 of='readynasOS.iso'. hdc1 is a 2GB partition which holds the Operating System.

Now, I've bricked my NAS, and have done a factory reset (It just formats the NAS syncs the drives and leaves me with a empty, clean device). Next, I hooked up the drive (the first physical drive of the NAS device as that one holds the OS) to my Windows XP SP3 computer. The image of the Readynas is also on my XP desktop on a seperate partition. Then, I booted into Knoppix using the Live CD.
It appears Knoppix names everything sdax (x being a number) but I suppose that is not a problem. The image (readynasOS.iso) is in the root of the sda4 partition. The disk whose partition needs to be restored is the hdc1 (Knoppix named it sdb1)partition.

My first mount attempt got this error:



mount: can't find /dev/sbd1/ in /etc/fstab or /etc/mtab


I alterered fstab and mtab (see extra info for their content) and then I got this error:


oot@Knoppix:/ramdisk/home/knoppix# mount /dev/sdb1/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


And I did do a dmesg | tail getting following info:


lo: Disabled Privacy Extensions
Mobile IPv6
EXT3-fs: Unsupported filesystem blocksize 16384 on sdb1.
eth1: no IPv6 routers present
eth1: no IPv6 routers present
EXT3-fs: Unsupported filesystem blocksize 16384 on sdb1.
EXT3-fs: Unsupported filesystem blocksize 16384 on sdb1.
EFS: 1.0a - http://aeschi.ch.eu.org/efs/
EXT3-fs: Unsupported filesystem blocksize 16384 on sdb1.
EXT3-fs: Unsupported filesystem blocksize 16384 on sdb1.


And as you might guess I'm stuck now. Does anyone know how to get this mounted:) thanks,

jeroen


Extra info :

fdisk - l



root@Knoppix:/ramdisk/home/knoppix# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4016 32258488+ 7 HPFS/NTFS
/dev/sda2 4017 13195 73730317+ 7 HPFS/NTFS
/dev/sda3 13196 16446 26113657+ 7 HPFS/NTFS
/dev/sda4 16447 48954 261120510 7 HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 255 2048000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 255 287 256000 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sdb3 287 60800 486064152 5 Extended
/dev/sdb5 287 60800 486064151+ 8e Linux LVM




Contents of fstab:


/proc /proc proc rw,nosuid,nodev,noexec 0 0
/sys /sys sysfs rw,nosuid,nodev,noexec 0 0
/dev/shm /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
/dev/pts /dev/pts devpts mode=0622 0 0
/dev/fd0 /media/fd0 auto user,noauto,exec,umask=000 0 0
/dev/cdrom /media/cdrom auto user,noauto,exec,ro 0 0
/dev/hda /media/hda auto users,noauto,exec,ro 0 0
# Added by KNOPPIX
/dev/sda1 /media/sda1 ntfs noauto,users,exec,umask=000,uid=knoppix,gid=knoppi x $
# Added by KNOPPIX
/dev/sda2 /media/sda2 ntfs noauto,users,exec,umask=000,uid=knoppix,gid=knoppi x $
# Added by KNOPPIX
/dev/sda3 /media/sda3 ntfs noauto,users,exec,umask=000,uid=knoppix,gid=knoppi x $
# Added by KNOPPIX
/dev/sda4 /media/sda4 ntfs noauto,users,exec,umask=000,uid=knoppix,gid=knoppi x $
# Added by KNOPPIX
/dev/sdb1 /media/sdb1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sdb2 /media/sdb2 auto noauto,users,exec 0 0


contents of mtab (I added the last line there myself)



/dev/root / ext2 rw 0 0
/ramdisk /ramdisk tmpfs rw,size=775604k,mode=755 0 0
/UNIONFS /UNIONFS aufs rw,br:/ramdisk:/KNOPPIX 0 0
/dev/hda /cdrom iso9660 ro 0 0
/dev/cloop /KNOPPIX iso9660 ro 0 0
/proc/bus/usb /proc/bus/usb usbfs rw,devmode=0666 0 0
/dev/pts /dev/pts devpts rw 0 0
/dev/sda1 /media/sda1 fuseblk ro,nosuid,nodev,noatime,allow_other,blksize=4096 $
/dev/sda2 /media/sda2 fuseblk ro,nosuid,nodev,noatime,allow_other,blksize=4096 $
/dev/sda3 /media/sda3 fuseblk ro,nosuid,nodev,noatime,allow_other,blksize=4096 $
/dev/sda4 /media/sda4 fuseblk ro,nosuid,nodev,noatime,allow_other,blksize=4096 $
/dev/sdb1 /media/sdb1

jsk
03-25-2011, 08:08 PM
I have the same problem with my Ubuntu 10.10 server. i've tried reading the file using knoppix (v3 & v6) and cygwin. I get the exact same errors that you did. If anyone else knows how to solve this, please let me know. I'm thinking we both used the dd command incorrectly. I did it the same way as you except for my destination file name of course.

krishna.murphy
03-26-2011, 07:40 PM
It looks like the NAS format did not produce bare drives that conform to the standards. Now, the target (bare) drive has partitions that won't mount. What if you put that drive back in the NAS box and let Knoppix see it as a network drive? I'm not sure what you need to accomplish by putting the data on one drive only, but may both will work for you.

Cheers!
Krishna :mrgreen:

Forester
03-26-2011, 09:24 PM
I have the same problem with my Ubuntu 10.10 server. i've tried reading the file using knoppix (v3 & v6) and cygwin. I get the exact same errors that you did. If anyone else knows how to solve this, please let me know. I'm thinking we both used the dd command incorrectly. I did it the same way as you except for my destination file name of course.

Hi jsk and welcome to the Knoppix forums,

What Jeroen did (and so I guess you did too) was to back up a partition (file system and all). What I think Jeroen needed to do was restore the partition (file system and all).

For that, not only do you not need to mount the partitions first, you definitely don't want to. If the partition won't mount, then it doesn't have a file system on it. I haven't had the pleasure of playing with a NAS so I don't know what this 'reset' does. It looks like it restored the partition table but not the file system. That does not seem too unreasonable to me.

If you backed up a partition with:


dd if=/dev/sdc1 of=myBackup.certainlyNotIsothen you'd restore it with:


dd of=/dev/sdc1 if=myBackup.certainlyNotIsoassuming the world hasn't turned in between.

It's a cat, so there are harder ways of killing it but try Occam's Razor first. If that doesn't work, report back and we'll scratch heads some more.