So Tired !_! 逆水行舟, 不进则退!


Create ISO Images from the Command Line

Posted by Nick Xu

You can create ISO images from any source disk or data by using the command line in Mac OS X. This isn’t too different than burning themthrough Terminal, and you can use either the hdiutil tool or dd command.

While the command line is generally reserved for advanced users, using it to create ISO’s isn’t too complicated and will save you the hassle of having to download any third party apps. If you’re new to the Terminal, remember that dragging & dropping files into the Terminal window will print their full path, making it easy to point to source files and preventing any navigation through the command line.

How to Create an ISO with hdiutil

The most reliable method is uses hdiutil, here is the syntax:

hdiutil makehybrid -iso -joliet -o image.iso /path/to/source

Here’s an example, creating an iso from a Windows 7 installer disc, with the end result showing up on the desktop:

hdiutil makehybrid -iso -joliet -o ~/Desktop/Windows7.iso /Volumes/Windows\ 7\ Install

The -joliet flag is necessary to make the iso fully compatible with Windows and other OS’s, though if your only requirement is to use the iso on a Mac you can leave it off.

Making an ISO with dd

Another approach is by switching around a previously discussed dd command, which makes it go from burning an image to creating an image. This may not be as reliable and it requires additional steps, so use dd only if you have a good reason not to use the primary hdiutil method.

Use the ‘diskutil list’ command to discover the disks identifier that you will need to make an ISO with dd from.

dd if=/dev/dvd of=/destination/path/dvd.iso

dd is often faster than hdiutil, but it’s definitely for more advanced users.

Converting Other Disk Image Formats to ISO

You can also convert other disk images like cdr, dmg, and nero images to ISO, read more about that here if interested.

For some quick terminology, making an image from a disc like this is often called ‘ripping’, whereas turning a disk image into a disc is often called ‘burning’, they are essentially the opposite of one another.

Tagged as: , Comments Off

burn an ISO on a USB drive on Mac OS X?

Posted by Nick Xu

Directly from the Ubuntu download page (my formatting):

  1. Download the desired file
  2. Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
  3. Convert the .iso file to .img using the convert option of hdiutil (e.g., hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso)
  4. Note: OS X tends to put the .dmg ending on the output file automatically. Remove the .dmg extension as necessary, mv ~/path/to/target.img{.dmg,}
  5. Run diskutil list to get the current list of devices
  6. Insert your flash media
  7. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  8. Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
  9. Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
  10. Using /dev/rdisk instead of /dev/disk may be faster.
    • If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
    • If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the 'Disk' and unmount (don't eject) the drive.
  11. Run diskutil eject /dev/diskN and remove your flash media when the command completes
  12. Restart your Mac and hold down Alt while the Mac is restarting to choose the USB stick

Note: On newer Macs you might have to install an EFI boot manager to boot from USB.

Tagged as: , , , , Comments Off


Posted by Nick Xu

首先,登入console,执行以下指令,建立iso档型式的储存库(SR - Storage Repositories)

mkdir /boot-iso

xe sr-create name-label=boot-iso type=iso device-config:location=/boot-iso device-config:legacy_mode=true content-type=iso



Tagged as: , , No Comments

使用grub引导linux、BT3、BT4 wifiway、IMG、ISO等

Posted by Nick Xu

使用grub改进版引导PE、BT3、BT4 wifiway、IMG、ISO等


2、运行解压后grub+目录下的GRUBINST_GUI.EXE程序,并按上图进行勾选。注意磁盘处根据容量一定选中你的U盘;恢复下面通过浏 览选中grub+目录下的gru+文件,且一定勾选下面的从文件中恢复。


4、把下载的BT3解压后生成的两个文件夹boot和BT3拷入U盘,并改boot为bt3boot。把下载的wifiway解压后生成的两个文件 夹boot和wifiway拷入U盘,并改boot为ww1boot,改wifiway为wifislax。从下载文件,并把解压后的 initrd.gz 和vmlinuz拷入U盘ww1boot目录。注意BT3目录一定要用大写。




foreground ffffff                          <文字颜色配置>
fontfile /grub/muifont.gz             <加载中文字库>
splashimage /grub/back.xpm.gz           <加载背景文件>
default 0                           <默认启动的菜单项>
timeout 5           <默认等待时间>
title 启动PE维护系统           <启动项菜单名,根据需要修改>
find --set-root /grub/000.000           <通过一个隐藏文件确认路径>
chainloader /wxpe/setupldr.bin           <引导WinPE系统>
title 启动BT3 Final (WEP破解)           <启动项菜单名,根据需要修改>
find --set-root /grub/000.000           <通过一个隐藏文件确认路径>
map --mem /grub/bt3.img (fd0)           <通过grub目录下bt3.img文件进入DOS系统并自动启动BT3>
map --hook                               <照写,不要修改>
chainloader (fd0)+1           <照写,不要修改>
rootnoverify (fd0)           <照写,不要修改>
title 启动wifiway (WEP破解)           <启动项菜单名,根据需要修改>
find --set-root /grub/000.000           <通过一个隐藏文件确认路径>
map --mem /grub/ww1.img (fd0)           <通过grub目录下ww1.img文件进入DOS系统并自动启动wifiway>
map --hook           <照写,不要修改>
chainloader (fd0)+1           <照写,不要修改>
rootnoverify (fd0)           <照写,不要修改>
title 启动TOOLS/GRUB目录下ISO.ISO光盘镜像           <启动项菜单名,根据需要修改>
find --set-root /grub/000.000           <通过一个隐藏文件确认路径>
map --mem /grub/iso.iso (hd32)           <引导grub下iso.iso文件,自己可修改路径及文件名>
map --hook                              <照写,不要修改>
chainloader (hd32)           <照写,不要修改>
title 启动TOOLS/GRUB目录下IMG.IMG磁盘镜像           <启动项菜单名,根据需要修改>
find --set-root /grub/000.000           <通过一个隐藏文件确认路径>
map --mem /grub/img.img (fd0)           <引导grub下img.img文件,自己可修改路径及文件名>
map --hook           <照写,不要修改>
chainloader (fd0)+1           <照写,不要修改>
rootnoverify (fd0)           <照写,不要修改>
title 重启计算机
title 关闭计算机

以上的“-------”是我方便说明加进去的,实际打开X文件是没有这几行的。从解释可以看出Grub的一个启动指令先是一行title 开头的用于在菜单里显示,然后跟上几条具体命令。

a、对于WinPE的引导,你可以去下载自己满意的PE系统把相关文件复杂到U盘上,用上面的命令启动,PE涉及的一些问题也很复杂我就不详细说明 了,我自己比较喜欢雨林木风和深度的PE系统。
c、对于ISO光盘镜像文件的引导需要特别说明一下,由于grub自身的原因,对于ISO文件的引导还不太完善,对于文件较大的ISO文件启动是非常慢 的,并且有可能就算启动了都会有些小问题,所以,呵呵,不要妄想应到windowsXP的原盘安装系统了。不过用来引导一些容量小工具镜像、PE等还是没 多大问题的。真的很期待完善啊!!!
d、对于IMG文件,现在有很多不错的IMG工具包,比如什么什么工具箱什么的,下载了做日常维护很好的。我自己使用雨林木风的。如果找到的是IMA文件 的话可以直接吧扩展名改为IMG来使用。
e、其实根目录下的grldr放到那看着很不爽,可以在dos下用“attrib +s +h grldr”隐藏一下,Grub下面几个文件我就是这么处理的。

Tagged as: , , No Comments