태그

grub으로 iso 시스템 돌리는 법 법

Install Unetbootin and set everything up for booting an ISO using Grub2

 

Warning: remember, when messing with Grub (or any application that modifies it), there are things that might go wrong so use this at your own risk and if you know how to fix it in case things go wrong.
1. Install Unetbootin:
In Ubuntu, simply run the following command to install it:
sudo apt-get install unetbootin

 

If you’re not using Ubuntu and Unetbootin is not in your distro official repositories, download it from HERE.

Important: like Scirocco points out in a comment, there are issues with some Unetbootin versions which not only fail to work when trying to boot an ISO from the hard disk, but will also fail when you try to create a bootable USB. I’ve used Unetbootin 494 from GetDeb and everything worked fine so I suggest you use the same version. So if you’re getting an error like this: “disk image not found. need to load kernel first”, it’s because of the Unetbootin version you’re using.

2. Using Unetbootin to create a new Grub2 entry to boot the ISO:

In Unetbootin, select the “Diskimage” option, then browse for an ISO and under “Type” select “Hard Disk” and leave “/” for the “Drive”, then click OK:
Unetbootin boot Grub2 ISO

 

Once Unetbootin finishes, restart your computer and select “Unetbootin” in the GRUB2 menu. If the Grub2 menu doesn’t show up, press and hold the SHIFT key.
Because Unetbootin extracts the ISO, you’ll have to run it again when you want to boot a new ISO, even if it has the same name and is placed in the same location as the old one.

Removing the ISO from GRUB2 menu

 

Unetbootin remove ISO grub2

 

The next time you’ll launch Unetbootin, it will ask you the following: “Unetbootin is currently installed. Remove the existing version?” – this isn’t about removing Unetbootin but about removing the Grub2 menu entry for Unetbootin (and the ISO). Select “OK” and the ISO will be removed from the menu.

* 수동으로 설정하는 방법법
Copy, for example the ISOs in /home, find the partition where is /home which is expressed as (hd”number_of_drive”,”number_of_partition”) and after do a:

sudo gedit /etc/grub.d/40_custom

and add for every iso this piece of code:

menuentry “Boot Ubuntu 10.10 Live ISO” {
loopback loop (hd0,1)/home/ubuntu-10.10-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/home/ubuntu-10.10-desktop-i386.iso file=(loop)/preseed/ubuntu.seed quiet splash —
initrd (loop)/casper/initrd.lz
}

and rebuild grub2 sector with

sudo update-grub2

Advertisements