sudo apt update -y && apt upgrade sudo apt install dkms linux-headers-$(uname -r) build-essential
Then:
cd /media/cdrom0/; /bin/sh VBo*run
To set up ISO files as a local repository:
1)Download the files somewhere. I use /.iso:
random@flustered:~$ ls -l /.iso
total 12833380
dr-xr-xr-x 1 root root 4096 Oct 6 20:57 1
dr-xr-xr-x 1 root root 2048 Oct 6 21:13 2
dr-xr-xr-x 1 root root 2048 Oct 6 21:15 3
-rwxr-xr-x 1 random random 3838230528 Oct 7 09:23 debian-testing-amd64-DVD-1.iso
-rwxr-xr-x 1 random random 4619786240 Oct 7 09:25 debian-testing-amd64-DVD-2.iso
-rwxr-xr-x 1 random random 4683341824 Oct 7 09:27 debian-testing-amd64-DVD-3.iso
random@flustered:~$
2) create mountpoints (mkdir /.iso{1,2,3}).
3) add the mountpoints to /etc/fstab:
random@flustered:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
# / was on /dev/sda1 during installation
UUID=4c / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=28 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/.iso/debian-testing-amd64-DVD-1.iso /.iso/1 iso9660 ro,loop,auto 0 0
/.iso/debian-testing-amd64-DVD-2.iso /.iso/2 iso9660 ro,loop,auto 0 0
/.iso/debian-testing-amd64-DVD-3.iso /.iso/3 iso9660 ro,loop,auto 0 0
random@flustered:~$
4) make the proper changes to /etc/apt/sources.list:
deb [trusted=yes] file:/.iso/1 bullseye contrib main
deb [trusted=yes] file:/.iso/2 bullseye contrib main
deb [trusted=yes] file:/.iso/3 bullseye contrib main
...it's important to put "[trusted=yes]", or apt won't process them.
5)apt update to use the new sources
...and you're good to go.