LinuxForum.Fans
Тема

Oracle VirtualBox, Guest Additions & Debian10.

Автор: user160 11 сообщений 1702 просмотров
18.07.2019 10:12 #432376

Доброго времени суток уважаемые.

Проблема: не устанавливается Gues Additions в Debian10.
Последовательность действий такова.

  • Скачал и установил Guest Additions для VirtualBox (успешно)
  • Скачал ISO-образы нового Debian (успешно)
  • Установил новый Debian в VirtualBox (успешно)
  • Запустил в виртуальной машине новый Debian (успешно)
  • Подключил образ Guest Additions к виртуальной машине(успешно)
  • В файловом менджере Debian-а в разделе /media/cdrom виден набор файлов для разных "осей", в частности для винды *.exe и для Линукса *.sh

Автозапуска линуксовых скриптов не произошёл, видимо из-за настроек этого дистрибутива, посему я в терминале от Рута запустил вручную команду:

Показать
[console]/media/cdrom0 #sh autorun.sh[/console]

Скрипт запустился. Что-то там разархивировал, выполнил.... но не всё.
В итоге соощил, что нет заголовков для данного ядра 4.19.0-5amd64.

Показать
[console]
Virtual Guest Additions: Kernel headers not found for target kernel 4.19.0-5amd64. Please install them and execute /sbin/rcvboxadd setup
Virtual Guest Additions: Running kernel modules will not be replaced until the system is restarted
Press Return to close window..
[/console]

Вопросы в том:
1. где взять эти заголовки,
2. куда положить,
3. как заврешить процесс установки Guest Additions

?

ЗЫ в гугле есть инструкции для других дистрибутивов но очень старые.
Использую версию Virtual Box 6.0.8, т.е. последнюю и соотвественно к ней и скачивал Guest Additions

18.07.2019 10:27 #432377

Смею предположить что ответ на все Ваши вопросы (всё делать от root'а):
[console]
apt-get update
apt-get install linux-headers
[/console]

18.07.2019 10:55 #432378

Видимо apt-get update не релевантно для .iso образов

Показать
[console]root@vdb10:/home/user# apt-get update
Ign:1 cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-1 20190706-10:24] buster InRelease
Ign:2 cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-2 20190706-10:24] buster InRelease
Ign:3 cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-3 20190706-10:24] buster InRelease
Err:4 cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-1 20190706-10:24] buster Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err:5 cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-2 20190706-10:24] buster Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err:6 cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-3 20190706-10:24] buster Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Get:7 http://security.debian.org/debian-security buster/updates InRelease [39.1 kB]
Get:8 http://security.debian.org/debian-security buster/updates/main Sources [12.7 kB]
Get:9 http://security.debian.org/debian-security buster/updates/main amd64 Packages [42.5 kB]
Get:10 http://security.debian.org/debian-security buster/updates/main Translation-en [20.0 kB]
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-1 20190706-10:24] buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-2 20190706-10:24] buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'cdrom://[Debian GNU/Linux 10.0.0 _Buster_ - Official amd64 DVD Binary-3 20190706-10:24] buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

root@vdb10:/home/user# apt-get install linux-headers
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-headers is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'linux-headers' has no installation candidate
root@vdb10:/home/str#

[/console]
18.07.2019 11:30 #432379

user160, проблема практически та же, что и в соседней теме, где Вы не пожелали разобраться с причинами. Не совсем верный/полный набор репозиториев. Плюс отключите такой источник как CD-ROM.
Смотри́те файл /etc/apt/sources.list, думайте и разбирайтесь, иначе подобные вопросы будут повторяться с завидной регулярностью. Направление поиска я дал, дальше думайте немного сами.

18.07.2019 17:22 #432381

Для Debian и Ubuntu заголовки ядра устанавливаются примерно так:
[console]sudo apt-get install linux-headers-$(uname -r)
sudo apt-get update && sudo apt-get upgrade[/console]

19.07.2019 09:35 #432386
mozgfx написал:
Для Debian и Ubuntu заголовки ядра устанавливаются примерно так:
[console]sudo apt-get install linux-headers-$(uname -r)
sudo apt-get update && sudo apt-get upgrade[/console]

Спасибо! такая команда сработала *DRINK*

19.07.2019 10:19 #432387

Логично так как заголовки ядра необходимо устанавливать для того ядра, которое в текущий момент установлено.
Apt-Get - не знает какое ядро у Вас установлено поэтому просто linux-headers у Вас и не устанавливался.
Конечно можно было бы в конце поставить звездочку, но в этом случае установились бы все версии пакетов и их зависимостей.
Но лучше установить только ту Версию которая нам нужна.

19.07.2019 10:57 #432388

После загрузки заголовков и повторной попытки установки долполнений VirtualBox потребовал установки GCC, CMAKE и PERL. Не быстрая эта задача получается....
Подозреваю произойдёт перекомпиляция Ядра?
Что-то страшновато....

19.07.2019 11:23 #432389
"user160" написал:
Подозреваю произойдёт перекомпиляция Ядра?

Не ядра, а модуля под Ваше ядро.

19.07.2019 22:39 · отредактировано #432390

Еще один вариант установки необходимых пакетов.

Установка пакетов необходимых для создания модулей ядра
[console]apt-get install build-essential module-assistant[/console]
Подготовка системы для создания модулей ядра:
[console]m-a prepare[/console]
Ну а дальше смонтировать образ VBoxGuestAdditions iso и произвести установку

21.07.2019 22:18 #432392

Спасибо всем участникам, всё успешно сделано.
Ключевой момент этот.

"mozgfx" написал:
sudo apt-get install linux-headers-$(uname -r)

После этой команды запустил скрипт и "ларчик открылся"
Затем смонтировал шару на папку, выдал права юзеру на эту папку и задача была решена.

Войдите или зарегистрируйтесь, чтобы ответить.