定制你自己的FreeBSD DVD 镜像!
时间:2008-03-15
来源:linux论坛
在手机上看
手机扫描阅读
If you're in the FreeBSD world, you've probably already downloaded or csup'd FreeBSD 7.0 or are in the process of doing so now. As yes, after what seemed like waiting forever, the announcement of 7.0 went out last night.
I spent this morning making a DVD ISO of FreeBSD 7.0 to be included in the upcoming BSD magazine. Creating a DVD is easy and my instructions follow.
Start by downloading the following four files from your closest FreeBSD mirror; you'll find these files in the ISO-IMAGES-i386/7.0/ directory:
7.0-RELEASE-i386-disc1.iso
7.0-RELEASE-i386-disc2.iso
7.0-RELEASE-i386-disc3.iso
7.0-RELEASE-i386-docs.iso
Note: all of the mirrors are extremely busy today so you may haveto try a few before you find one close to you that has some connectionsleft. I saved mine to the download subdirectory of my home directory. Icreated a staging area, became the superuser and ran the followingcommands to mount and untar the contents of the 4 files:
cd ~dru/downloads/dvd-freebsd7/
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-disc1.iso -u 0
mount -t cd9660 /dev/md0 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-disc2.iso -u 1
mount -t cd9660 /dev/md1 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-disc3.iso -u 2
mount -t cd9660 /dev/md2 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-docs.iso -u 3
mount -t cd9660 /dev/md3 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
Next, use sed or the replace function of your favourite text editor to remove all incidences of ||1 and ||2 and ||3 from the file packages/INDEX.
Add these lines to cdrom.inf:
CD_VOLUME = 0
CD_VOLUME = 1
CD_VOLUME = 2
CD_VOLUME = 3
Then, remove this directory:
rm -Rf rr_moved
or you will get this error when you try to create your DVD:
mkisofs: Error: './rr_moved' and '(NULL POINTER)' have the same Rock Ridge name 'rr_moved'.
mki/usr/home/dlavigne6/sofs: Unable to sort directory
:-( write failed: Input/output error
This command (type all on one line) will burn your DVD on the fly;note that it will NOT save a copy of the ISO to your hard disc:
growisofs -Z /dev/cd0 -J -R -no-emul-boot -b boot/cdboot -iso-level 3 .
To instead create an ISO which you can then burn at your leisure, use this command (typed all on one line):
mkisofs -V FreeBSD7 -J -R -b boot/cdboot -no-emul-boot -o freebsd7.iso .
and to burn the ISO:
growisofs -dvd-compat -Z /dev/cd0=freebsd7.iso
That's it. Have fun!
I spent this morning making a DVD ISO of FreeBSD 7.0 to be included in the upcoming BSD magazine. Creating a DVD is easy and my instructions follow.
Start by downloading the following four files from your closest FreeBSD mirror; you'll find these files in the ISO-IMAGES-i386/7.0/ directory:
7.0-RELEASE-i386-disc1.iso
7.0-RELEASE-i386-disc2.iso
7.0-RELEASE-i386-disc3.iso
7.0-RELEASE-i386-docs.iso
Note: all of the mirrors are extremely busy today so you may haveto try a few before you find one close to you that has some connectionsleft. I saved mine to the download subdirectory of my home directory. Icreated a staging area, became the superuser and ran the followingcommands to mount and untar the contents of the 4 files:
cd ~dru/downloads/dvd-freebsd7/
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-disc1.iso -u 0
mount -t cd9660 /dev/md0 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-disc2.iso -u 1
mount -t cd9660 /dev/md1 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-disc3.iso -u 2
mount -t cd9660 /dev/md2 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
mdconfig -a -t vnode -f ../7.0-RELEASE-i386-docs.iso -u 3
mount -t cd9660 /dev/md3 /mnt
tar -C /mnt -cf - . | tar -xf -
umount /mnt
Next, use sed or the replace function of your favourite text editor to remove all incidences of ||1 and ||2 and ||3 from the file packages/INDEX.
Add these lines to cdrom.inf:
CD_VOLUME = 0
CD_VOLUME = 1
CD_VOLUME = 2
CD_VOLUME = 3
Then, remove this directory:
rm -Rf rr_moved
or you will get this error when you try to create your DVD:
mkisofs: Error: './rr_moved' and '(NULL POINTER)' have the same Rock Ridge name 'rr_moved'.
mki/usr/home/dlavigne6/sofs: Unable to sort directory
:-( write failed: Input/output error
This command (type all on one line) will burn your DVD on the fly;note that it will NOT save a copy of the ISO to your hard disc:
growisofs -Z /dev/cd0 -J -R -no-emul-boot -b boot/cdboot -iso-level 3 .
To instead create an ISO which you can then burn at your leisure, use this command (typed all on one line):
mkisofs -V FreeBSD7 -J -R -b boot/cdboot -no-emul-boot -o freebsd7.iso .
and to burn the ISO:
growisofs -dvd-compat -Z /dev/cd0=freebsd7.iso
That's it. Have fun!
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28