linux中制作可启动的ISO

来源:互联网 发布:淘宝小蜜在哪 编辑:程序博客网 时间:2024/05/18 10:34
links:http://www.linux.org/docs/ldp/howto/Bootdisk-HOWTO/cd-roms.html11. Creating bootable CD-ROMsThis section was contributed by Rizwan Mohammed Darwe (rizwan AT clovertechnologies dot com) This section assumes that you are familiar with the process and workings ofwriting CDs in linux. Consider this to be a quick reference to include theability to boot the CD which you will burn. The CD-Writing-HOWTO should give youan in-depth reference.11.1. What is El Torito?For the x86 platform, many BIOS's have begun to support bootable CDs.The patches for mkisofs is based on the standard called "El Torito".Simply put, El Torito is a specification that says how a cdrom should be formatted such that you can directly boot from it. The "El Torito" spec says that any cdrom driveshould work (SCSI or EIDE) as long as the BIOS supports El Torito. So farthis has only been tested with EIDE drives because none of the SCSIcontrollers that has been tested so far appears to support El Torito. Themotherboard definately has to support El Torito. How do you know if yourmotherboard supports "El Torito"? Well, the ones that support it let youchoose booting from hard disk, Floppy, Network or CDROM. 11.2. How it Works The El Torito standard works by making the CD drive appear, throughBIOS calls, to be a normal floppy drive. This way you simply put any floppysize image (exactly 1440k for a 1.44 meg floppy) somewhere in the ISOfilesystem. In the headers of the ISO fs you place a pointer to this image.The BIOS will then grab this image from the CD and for all purposes it acts asif it were booting from the floppy drive. This allows a working LILO bootdisk, for example, to simply be used as is. Roughly speaking, the first 1.44 (or 2.88 if supported) Mbytes of theCD-ROM contains a floppy-disk image supplied by you. This image is treatedlike a floppy by the BIOS and booted from. (As a consequence, while bootingfrom this virtual floppy, your original drive A:(/dev/fd0) may not be accessible, but you can try with/dev/fd1). 11.3. How to make it workFirst create a file, say "boot.img", which is an exact image of the bootable floppy-disk which you want to boot via the CD-ROM. This must be an 1.44 MB bootable floppy-disk. The command below will do thisdd if=/dev/fd0 of=boot.img bs=10k count=144assuming the floppy is in the A: drive.Place this image somewhere in the hierarchy which will be the sourcefor the iso9660 filesystem. It is a good idea to put all boot relatedfiles in their own directory ("boot/" under the root of the iso9660 fs,for example).One caveat -- Your boot floppy must load any initialramdisk via LILO, not the kernel ramdisk driver! This is because once thelinux kernel starts up, the BIOS emulation of the CD as a floppy disk iscircumvented and will fail. LILO will load the initial ramdisk using BIOSdisk calls, so the emulation works as designed. The El Torito specification requires a "boot catalog" to be created aswell. This is a 2048 byte file which is of no interest except it is required.The patchwork done by the author of mkisofs will cause it to automaticallycreate the boot catalog, but you must specify where the boot catalog will goin the iso9660 filesystem. Usually it is a good idea to put it in the sameplace as the boot image, and a name like boot.catalogseems appropriate.So we have our boot image in the file boot.img,and we are going to put it in the directory boot/ under the root of the iso9660 filesystem.We will have the boot catalog go in the same directory with the nameboot.catalog. The command to create the iso9660 fs inthe file bootcd.iso is then:mkisofs -r -b boot/boot.img -c boot/boot.catalog -o bootcd.iso .The -b option specifies the boot image to be used (note thepath is relative to the root of the iso9660 disk), and the -coption is for the boot catalog file. The -r option will makeapproptiate file ownerships and modes (see the mkisofsmanpage). The "." in the end says to take the source from the currentdirectory. Now burn the CD with the usual cdrecord command and it is ready to boot.11.4. Create Win9x Bootable CD-RomsThe first step is to get hold of the bootable image used by the sourceCD. But you cannot simply mount the CD under linux and dd the first 1440k toa floppy disk or to a file like boot.img. Instead yousimply boot with the source CD-ROM. When you boot the Win98 CD you are dropped to A: prompt which is theactual ramdisk. And D: or Z: is where all the installables are residing. Byusing the diskcopy command of dos copy the A: image into the actual floppydrive which is now B: The command below will do this.diskcopy A: B: It works just like dd. You can try booting from this newly created disk totest if the booting process is similar to that of the source CD. Then theusual dd of this floppy to a file like boot.img and then rest is as usual.
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 手机酷狗音乐文件不支持怎么办 2018款ipad闪退怎么办 ipad开不了机了怎么办 淘宝盖楼上限了怎么办 交了学费做微淘客却加不到人怎么办 微淘客交首付不想做了怎么办 蚂蚁微客二维码推广怎么办 游拍主播申请手机号被注册怎么办 淘宝客不给力怎么办 淘宝买家确认收货超时怎么办 淘宝没收到货退款卖家不处理怎么办 微博红包都是字怎么办 500个访客没转化怎么办 店铺动态评分是0怎么办 京东店铺评分低怎么办 被淘宝主播屏蔽怎么办 在淘宝客推广后退款怎么办 生产出现异常时你应该怎么办 违规后的店铺没访客怎么办 淘宝少发货店家不承认怎么办 淘宝买东西店家不发货怎么办 淘宝店家拒绝同意退款怎么办 被淘宝店家骂了怎么办 淘宝买家骂店家骚扰店家怎么办? 不想开淘宝店了怎么办 我是客服经常有客户骂人怎么办 淘宝直播前期没人看怎么办 淘宝被投诉商标侵权怎么办 淘宝后商家页面打不开了怎么办 淘宝遇到职业打假人怎么办 发票被复写上字怎么办 淘宝直播广告图片的商品怎么办 美团商家排名低怎么办 想成为淘宝主播怎么办 用移动流量很卡怎么办 淘宝店铺被恶意刷流量怎么办 一个想要公司权利的人怎么办 淘宝商家短信推广告怎么办 在群里乱发信息怎么办 支付宝扫不了码怎么办 淘宝商家收款不发货怎么办