打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
mikas blog ? Blog Archive ? Boot an ISO via Grub2

With grub2 you can directly boot an (iso9660) ISO using its loopback option. This is great because it provides another nice rescue scenario – for example when using grml (the Debian based Linux Live-CD for sysadmins). You no longer need to extract kernel and initrd from the ISO to be able to boot it using the isofrom bootoption. All you need to do is put a plain grml ISO to your harddisk.

Due to popular request (especially in #grub) PLEASE NOTE: grub itself can NOT boot CDROM images/ISOs. Neither version 1 nor version 2 of grub. Grml provides this feature via its isofrom bootoption. Grub2 strongly simplifies this setup with its loopback option but grub alone will NOT be enough. It’s the live system (as for example grml) that has to support this “boot from ISO” feature.

I’ve tested it with grml-small 2008.11 and grml-small 2009.05-rc1 using grub2 from Debian/unstable (1.96+20090317-1). In the following example the ISO file grml-small_2008.11.iso is available in directory grml on device /dev/sda1. You can boot it from the interactive grub shell using:

loopback loop (hd0,1)/grml/grml-small_2008.11.isolinux    (loop)/boot/grmlsmall/linux26 isofrom=/dev/sda1/grml/grml-small_2008.11.iso boot=live quiet vga=791 noeject noprompt initrd   (loop)/boot/grmlsmall/initrd.gzboot

So if you are using grub2 already consider adding an entry like the following to your grub config (/boot/grub/grub.cfg):

menuentry "grml-rescue system from harddisk (ISO = grml-small_2008.11.iso)" {  loopback loop (hd0,1)/grml/grml-small_2008.11.iso  linux    (loop)/boot/grmlsmall/linux26 isofrom=/dev/sda1/grml/grml-small_2008.11.iso boot=live quiet vga=791 noeject noprompt   initrd   (loop)/boot/grmlsmall/initrd.gz}

This entry gives you the option to boot grml from your harddisk even if you don’t have the possibility to boot via CD/USB/PXE/….

Tip: starting with grml 2009.05(-rc1) you can also use findiso=/path/to/grml.iso instead of isofrom=/dev/sdX/path/to/grml.iso. findiso is a dynamic version of isofrom as it looks for the specified ISO file on all disks where it usually looks for the .squashfs file (so you don’t have to know the device name compared to isofrom=…). The above configuration using findiso is even easier to set up and would look like this:

menuentry "grml-rescue system from harddisk (ISO = grml-small_2008.11.iso)" {  loopback loop (hd0,1)/grml/grml-small_2008.11.iso  linux    (loop)/boot/grmlsmall/linux26 findiso=/grml/grml-small_2008.11.iso boot=live quiet vga=791 noeject noprompt   initrd   (loop)/boot/grmlsmall/initrd.gz}

This entry was posted by mika on Monday, May 25th, 2009 at 19:58 and is filed under Computer, Debian, English. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.                             

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
WIN7下硬盘安装linux双系统教程(EasyBCD法)[图文]
SuSE 10.0 硬盘安装
openSUSE硬盘安装openSUSE12.2全程图解 | Linux视野
从硬盘引导Linux安装程序 - Linux - Tech - ITeye论坛
win8.1和ubuntu14.04双系统安装
从硬盘安装YLMF OS 3.0全过程
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服