~2012
Install ubuntu from grub without any iso
So the new LTS from Ubuntu has been released. Time to upgrade my laptop as well. But I'm lazy bastard and I don't feel like downloading an iso nor do I have a CD player. So this is an easy hint to start the Ubuntu/Debian net installer from grub.
First download the netboot.tar.gz file from:
- 64bit: http://nl.archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/netboot.tar.gz
- 32bit: http://nl.archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/netboot.tar.gz Switch to the root user and extract the archive:
sudo su
cd
tar -xzf /tmp/netboot.tar.gz
Now edit /etc/grub.d/40_custom and add the following:
menuentry "precise" {
set root='(hd0,1)'
linux /root/ubuntu-installer/amd64/linux
initrd /root/ubuntu-installer/amd64/initrd.gz
}
set root='(hd0,1)' must point to the right partition where the installer is located on. Watch for that!
Allright, update grub and reboot:
sudo update-grub
sudo reboot
Now select precise from the menu and the installer will start. If you do not see a menu, hold down the shift key while grub starts! Note that this is a text mode installer, a graphical installer is for sizzies anyway :-P