操作步骤:
一、挂载iso文件到挂载点
[[email protected] ~ ]# mount -o loop /mnt/iso/CentOS5.iso /mnt/cdrom
二、查看挂载状态
[[email protected] ~ ]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 19G 3.3G 15G 19% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 62M 0 62M 0% /dev/shm
/mnt/iso/CentOS5.iso 3.9G 3.9G 0 100% /mnt/cdrom
三、开机自动挂载iso镜像文件
在/etc/fstab表中,添加最后的一行,将iso文件永久挂载到系统中
[[email protected] ~ ]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/mnt/iso/CentOS5.iso /mnt/cdrom iso9660 loop 0 0