# in the current system, make a location for the installer data sudo mkdir /inst sudo chown -R $USER: /inst # download installer kernel cd /inst wget http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/SHA256SUMS mkdir hd-media; cd hd-media wget http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/vmlinuz wget http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/hd-media/initrd.gz cd .. grep hd-media/vmlinuz SHA256SUMS | sha256sum -c - || echo DO NOT INSTALL THIS grep hd-media/initrd.gz SHA256SUMS | sha256sum -c - || echo DO NOT INSTALL THIS # find out the hard drive where you put the installer kernel df /inst # /dev/sda --> hd0 # /dev/sda5 --> hd0,msdos5 # note that sda does not necessarily correspond to hd0, only probably does. root_str="hd0,msdos5" # add a grub entry so grub boots the installer kernel. # This is telling grub to look at your current system's partition, fetch the # kernel from there and then launch that. # In short, make sure to append to the existing 40_custom file. # In long: the /etc/grub.d/ files are IMHO made unnecessarily complex. # They are shell scripts expected to *output* grub menuentries to *stdout*. The # 40_custom file has a line saying # exec tail -n +3 $0 # which runs tail to output this same file starting from the third line. # It really is a madly convoluted way to let you write menuentries in # plain text: grub launches 40_custom as shell script, which then finds # out its own filename with `$0', feeds it to tail to start reading from # line 3, and thus prints the rest of the file to stdout. # We might have just written the menuentry to /boot/grub/grub.cfg, but anyone # running update-grub would overwrite that. So append the menuentry after that # `exec tail...` in /etc/grub.d/40_custom: sudo sh -c 'cat >> /etc/grub.d/40_custom' <