This equates to the same thing as booting from a DVD just without the DVD.
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
# mkdir loopmount
# mount -o loop /path/to/linuxmint-debian-201009-gnome-dvd-i386.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
Now that the .iso is loop mounted we can copy files onto the hard drive:
# mkdir /casper
# cp loopmount/casper/* /casper
You can make sure it's all there:
# ls /casper
total 894932
-r--r--r-- 1 root root 30208 Sep 24 09:51 filesystem.manifest-desktop
-r--r--r-- 1 root root 30240 Sep 24 09:51 filesystem.manifest
-r-xr-xr-x 1 root root 906858496 Sep 24 09:52 filesystem.squashfs
-r--r--r-- 1 root root 7190389 Sep 24 09:52 initrd.lz
-r-xr-xr-x 1 root root 2287264 Sep 24 09:52 vmlinuz
Now to make it bootable.
For grub-pc
Create a file something like this:
# cd /etc/grub.d/
# cat >> 41_LMDE_squash << EOF
menuentry "Linux Mint Debian squashfs" {
set root=(hd0,1)
linux /casper/vmlinuz boot=live live-media-path=/casper quiet splash vga=791
initrd /casper/initrd.lz
}
EOF
# chmod +x 41_LMDE_squash;update-grub2
For grub-legacy
Add an entry to /boot/grub/menu.lst
title LMDE
root (hd0,0)
kernel /casper/vmlinuz boot=live live-media-path=/casper quiet splash vga=791
initrd /casper/initrd.lz
*Note*
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 seperate partition for the squashfs itself.
This way you can still chroot into any other partition.
0 comments:
Post a Comment