Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

pxe boot debian testing netinst iso

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
spider
Posts: 10
Joined: 2022-08-31 13:30
Has thanked: 1 time

pxe boot debian testing netinst iso

#1 Post by spider »

Hi,

I've been trying to install bookworm with the debian-testing-amd64-netinst.iso using PXE boot, so far unsuccessfully.

The first question is, is it possible to do this?
And if yes, how?

We have been installing systems using PXE boot since Debian stretch, using the netboot images. There is a netboot image for bookwork, but this complains about module mismatch from the online repository. We could extract the netboot part from the ISO image and tell the installer where the installation media is.

The next question is how can the PXE boot installation be told where the installation media is?

Of course, all suggestions are welcome

Thanks

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: pxe boot debian testing netinst iso

#2 Post by Head_on_a_Stick »

spider wrote: 2022-08-31 13:56 is it possible to do this?
Sometimes.
deadbang

compis3
Posts: 141
Joined: 2022-08-28 20:57
Has thanked: 2 times

Re: pxe boot debian testing netinst iso

#3 Post by compis3 »

The question is a very good one since it appears there is no official way to get the complete install on DVD which does not require Internet installation.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: pxe boot debian testing netinst iso

#4 Post by sunrat »

compis3 wrote: 2022-09-03 01:24 The question is a very good one since it appears there is no official way to get the complete install on DVD which does not require Internet installation.
Yes there is, the standard installer, or the non-free with firmware I linked you to in that other topic you started. - viewtopic.php?f=10&t=152725 Your comment is off-topic in this thread anyway. :?
From the front page Download link at debian.org :
Other installers and images, such as live systems, offline installers for systems without a network connection, installers for other CPU architectures, or cloud instances, can be found at Getting Debian.
BTW, the testing installer is to test the installer. It's not guaranteed to work.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

compis3
Posts: 141
Joined: 2022-08-28 20:57
Has thanked: 2 times

Re: pxe boot debian testing netinst iso

#5 Post by compis3 »

Does Debian provide a complete free download for installation that does not require the use of the network for the install?

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: pxe boot debian testing netinst iso

#6 Post by sunrat »

compis3 wrote: 2022-09-03 11:27 Does Debian provide a complete free download for installation that does not require the use of the network for the install?
Seriously? I just linked to the place you can download it in my last post. :|

And stop invading other peoples' topics.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

SergMx
Posts: 8
Joined: 2022-09-02 17:59

Re: pxe boot debian testing netinst iso

#7 Post by SergMx »

spider wrote: 2022-08-31 13:56 ...
The next question is how can the PXE boot installation be told where the installation media is?
...
Use preseed file:
...
d-i mirror/http/hostname string local.server
d-i mirror/http/directory string /directory

spider
Posts: 10
Joined: 2022-08-31 13:30
Has thanked: 1 time

Re: pxe boot debian testing netinst iso

#8 Post by spider »

Use preseed file:
...
d-i mirror/http/hostname string local.server
d-i mirror/http/directory string /directory
Thanks for the suggestion. Does this work with a netinstall ISO?

I am trying PXE booting from a netinstall image or a netboot image. I prefer the netboot image as it is easier to use.

A typical menu entry is:

Code: Select all

    menuentry '... Bookworm Workstation install (preseed_uefi_workstation.cfg)' {
        echo Bookworm Workstation install...
        linux    /debian/bookworm/amd64/vmlinuz vga=791 nouveau.modeset=0 --- language=en locale=en_US.UTF-8 keymap=us interface=eth0 net.ifnames=0 biosdevname=0 \
           domain=example.net auto preseed/url=tftp://10.99.0.101/debian/bookworm/amd64/preseed_uefi_workstation.cfg --- quiet
        initrd   /debian/bookworm/amd64/initrd.gz
    }
Booting the above block results in "No kernel modules found"

I also tried the di-netboot-assistant with

Code: Select all

di-netboot-assistant install stable
di-netboot-assistant install testing --arch=amd64
This also resulted in "No kernel modules found"

Checking the Ctrl-Alt-F4 console window, then the error is not surprising as it says:

Code: Select all

anna ... URL:http://ftp.ch.debian.org/debian/dists/bullseye/main/debian-installer/binary-amd64/Packages.xz...
I wonder why the bookworm netboot is calling for bullseye packages.

Jimmy-Z/grub-iso-boot is for booting from a USD stick, but has some interesting information.

As a slight aside, a few grub2-efi-x64-modules cause grub_calloc not found messages, specifically search and lvm.

To conclude, some progress has been made and if anyone has some tips, then I would be glad to hear them.

Thanks,

SergMx
Posts: 8
Joined: 2022-09-02 17:59

Re: pxe boot debian testing netinst iso

#9 Post by SergMx »

This works if the local mirror is made from the same iso as the load.
When you load from iso, all files are inside it. If you take the initrd and kernel from iso and point the answer file to this mounted iso it should do the same.

I really have a different problem. If I specify an official mirror then I can put a virtio on the disk.
When I specify my mirror the installer does not load the virtio drivers and I can not understand why.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: pxe boot debian testing netinst iso

#10 Post by sunrat »

@SergMx If you have a different problem, please start your own thread about it. When others hijack an OP's thread it can get really confusing.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

spider
Posts: 10
Joined: 2022-08-31 13:30
Has thanked: 1 time

Re: pxe boot debian testing netinst iso

#11 Post by spider »

SergMx wrote: 2022-09-04 20:36 Use preseed file:
...
d-i mirror/http/hostname string local.server
d-i mirror/http/directory string /directory
I can't see how this will work as the directory needs to be a bookworm repository and the netinst iso is not in this format.
In fact, we do this and have the lines like this in preceed files.

Code: Select all

d-i mirror/http/hostname string debmirror.example.net
d-i mirror/http/directory string /debian
I also tried setting up booting a live image using Configuring GRUB for Debian Live instructions.

Code: Select all

menuentry "Debian GNU/Linux Live 5.10.0-16-amd64" {
  set iso_path=/debian-live-11.4.0-amd64-standard.iso
  export iso_path
  loopback loop $iso_path
  set root=(loop)
  set loopback="findiso=${iso_path}"
  export loopback
  linux  /live/vmlinuz-5.10.0-16-amd64 boot=live components \
    persistence persistence-path=/boot \
    splash quiet "${loopback}"
  initrd /live/initrd.img-5.10.0-16-amd64
}
When selecting this menu entry, the machine boots and fails with "unable to find a medium containing a live file system". Again it cannot find the CD image. I cannot find any official information about the findiso= argument.

What I'm looking for is the argument to the linux command line that says where this installation media is located. Hope someone can help with this.

SergMx
Posts: 8
Joined: 2022-09-02 17:59

Re: pxe boot debian testing netinst iso

#12 Post by SergMx »

I tried a live PXE disk and it works.

Code: Select all

LABEL debian11live
  kernel debian11/vmlinuz-5.10.0-18-amd64
  append initrd=debian11/initrd.img-5.10.0-18-amd64 dhcp boot=live fetch=http://192.168.0.1/live/filesystem.squashfs
 

compis3
Posts: 141
Joined: 2022-08-28 20:57
Has thanked: 2 times

Re: pxe boot debian testing netinst iso

#13 Post by compis3 »

Well there is confusion as spider says he does not see how it could work but sergmx says it works.

I think I know why it doesn't work. The file is incorrect or purposely being corrupted as it download via the install through the network. I no longer am trying the netinstall as Linux is a small file size and everything should be contained on the media and not installed over the Internet.

spider
Posts: 10
Joined: 2022-08-31 13:30
Has thanked: 1 time

Re: pxe boot debian testing netinst iso

#14 Post by spider »

SergMx wrote: 2022-09-13 11:59 I tried a live PXE disk and it works.

Code: Select all

LABEL debian11live
  kernel debian11/vmlinuz-5.10.0-18-amd64
  append initrd=debian11/initrd.img-5.10.0-18-amd64 dhcp boot=live fetch=http://192.168.0.1/live/filesystem.squashfs
 
I will have to try it with UEFI (UEFI install use grub, so the syntax is slightly different)

Many thanks.

spider
Posts: 10
Joined: 2022-08-31 13:30
Has thanked: 1 time

Re: pxe boot debian testing netinst iso

#15 Post by spider »

I've found a solution for PXE booting and installing bookworm.

After trying and failing to use debian-testing-amd64-netinst.iso to install bookworm.
https://wiki.debian.org/DebianInstaller ... staller.3F confirms this.
I figured out that using the bullseye netboot allowed bookworm to be installed.

In our environment, we have a TFTP server and a web server for HTTP. The HTTP pages are symlinks to the TFTP files, like this:
/var/www/html/d-i/bookworm/preseed.cfg -> /srv/tftp/debian/bookworm/amd64/preseed.cfg

These were the steps I used, first was to use the mini.iso, this proved that loading ISO files worked.

Code: Select all

wget -q -N "http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/mini.iso" -O "mini.iso"
/srv/tftp/debian-installer/amd64/grub/grub.cfg

Code: Select all

menuentry 'Bookworm mini.iso' {
    echo Bookworm mini.iso installation
    set isoname="mini.iso"
    set isopath="/debian/bookworm/amd64"
    set isofile="${isopath}/${isoname}"
    loopback loop $isofile
    linux (loop)/linux auto=true priority=low vga=791 DEBCONF_DEBUG=5 --- language=en country=CH locale=en_US.UTF-8 keymap=us ipv6.disable=1 net.ifnames=0 biosdevname=0 domain=example.net netcfg/choose_interface=eth0 auto preseed/url=http://10.99.0.101/d-i/bookworm/preseed.cfg
    initrd (loop)/initrd.gz
    echo Starting install...
    #echo press Enter to continue...
    #read
}
The preseed.cfg file contained the line:
d-i mirror/suite select testing

Ctrl-Alt-F4 virtual terminal shows the preseed questions and then looking them up at https://preseed.debian.net/debian-prese ... n-full.txt supplies answers

Next netboot.tar.gz was used, using the bullseye netboot and the bookworm firmware.

Code: Select all

wget -q -N "http://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/netboot.tar.gz" -O "testing-netboot.tar.gz"
wget -q -N "http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/testing/current/firmware.cpio.gz" -O "testing-firmware.cpio.gz"
# extract linux and initrd.gz, rename initrd.gz to initrd.gz.orig
tar xf testing-netboot.tar.gz
mv initrd.gz initrd.gz.orig
# append the firmware to initrd.gz
cat initrd.gz.orig testing-firmware.cpio.gz > initrd.gz
/srv/tftp/debian-installer/amd64/grub/grub.cfg

Code: Select all

menuentry '... Bookworm Workstation install (preseed_uefi_workstation.cfg)' {
    echo Bookworm Workstation install...
    set root=(http,10.99.0.101)
    linux    /d-i/bookworm/linux vga=791 priority=critical nouveau.modeset=0 DEBCONF_DEBUG=5 --- language=en country=CH locale=en_US.UTF-8 keymap=us interface=eth0 ipv6.disable=1 net.ifnames=0 biosdevname=0 domain=example.net auto preseed/url=http://10.99.0.101/d-i/bookworm/preseed_uefi_workstation.cfg quiet netcfg/dhcp_ntp_servers="10.99.0.1"
    initrd   /d-i/bookworm/initrd.gz
}
Goal, no hostname prompt

One of my goals was to use the DHCP hostname and if it is not set then prompt for a hostname with the IP address as the default. IP addressed are not valid host names, replacing dots with dashes are valid.

By default, if the DHCP reservation is set then the hostname is used, if it is not set then the hostname is debian.

The priority=critical will not prompt for the hostname, but I wanted it to be prompted if it was not set in DHCP and ideally the IP address is shown so a DHCP reservation can be made. So, what was needed was to change the priority to high and set a hostname.

/var/www/html/d-i/bookworm/preseed_uefi_workstation.cfg contains:

Code: Select all

d-i preseed/include_command string if [ "$(hostname)" = debian ]; then echo debian.cfg; fi
/var/www/html/d-i/bookworm/debian.cfg contains:

Code: Select all

#d-i netcfg/hostname string 
d-i netcfg/hostname seen false

d-i netcfg/get_hostname string 
d-i netcfg/get_hostname seen false

d-i debconf/priority select high
d-i debconf/priority seen false

# We pass interface=eth0 net.ifnames=0 biosdevname=0 to the linux kernel, so eth0 is used by default.
# As preseed is running in busybox the command udhcpc is available. Not sure which is better.
#d-i preseed/early_command string debconf-set netcfg/hostname "$(ip address show dev eth0 | sed -n '/inet/p' | sed 's@^.*inet \([^/][^/]*\)/.*$@IP-\1@' | sed 's/\./-/g')"; kill-all-dhcp; netcfg
d-i preseed/early_command string debconf-set netcfg/hostname "$(udhcpc -fq 2>&1 | sed -n 's/udhcpc: lease of \(.*\) obtained, lease time.*/IP-\1/p' | sed 's/\./-/g')"; kill-all-dhcp; netcfg
Thanks for all your replies and help.
-spider

spider
Posts: 10
Joined: 2022-08-31 13:30
Has thanked: 1 time

Re: pxe boot debian testing netinst iso

#16 Post by spider »

SergMx wrote: 2022-09-13 11:59 I tried a live PXE disk and it works.

Code: Select all

LABEL debian11live
  kernel debian11/vmlinuz-5.10.0-18-amd64
  append initrd=debian11/initrd.img-5.10.0-18-amd64 dhcp boot=live fetch=http://192.168.0.1/live/filesystem.squashfs
 
Yes, you are right it works and works nicely, the grub equivalent for HTTP is

Code: Select all

# mount -o ro,loop /var/www/html/debian-live-11.5.0-amd64-standard+nonfree.iso /var/www/html/debian11/
menuentry 'Debian 11 Live' {
    set root=(http,10.99.0.101)
    linux /debian11/live/vmlinuz-5.10.0-18-amd64 dhcp boot=live fetch=http://10.99.0.101/debian11/live/filesystem.squashfs
    initrd /debian11/live/initrd.img-5.10.0-18-amd64
}

Post Reply