Nautilium 发表于 2005-7-6 09:34:41

linux下挂载镜像文件

我的FC4是从硬盘安装的,在添加删除软件包的时候系统提示要插入光盘,请问怎样将一个镜像文件挂载成为光驱,或者linux下有没有虚拟光驱软件?

darkyeah 发表于 2005-7-6 09:36:59

请问原来如何通过硬盘安装的?那个过程中不需要mount -o loop你的镜像吗?

Nautilium 发表于 2005-7-6 09:40:43

请问原来如何通过硬盘安装的?那个过程中不需要mount -o loop你的镜像吗?
我是参考下面的一篇文章安装的
制作USB启动盘 硬盘安装fc4



--------------------------------------------------------------------------------





1、准备一个U盘,备份里面的数据 (很废话)

2、准备第一张光盘里的 /images/diskboot.img 文件 (我是放到 /root/ 下 (也废话)

3、有一个可以运行的linux系统

4、把U盘插入计算机如果是自动挂载则要卸载。

5、

代码:

# fdisk -l





输出为



代码:

Disk /dev/sda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes



   Device Boot      Start         End      Blocks   IdSystem

/dev/sda1   *         1      1321    10610901    7HPFS/NTFS

/dev/sda2            1322      9729    67537260    fW95 Ext'd (LBA)

/dev/sda5            1322      2040   5775336    7HPFS/NTFS

/dev/sda6            2041      3570    12289693+   7HPFS/NTFS

/dev/sda7            3571      7499    31559661    bW95 FAT32

/dev/sda8            7500      8166   5357646    bW95 FAT32

/dev/sda9            8167      8179      104391   83Linux

/dev/sda10         8180      9729    12450343+8eLinux LVM



Disk /dev/sdb: 125 MB, 125682176 bytes

4 heads, 60 sectors/track, 1022 cylinders

Units = cylinders of 240 * 512 = 122880 bytes



   Device Boot      Start         End      Blocks   IdSystem

/dev/sdb1   ?    14341948      624086   501340218+5dUnknown

Partition 1 has different physical/logical beginnings (non-Linux?):

   phys=(195, 91, 1) logical=(14341947, 2, 58)

Partition 1 has different physical/logical endings:

   phys=(358, 102, 24) logical=(624085, 3, 18)

Partition 1 does not end on cylinder boundary.

/dev/sdb2   ?   7777694    14916873   856701495+   4FAT16 <32M

Partition 2 has different physical/logical beginnings (non-Linux?):

   phys=(374, 252, 61) logical=(7777693, 1, 18)

Partition 2 has different physical/logical endings:

   phys=(252, 139, 46) logical=(14916872, 1, 48)

Partition 2 does not end on cylinder boundary.

/dev/sdb3   ?      4370      4370         0   64Novell Netware 286

Partition 3 has different physical/logical beginnings (non-Linux?):

   phys=(357, 105, 44) logical=(4369, 0, 17)

Partition 3 has different physical/logical endings:

   phys=(0, 13, 10) logical=(4369, 0, 16)

Partition 3 does not end on cylinder boundary.

/dev/sdb4         12289       46968   4161536    0Empty

Partition 4 has different physical/logical beginnings (non-Linux?):

   phys=(0, 0, 0) logical=(12288, 0, 1)

Partition 4 has different physical/logical endings:

   phys=(0, 0, 0) logical=(46967, 1, 52)

Partition 4 does not end on cylinder boundary.



Partition table entries are not in disk order







我的硬盘是sata的,所以u盘识别为sdb 见红色部分

大小为 125682176 bytes



6、把镜像写到u盘



代码:

# dd if=/root/diskboot.img of=/dev/sdb bs=125682176







7、重启计算机用u盘启动

8、安装。。。。。。。。。。。。。。。。。。。。

darkyeah 发表于 2005-7-6 09:52:02

不知你4cd的镜像放在哪里?你重启u盘后怎么选4cd镜像安装的?

Nautilium 发表于 2005-7-6 10:16:38

我下载的是1DVD的镜像,装的时候是放在一个FAT32分区里的,U盘启动的时候选择从硬盘安装并输入镜像的路径就可以了.

darkyeah 发表于 2005-7-6 10:28:36

原来如此。。。你现在可以用mount -t vfat /dev/hda5 /mnt/tmp的方式将该fat32分区(假设你镜像在hda5中)装到系统/mnt/tmp路径下,这样就能看到/mnt/tmp中有你光盘镜像文件,然后用mount -o loop /mnt/tmp/path/FC4DVD.iso /mnt/cdrom的命令将镜像挂到/mnt/cdrom目录,系统让你插光盘时应该就能选择这个/mnt/cdrom路径作为源了,你试试?

Nautilium 发表于 2005-7-6 10:32:39

解决了,谢谢!

darkyeah 发表于 2005-7-6 10:43:17

最后怎做的?
页: [1]
查看完整版本: linux下挂载镜像文件