Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id EFC43781B7C for <~alpine/users@lists.alpinelinux.org>; Thu, 2 Apr 2020 18:25:54 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id a25so5476087wrd.0 for <~alpine/users@lists.alpinelinux.org>; Thu, 02 Apr 2020 11:25:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mczaAIvTQ86qY4ucrhwFTUu7Pji8dU4zyG+sGnsqn1U=; b=f4BU6gJVNoae7FJRyOjhUeUYP4pOwqeDEgtBbTqJ+aXoIXPkKqY9+pB/7QUZZqyhIH qW7mPBIn0MJAIkNC9sBHRDteqO/n7235DxkS9d5aWOOKNLKUmGMAMCmar0aJtfcuukHO x+i2Wq3Ck+PlklXiDhO4LPFoFDhFFOgnUScrDiiF+b0PZtMBlV9zBAVs2LfBmu7SKFjW qGgS6YbNE8qjVOFe27HneljN+M0wQUNozgx6VPcpcMVd8AWVrBWGT49Yx6agAtN+YYJZ qu3HMw7EGO4QQBe7jpUWNEiua5VqrnjoLCUtviOg3YznSomgScjhG7EWojjnDOd6BPoV eXcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mczaAIvTQ86qY4ucrhwFTUu7Pji8dU4zyG+sGnsqn1U=; b=nxN2dG/VJRolRbPu2N0mZcnEA7/AytyPFalzrYk81G24mO0JfrB41TIvWbjrTNy0x5 QmUiVceAyi4/6u1PzZ4h7Euc81oYuhFbS24VI0ia6OhFAhWvReAqOCwQ+8aLvfOoVZKT kqpLJyDrig6dlJDmsAG78D1Cq08P51f5qdshRjFV1hUwOMwuUvyBZqimw4CtMXr6Dmzd OjtNIgOhbvrkIf4ezxu8ZclUt2G8oxCMnGzZW/hBsM223cazSlz/2+eT6LYbhXv96Wdp 8ch1yyoV24RORIyimq4GnGmWM9gxMS+76ys1he1IeLgXyjA48t/ZsN/dAfl+h93SagmZ Di2Q== X-Gm-Message-State: AGi0PubRmBeb3jwlvdWP+IfhATAyBZaMVpw/1ZpU1KgXJswQGTutmwt2 /2pofJs+D5kbGmAgMQyk3Hab8HQD X-Google-Smtp-Source: APiQypIrQDcwPt4een/rNHq9+aiSIRQpcxoB5JDfjO80SRuXuP6f5E41mGANbmQgHiUiU6umuBWMPg== X-Received: by 2002:adf:904a:: with SMTP id h68mr4387976wrh.291.1585851953503; Thu, 02 Apr 2020 11:25:53 -0700 (PDT) Received: from homepc.locald00dz (aftr-88-152-185-216.unity-media.net. [88.152.185.216]) by smtp.gmail.com with ESMTPSA id p5sm8753425wrg.49.2020.04.02.11.25.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Apr 2020 11:25:52 -0700 (PDT) Date: Thu, 2 Apr 2020 20:25:51 +0200 From: Daniel Kulesz To: ~alpine/users@lists.alpinelinux.org Cc: sevan@cri.epita.fr Subject: Re: [INSTALL][CHROOT] Ethernet module/driver is not loaded after install from chroot Message-Id: <20200402202551.aecaf5a816fc4188974c85b1@googlemail.com> In-Reply-To: References: X-Mailer: Daniel's homebrew MUA 0.0.1-early-pre-alpha Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi Sevan, I recommend the following approach (assuming you are using a x86 or amd64 server) that worked for me in a similar setting: - install alpine on another machine (or in a VM) using the "sys" variant - boot some live system - mount the previously installed alpine and create a tar archive of the whole installation (be careful to include /boot as well which might be on a separate partition) - transfer the tar archive to your target machine - unpack the tar archive - chroot into the installation - install the bootloader Cheers, Daniel On Thu, 2 Apr 2020 18:31:28 +0200 Sevan Murriguian-Watrin wrote: > 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