This equates to the same thing as booting from a DVD but without the DVD.
UPDATE: 08.24.2011 - edited to use existing 40_custom file instead of creating a new file for GRUB.
- Tested with linuxmint-201108-gnome-64bit-rc.iso
Why would you want to do this?
Makes for a handy backup.
Nearly an unbreakable OS - you just need GRUB to boot it.
Perhaps you're out of blank media.
It's faster than burning a blank.
First we need to extract some files from the .iso image. Get root
Code: Select all
# mkdir loopmount
# mount -o loop /path/to/linuxmint-201108-gnome-64bit-rc.iso loopmount
# ls loopmount
total 5
dr-xr-xr-x 2 root root 2048 Apr 29 03:32 isolinux
dr-xr-xr-x 2 root root 2048 Sep 5 10:10 casper
-r--r--r-- 1 root root 526 Sep 5 10:12 md5sum.txt
The aim is to replicate the DVD filesystem structure on the hard drive.
Code: Select all
# mkdir /casper
# cp loopmount/casper/* /casper
Code: Select all
# ls /casper
total 1139288
-r-xr-xr-x 1 root root 2690384 Aug 7 13:51 vmlinuz
-r--r--r-- 1 root root 9406326 Aug 7 13:51 initrd.lz
-r--r--r-- 1 root root 11 Aug 7 13:51 filesystem.size
-r--r--r-- 1 root root 36057 Aug 7 13:51 filesystem.manifest
-r--r--r-- 1 root root 1154428928 Aug 7 14:02 filesystem.squashfs
-r--r--r-- 1 root root 36025 Aug 7 14:02 filesystem.manifest-desktop
For grub-pc
Add an entry to /etc/grub.d/40_custom.
If you're using the first partition of the first hard drive, you can simply copy paste the below code block as root and press enter:
Code: Select all
cd /etc/grub.d/
cat >> 40_custom << EOF
menuentry "Linux Mint Debian squashfs" {
set root=(hd0,1)
linux /casper/vmlinuz boot=live live-media-path=/casper quiet splash gfxpayload=1024x768
initrd /casper/initrd.lz
}
EOF
update-grub2
For grub-legacy
Add an entry to /boot/grub/menu.lst
Code: Select all
title LMDE
root (hd0,0)
kernel /casper/vmlinuz boot=live live-media-path=/casper quiet splash vga=791
initrd /casper/initrd.lz
You can still access the partition that the image was booted from mounted @ /live/image
If you intend to use the squashfs as a repair tool you might want a separate partition for the squashfs itself.
This way you can still chroot into any other partition.