sormy / gentoo-vbox-builder

Gentoo VirtualBox Image Builder / Gentoo VBox Builder
MIT License
24 stars 9 forks source link

Don't work ./gentoo-vbox-builder.sh #2

Closed Gremlingroj closed 4 years ago

Gremlingroj commented 4 years ago

Please help me. There is a log:

livecd /home/gentoo-vbox-builder-master # ./gentoo-vbox-builder.sh cat: /root/.ssh/id_rsa.pub: No such file or directory

sormy commented 4 years ago

I will take a look. Gentoo devs sometimes release breaking changes :-)

sormy commented 4 years ago

Looking on logs:

sormy commented 4 years ago

Tried today. Found an issue with GPG_SERVER override. Fixed it. The fix is pushed. By the way, script has successfully finished on macOS v10.14.6 and VirualBox 6.0.14 r133895. VBoxManage is installed in /usr/local/bin/VBoxManage and PATH is set to include /usr/local/bin.

Artems-MacBook-Pro:gentoo-vbox-builder $ GPG_SERVER="ipv4.pool.sks-keyservers.net" ./gentoo-vbox-builder.sh 
 * Gentoo VirtualBox Image Builder 1.0.6
 * The following parameters will be used:
 *   Guest Name: Gentoo amd64
 *   Host SSH Port: 2222
 *   Gentoo Stage3: amd64 (ARCH: amd64)
 * Started at Wed May 13 23:10:05 EDT 2020
 * PHASE 1: Prepare Instance...
 *   Checking if host SSH port is available...
 *   Downloading Gentoo LiveCD...
 *     Downloading: http://distfiles.gentoo.org/releases/amd64/autobuilds/20200419T214502Z/install-amd64-minimal-20200419T214502Z.iso ...
 *     Verifying sha512 hash...
 *     Verifying whirlpool hash...
 *     Verifying GPG signature...
 *   Creating guest...
 *   Configuring guest...
 *   Adding storage controller to guest...
 *   Attaching DVD drive to guest...
 *   Creating disk for guest...
 *   Attaching disk to guest...
 *   Running guest...
 *   Booting Gentoo from LiveCD...
 *   Configuring SSH...
 *   Waiting until SSH will be up (1/5)...
ssh_exchange_identification: Connection closed by remote host
 *   Waiting until SSH will be up (2/5)...
 * PHASE 2: Prepare Root...
 *   Synchronizing time...
 *   Preparing disk...
 *     Creating partitions...
 *     Formatting partitions...
 *     Labeling partitions...
 *   Mounting disk...
 *   Setting work directory...
 *   Installing stage3...
 *     Downloading: http://distfiles.gentoo.org/releases/amd64/autobuilds/20200422T214502Z/stage3-amd64-20200422T214502Z.tar.xz ...
 *     Verifying sha512 hash...
 *     Verifying whirlpool hash...
 *     Verifying GPG signature...
 *     Extracting...
 *     Cleaning up...
 *   Installing LiveCD's kernel configuration...
 *   Copying network options...
 *   Configuring fstab...
 *   Mounting proc/sys/dev/pts...
 * PHASE 3: Build Root...
 *   Updating configuration...
 *   Tuning compiler options...
 *   Installing portage repo...
 *   Rebuilding the world...
 *   Installing kernel sources...
 *   Installing genkernel...
 *   Installing kernel...
 *   Installing bootloader...
 *   Installing acpid...
 *   Configuring network...
 *   Configuring SSH...
 *   Installing authorized SSH public key...
 *   Rebooting...
 *   Waiting until SSH will be up (1/5)...
 *   Shutting down...
 *   Removing LiveCD from DVD drive...
 * Done at Thu May 14 01:20:36 EDT 2020
 * Process took 130 minutes
Gremlingroj commented 4 years ago

Thanks for such a quick reply.

I start the virtual machine from the image c0de3cd004636722448e7b7c116feed9 * install-amd64-minimal-20200419T214502Z.iso in livecd mode, type gentoo, set the passwd password, start the ssh server and connect through the putty. I don’t do anything else, because there is nothing in the instructions or I read poorly.

VBoxManage is most likely not installed, since again it is not clear how. Emerge in Livecd mode is not available. For some reason, connecting the add-on disk of the guest operating system fails.

There were no such problems with other *nix systems, but here I cannot install the third day even with a simple script. Please help as you can.

sormy commented 4 years ago

The script from this repo should be execute on host, NOT on guest.

Gremlingroj commented 4 years ago

So I can’t just put Gentoo on VirtualBox in Windows environment? If I can, then please tell me how?

sormy commented 4 years ago

You can :-) But this script uses bash and a bunch of tools. If you will install all of them in windows then it will work. There is simplified gist that is designed to be executed inside guest: https://gist.github.com/sormy/7221a65a3becf082aaa3af2ec8dee1bc. You also reported an issue with it. I will need to take a look what has changed and fix it.

Gremlingroj commented 4 years ago

I used it https://gist.githubusercontent.com/sormy/7221a65a3becf082aaa3af2ec8dee1bc/raw/7b207c32d3ea90e683a7d9b53b1723059160dc93/gentoo-installer.sh, everything was fine, but the bootloader did not install and the system did not boot.

Gremlingroj commented 4 years ago

Tomorrow I can continue. Thanks for the help.

sormy commented 4 years ago

I fixed the script in https://www.artembutusov.com/gentoo-linux-quick-installer-script/ So closing the issue ;-)