.
映像文件中的目录所在
=
实际
Linux
文件系统的目录所在
.
/movies/=/srv/movies/
(
Linux
/srv/movies
内的文件,加至映像文件中的
/movies/
目录
)
.
/linux/etc=/etc
(
½
Linux
中的
/etc/
内的所有数据备份到映像文件中的
/linux/etc/
目录中
)
我们透过一个简单的范例来说明一下吧。如果你想要½
/root, /home, /etc
等目录内的数据通通刻录起
来的话,
先得要处理一下映像档,我们先不使用
-graft-point
的选项来处理这个映像档试看看:
[root@study ~]#
mkisofs
-
r
-
v
-
o /tmp/system.img /root /home /etc
I:
-
input
-
charset not specified, using utf
-
8 (detected in locale settings)
genisoimage 1.1.11 (Linux)
Scanning /root
.....(
省略
).....
Scanning /etc/scl/prefixes
Using SYSTE000.;1 for /system
-
release
-
cpe (system
-
release)
#
被改名子了!
Using CENTO000.;1 for /centos
-
release
-
upstream (centos
-
release)
#
被改名子了!
Using CRONT000.;1 for /crontab (crontab)
genisoimage: Error: '/etc/crontab' and '/root/crontab' have the sa
me Rock Ridge name 'crontab'.
Unable to sort directory
#
名不可一
啊!
NOTE: multiple source directories have been specified and merged into the root
of the filesystem. Check your program arguments. genisoimage is not
tar.
#
看到
?因
为档
名一模一
,所以就不
你½立
ISO
檔了啦!
#
/root/crontab
这个
文件
,然后再重复
行一次
mkisofs
吧!
[root@study ~]#
rm /root/crontab
[root@study ~]#
mkisofs
-
r
-
v
-
o /tmp/system.img /root /home /etc
.....(
前面省略
).....
83.91% done, estimate finish Thu Jul 2 18:48:04 2015
92.29% done, estimate finish Thu Jul 2 18:48:04 2015
Total translation table size: 0
Total rockridge attributes bytes: 600251
Total directory bytes: 2150400
Path table size(bytes): 12598
Done with: The File(s) Block(s) 58329
Writi
ng: Ending Padblock Start Block 59449
Done with: Ending Padblock Block(s) 150
Max brk space used 548000
59599 extents written (116 MB)
[root@study ~]#
ll
-
h /tmp/system.img
-
rw
-
r
--
r
--
. 1 root root 117M Jul 2 18:48
/tmp/system.img
[root@study ~]#
mount
-
o loop /tmp/system.img /mnt
[root@study ~]#
df
-
h /mnt
Filesystem Size Used Avail Use% Mounted on