You can install debian or try a debian live from your hdd, without needing a cd or usb stick.
Instructions here are based on a debian forum topic [1]. There are alternative solutions for text based installers that does not need to copy files from inside the iso file, and just downlad them from debian mirrors, for that see [2].
Use your partition editor of choice to:
- free 4 GB at the end of your hdd (move and/or shrink partitions if necessary)
- create a 4GB ext4 partition at the end of your hdd
- mount it at
/mnt/install-media
The path /mnt/install-media would be assumed though all this document.
OBS: if you have a separated home partition and are going to keep it untouched during installation, you theoretically can use a path there.
Choose your iso image from debian download page at https://www.debian.org/distrib/. We will use the current latest live kde iso (at the time this document is being written) as an example.
cd /mnt/install-media
wget https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-12.9.0-amd64-kde.isocd /mnt/install-media
sudo mkdir /mnt/iso
sudo mount -o loop debian-live-12.9.0-amd64-kde.iso /mnt/iso
sudo cp /mnt/iso/live/initrd.img /mnt/iso/live/vmlinuz .
sudo umount /mnt/iso
sudo rm -rf /mnt/isoOBS: some isos have initrd-[version].img and vmlinuz-[version]
files instead, or both.
You /etc/grub.d/40_custom should look like this:
❯ cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "debian-live.iso" {
insmod ext2
set root='(hd0,4)'
set iso="/debian-live-12.9.0-amd64-kde.iso"
linux /vmlinuz findiso=$iso boot=live components quiet splash
initrd /initrd.img
}Make sure you have the following correct:
set root='(hd0,X)': whereXis your partition number starting on 1. For our default configuration, it is: 1=boot, 2=root, 3=home, 4=install/recoveryset iso="ISO": whereXis path to downloaded isolinux VMLINUZ ...: whereVMLINUZis path to vmlinuz file cp from isoinitrd INIT: whereINITis path to initrd.img file cp from iso
sudo update-grubsudo rebootAfter rebooting, select grub menu entry: 'debian-live.iso'