Re-install ubuntu or debian on linux computers with grub2

become root and run this script locally or remote with ssh or teamviewer

Normal user = ubu paswoord: lsbe       root password= lsbe       CHANGE THEM!!!

ubuntu us keyboard english language:

#!/bin/bash
cd /etc/grub.d
rm 40_custom
wget http://www.papegaaiduiker.be/installers/ubuntuen/40_custom
chmod +x 40_custom
file=/etc/grub.d/00_header
if grep "superusers" "$file" ;then
 sed -i "s|set superusers|#set superusers|g" /etc/grub.d/00_header
else
  echo "not found"
fi
sed -i "s|GRUB_DEFAULT=0|GRUB_DEFAULT=saved|g" /etc/default/grub
update-grub
mkdir /iso
cd /iso
wget http://www.papegaaiduiker.be/installers/ubuntuen/ubuntuen.iso
cd /root
grub-reboot Netinstall
/sbin/reboot

ubuntu us keyboard nederlands:

#!/bin/bash
cd /etc/grub.d
rm 40_custom
wget http://www.papegaaiduiker.be/installers/ubuntunl/40_custom
chmod +x 40_custom
file=/etc/grub.d/00_header
if grep "superusers" "$file" ;then
 sed -i "s|set superusers|#set superusers|g" /etc/grub.d/00_header
else
  echo "not found"
fi
sed -i "s|GRUB_DEFAULT=0|GRUB_DEFAULT=saved|g" /etc/default/grub
update-grub
mkdir /iso
cd /iso
wget http://www.papegaaiduiker.be/installers/ubuntuen/ubuntuen.iso
cd /root
grub-reboot Netinstall
/sbin/reboot

 

debian wheezy 64bit  us keyboard english:

#!/bin/bash
cd /etc/grub.d
rm 40_custom
wget http://www.papegaaiduiker.be/installers/debiso/40_custom
chmod +x 40_custom
file=/etc/grub.d/00_header
if grep "superusers" "$file" ;then
 sed -i "s|set superusers|#set superusers|g" /etc/grub.d/00_header
else
  echo "not found"
fi
sed -i "s|GRUB_DEFAULT=0|GRUB_DEFAULT=saved|g" /etc/default/grub
update-grub
mkdir /iso
cd /iso
wget http://www.papegaaiduiker.be/installers/debiso/debian.iso
cd /root
rm debiso.sh
grub-reboot Netinstall
/sbin/reboot

 

Problems? Shout

Success?