Install Linux Mint without dvd/usb

BenNZ
  8 years ago
  3

Requirements :

An existing linux distro that uses grub2

A swap partition larger then the latest iso.

 

It has come up a few times that people want to install linuxmint but dont have a dvd or usb handy to do so. If using linux distro that uses grub2 , grub2 can boot the linumint iso's from a partition. The iso however has to be on a partition that you wish to keep (even if only temporary) and not on one you wish to format.

The first step is too stop using the swap , this can be done in gparted , right click swap off .

Then in gparted right click the partition , format to -> ext4

Download the iso onto the newly created ext4 partition

edit as root /etc/grub.d/40_custom (ie using alt f2 , gksudo gedit /etc/grub.d/40_custom) and add

menuentry "Linux Mint 17 Cinnamon Iso" {
    loopback loop /linuxmint-17.3-cinnamon-32bit.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/linuxmint-17.3-cinnamon-32bit.iso noeject noprompt --
    initrd (loop)/casper/initrd.lz
}

Change the name of the iso and name to match the version you wish to install .

For Lmde the menu entry is a bit different however the name and iso needs to still match.

menuentry "LMDE Mate" {
    loopback loop /lmde-2-201503-mate-32bit.iso
    linux (loop)/live/vmlinuz fromiso=/dev/disk/by-uuid/XXX-XXX-XX/lmde-2-201503-mate-32bit.iso boot=live live-config live-media-path=/live ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --
    initrd (loop)/live/initrd.img
}

The XXX-XXX-XXX needs to replaced by the uuid of the ext4 partition that the iso is on , you can find that out using sudo blkid in terminal or in gparted.

When youre happy that the uuid matches and the rest of the menuentry is correct , save it , then open a terminal and run sudo update-grub

When you reboot you will have a menuentry for the iso you wish to boot .

Also not that the installer will ask you whether or not you wish to force the unmount of the partition the iso is on , obviously you dont do that.

During the install I would recommend that you dont create another swap partition when you install as you can format the one the iso is on after the install.

The same thing can be achieved if you already have a partition that you dont want to lose , just copy the iso there, just make sure the path and uuid is correct for the iso.

Comments
Hammer459 8 years ago

Clever way.
You may want to expand the second to last paragraph to explain to the less experienced how to restore the "iso" partition to swap.
Otherwise very good.