如何挂载用dd创建的图像?


6

我使用'dd'将我的硬盘驱动器的图像创建为另一个驱动器上的文件。问题:如何安装此图像以确定它是否有效?笔记:

  • “文件图像”产生(所有一行,我只是为了可读性而将其分解):

文件maindisk.image.out


maindisk.image.out: x86 boot sector, LInux i386 boot LOader; GRand Unified Bootloader,
stage1 version 0x3, boot drive 0x80, 1st sector stage2 0x44841, GRUB version 0.94;
partition 1: ID=0x83, active, starthead 1, startsector 63, 409600 sectors; partition 2:
ID=0x8e, starthead 127, startsector 409663, 312167042 sectors, code offset 0x48
  • 显而易见的mount命令(以root身份)失败:

# mount -o loop -t ext3 maindisk.image.out /mnt/loop/ 

mount: wrong fs type, bad option, bad superblock on /dev/loop0, 
       missing codepage or helper program, or other error 
       In some cases useful info is found in syslog - try 
       dmesg | tail  or so

# dmesg | tail -1

# VFS: Can't find ext3 filesystem on dev loop0. 
  • 我想要的是/ dev / sda,一个块设备。根据文件(再次,所有在一行,没有反斜杠):
 
# cat /dev/sda | file - 

/dev/stdin: x86 boot sector, LInux i386 boot LOader; GRand Unified Bootloader, \
stage1 version 0x3, boot drive 0x80, 1st sector stage2 0x44841, GRUB version 0.\
94; partition 1: ID=0x83, active, starthead 1, startsector 63, 409600 sectors; \
partition 2: ID=0x8e, starthead 127, startsector 409663, 312167042 sectors, cod\
e offset 0x48 
  • 根据“mount”,这是我如何安装/ dev / sda:

/dev/mapper/VolGroup-lv_root on / type ext4 (rw) 
/dev/sda1 on /boot type ext3 (rw) 
  • 我备份了错误的东西吗?我应该备份/ dev / sda1吗?我的系统是否正在进行某种卷管理,这使得这种映像难以安装?

Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.