Received: from mail-2.srv.cri.epita.fr (gate-2.cri.epita.net [163.5.55.20]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id C3D70782B59 for <~alpine/users@lists.alpinelinux.org>; Thu, 2 Apr 2020 16:31:31 +0000 (UTC) Received: from [192.168.1.34] (lfbn-idf1-1-2018-109.w90-127.abo.wanadoo.fr [90.127.186.109]) (Authenticated sender: sevan) by mail-2.srv.cri.epita.fr (Postfix) with ESMTPSA id 087C841713 for <~alpine/users@lists.alpinelinux.org>; Thu, 2 Apr 2020 18:31:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cri.epita.fr; s=cri; t=1585845089; bh=cNrNRxFyDUvsKEePQn+CUTavzxEbZutd8Uld6zgjAXE=; h=To:From:Subject:Date:From; b=Lme71dYdxKHYRy2M0uV3jsLuS9qTI57qxejcNzovb24iNkUVFhXssuTAhXogkknFm WLzf+UtnbJIhSvP1XeYfU8wAOJ+QN4C6nr5+VrROlXLUHCtqWkBKjNRvIdbaDm+r/5 MwG3riN+JdfvjIpDFqT/qzdhJ1cWhq1ilNVe/0R4= To: ~alpine/users@lists.alpinelinux.org From: Sevan Murriguian-Watrin Subject: [INSTALL][CHROOT] Ethernet module/driver is not loaded after install from chroot Message-ID: Date: Thu, 2 Apr 2020 18:31:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hello everyone, I want to install Alpine Linux on a dedicated server but I have no access to the server via anything else than SSH. This access is given to me on a rescue live session on an Ubuntu. So I tried and more or less succeeded to install Alpine via a chroot env. Here is the list of thing I did for context. # Prepare chroot - boot on Ubuntu using PXE (on the provider interface) - mkdir /alpine - mount -t tmpfs -o size=2G tmpfs /alpine/ - apt install git - git clone https://github.com/alpinelinux/alpine-chroot-install.git - cd alpine-chroot-install/ - ./alpine-chroot-install # Enter Chroot - /alpine/enter-chroot - apk add vim - vim /sbin/setup-alpine +211 - add `-k lts` to `DEFAULT_DISK=none $PREFIX/sbin/setup-disk -q ${DISKOPTS} || exit` (I have to do this because the kernel on Ubuntu is labelled `linux...-generic`.) - vim /sbin/setup-disk +441 - remove the if to always enable nomodset (I have to do this because Ubuntu is not boot with `nomodset` in his boot cmdline.) # Install Alpine on the disk - setup-alpine - Follow instructions (https://wiki.alpinelinux.org/wiki/Install_to_disk) - Select your drive (sda for the rest of the procedure) - Use mode sys # Ensure access to the Alpine Install after reboot - mount /dev/sda3 /mnt - mount /dev/sda1 /mnt/boot - chroot /mnt - vim /etc/ssh/sshd_config to allow access on the server - rc-update add sshd (to enable sshd at boot) - vim /etc/network/interfaces - change the interface name by eth0 which is the default on Alpine whereas it's something like `enp0s3` on Ubuntu - quit the chroot env - reboot The problem is that after the reboot, I only have the loopback interface, no ethernet interface is detected/available which mean no access using SSH. The kernel module is not loaded. I've replicated this issue on a VirtualBox VM. The quick fix is to install `lshw` on the Ubuntu live session, execute `lshw -C network` and look for the Ethernet driver, than manually add it in a file like `/etc/modules` on the newly installed Alpine so it's loaded at boot. I wonder what I could do to get the same behavior as if I had booted on a Alpine LiveCD instead of a chroot env? I've done it on an other server and the system booted without any issues. Is this install method even possible? I mean, can I use the chroot script to perform a full install ? Will I encounter other issues in the future ? PS: I've tried to manually trigger a `mkinitfs` after the reboot to force the generation of the initramfs but it didn't change anything. -- Sevan