Web lists-archives.com

Re: PXE netboot to load OS from /dev/sda1




	Hi.

On Thu, Oct 26, 2017 at 07:35:49PM +0200, John Naggets wrote:
> Hi,
> 
> I have installed Debian 9 onto an old laptop with an SSD disk.
> Unfortunately the BIOS does not support booting from that SSD disk so
> I would like to "abuse" of PXE in order to boot my installed Linux
> from /dev/sda1.
> 
> For that purpose I setup a PXE server on another machine on the same
> LAN using the netboot.tar.gz file from Debian 9 and slightly adapted
> the pxelinux.cfg/default file to add the following entry:
> 
> LABEL netboot
>         KERNEL debian-installer/amd64/linux
>         APPEND initrd=debian-installer/amd64/initrd.gz root=/dev/sda1
> 
> Unfortunately it still boots the Debian installer and somehow does not
> boot from /dev/sda1. I thought having "root=/dev/sda1" should make it
> boot from /dev/sda1 and hence skip the installer part. At least I
> think it used to work in the past.
> 
> Does anyone see what I am missing here?

You add "root" stanza as a parameter that should be interpreted by
initrd, not kernel. This should do what you're trying to accomplish:

LABEL netboot
         KERNEL debian-installer/amd64/linux
         APPEND initrd=debian-installer/amd64/initrd.gz -- root=/dev/sda1

If it fails consider copying vmlinuz and initrd.img from your /dev/sda1
to TFTP server, and use them instead of installer ones.

Reco