Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 35D682235C5 for <~alpine/users@lists.alpinelinux.org>; Mon, 29 May 2023 15:30:19 +0000 (UTC) Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4QVKGd2lbmzDqmD; Mon, 29 May 2023 15:30:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1685374217; bh=PHnYYqXD7e2azDrt+yw3Y1PPVVaMHiEfBF+AvWWJUoU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Lcfiy6HPsz/Pw1XplqcE85nkt09NvUJfhwiKnyOB8mYWp/5p+27KEu0v7G6Ok1z7N QfbQu2E7Z8z9t8qjo1xYICdb2IZQtHKhzQMn7De6Knn0S/BAnlm7cJ5/mq01GIB7Ou 2un0QEw4hmkIPB5Pf0R5HY2Rd14jx1LH6UjejdP8= X-Riseup-User-ID: AD8D5D4FA1A64E1D8D438EE1424E10190DE29FD5E63E8F51A4573A6C1C11B3C5 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4QVKGc3fJTzFpnY; Mon, 29 May 2023 15:30:16 +0000 (UTC) Message-ID: <37693b5c20497122826b09493617276e08ffd007.camel@riseup.net> Subject: Re: Install on single partition and without a bootloader From: Ralf Mardorf To: Konstantin Kulikov Cc: ~alpine/users@lists.alpinelinux.org Date: Mon, 29 May 2023 17:30:13 +0200 In-Reply-To: References: <3405c3d90ea2b8ab5c6849f1ee17c87338e86348.camel@riseup.net> <0eab7313f6d23bf05d4e73e7db8aad05ac1bf265.camel@riseup.net> <9fdb3d754556ebb18428904b6edc2b5ddf37d6fc.camel@riseup.net> <7950a075f5329960548a2c8706df8bf3bda254a8.camel@riseup.net> <83435b7879b0fd1bfbdb4d7f2737c5ad8aeead7d.camel@riseup.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi, the good news: - the chroot's $PATH issue is solved - creating initramfs works the bad news: - mounting on /sysroot still fails On Mon, 2023-05-29 at 08:25 +0300, Konstantin Kulikov wrote: > Maybe caused by mixing repos. Fix your /etc/apk/repositories and > /etc/apk/world and run apk upgrade -a The installer script enabled the repositories. I only choose the mirror. However, I run the script two times. The first time I confirmed erasing the disk with "no", after that I run it again and confirmed erasing the disk with "yes". Some items were cached or already written to a config, for other items I had to choose again, e.g. what mirror I want to use. =E2=80=A2 rocketmouse@archlinux ~=20 $ cat /mnt/m1.alpine/etc/apk/repositories #/media/dm-0/apks http://mirror.bahnhof.net/pub/alpinelinux/v3.18/main #http://mirror.bahnhof.net/pub/alpinelinux/v3.18/community #http://mirror.bahnhof.net/pub/alpinelinux/edge/main #http://mirror.bahnhof.net/pub/alpinelinux/edge/community I assume I can uncomment v3.18/community in addition to main, just mixing v3.18 and edge doesn't work. Is this correct? =E2=80=A2 rocketmouse@archlinux ~=20 $ cat /mnt/m1.alpine/etc/apk/world acct alpine-base busybox-mdev-openrc doas dosfstools e2fsprogs linux-firmware-i915 linux-firmware-other linux-firmware-rtl_nic linux-lts openssl =20 I don't know what to do with /etc/apk/world. I suspect it's ok as is. =E2=80=A2 root@archlinux /home/rocketmouse=20 # apk update --root /mnt/m1.alpine/ fetch http://mirror.bahnhof.net/pub/alpinelinux/v3.18/main/x86_64/APKIND= EX.tar.gz v3.18.0-435-g1a184caca7f [http://mirror.bahnhof.net/pub/alpinelinux/v3.1= 8/main] OK: 5187 distinct packages available =E2=80=A2 root@archlinux /home/rocketmouse=20 # apk upgrade -a --root /mnt/m1.alpine/ (1/48) Replacing acct (6.6.4-r2 -> 6.6.4-r2) (2/48) Replacing alpine-baselayout-data (3.4.3-r1 -> 3.4.3-r1) (3/48) Downgrading busybox (1.36.1-r0 -> 1.36.0-r9) Executing busybox-1.36.0-r9.post-upgrade (4/48) Downgrading [snip] (48/48) Downgrading openssl (3.1.0-r5 -> 3.1.0-r4) Executing busybox-1.36.0-r9.trigger Executing kmod-30-r3.trigger Executing mkinitfs-3.8.0-r1.trigger =3D=3D> initramfs: creating /boot/initramfs-lts OK: 452 MiB in 54 packages =E2=80=A2 root@archlinux /home/rocketmouse=20 # /bin/ls -hl /mnt/m1.alpine/boot/initramfs-lts=20 -rw------- 1 root root 17M May 29 15:17 /mnt/m1.alpine/boot/initramfs-lt= s A whole lotta downgrades and an initramfs rebuild :). >=20 > Use /bin/sh -l. > /etc/profile does not get sources unless you're running a login shell > so PATH from your host system gets inherited and alpine expects a > different one. Just for testing purpose, I rebuild initramfs in chroot. =E2=80=A2 root@archlinux /home/rocketmouse=20 # mount -t proc none /mnt/m1.alpine/proc/ =E2=80=A2 root@archlinux /home/rocketmouse=20 # mount -o bind /dev /mnt/m1.alpine/dev/ =E2=80=A2 root@archlinux /home/rocketmouse=20 # mount -o bind /sys /mnt/m1.alpine/sys/ =E2=80=A2 root@archlinux /home/rocketmouse=20 # mount -o bind /run /mnt/m1.alpine/run/ =E2=80=A2 root@archlinux /home/rocketmouse=20 # chroot /mnt/m1.alpine/ /bin/sh -l archlinux:/# mkinitfs -c /etc/mkinitfs/mkinitfs.conf -b / $(ls /lib/modu= les/) =3D=3D> initramfs: creating /boot/initramfs-lts archlinux:/# exit =E2=80=A2 root@archlinux /home/rocketmouse=20 # exit exit =E2=80=A2 rocketmouse@archlinux ~=20 $ /bin/ls -hl /mnt/m1.alpine/boot/initramfs-lts=20 -rw------- 1 root root 17M May 29 15:25 /mnt/m1.alpine/boot/initramfs-lt= s Booting Alpine still ends up with the initramfs emergency recovery shell, due to mount: mounting [snip] on /sysroot failed: No such file or directory Mounting root failed. Maybe I'm missing a typo in grub.cfg and/or fstab: =E2=80=A2 rocketmouse@archlinux ~=20 $ sudo parted -l | grep m2a 1 1049kB 4305MB 4304MB fat32 m2a_cpu1.esp boot= , esp 2 4305MB 964GB 959GB ext4 m2a_cpu1.archlinux 5 964GB 974GB 10.7GB ext4 m2a_cpu1.alpine 3 974GB 983GB 8705MB ext4 m2a_cpu1.xubu20.04 4 983GB 1000GB 17.2GB linux-swap(v1) m2a_cpu1.swap swap =E2=80=A2 rocketmouse@archlinux ~=20 $ sudo blkid /dev/nvme0n1p5 /dev/nvme0n1p5: LABEL=3D"m1.alpine" UUID=3D"56c09975-fb36-42e7-b959-a2b6= 4e6c9ebf" BLOCK_SIZE=3D"4096" TYPE=3D"ext4" PARTLABEL=3D"m2a_cpu1.alpine" P= ARTUUID=3D"a53abd3c-28a6-4e27-9c99-7a4f5f85546c" =E2=80=A2 rocketmouse@archlinux ~=20 $ cat /mnt/m1.alpine/etc/mkinitfs/mkinitfs.conf features=3D"ata base ext4 ide nvme scsi usb virtio" =E2=80=A2 rocketmouse@archlinux ~=20 $ cat /mnt/m1.alpine/etc/fstab UUID=3D56c09975-fb36-42e7-b959-a2b64e6c9ebf / ext4 rw,rela= time 0 1 UUID=3Dbc0419de-6a38-4907-bb46-d2e0398228f6 swap swap default= s 0 0 /dev/cdrom /media/cdrom iso9660 noauto,ro= 0 0 /dev/usbdisk /media/usb vfat noauto = 0 0 tmpfs /tmp tmpfs nosuid,no= dev 0 0 To boot Alpine 3 different grub entries were tested. This is one of the working grub entries for Arch: =E2=80=A2 rocketmouse@archlinux /boot/grub =E2=9C=97 =20 $ grep ux\ t grub.cfg -A4 menuentry " Arch Linux threadirqs" { search --no-floppy --set=3Droot --label m1.archlinux linux /boot/vmlinuz-linux root=3D/dev/disk/by-label/m1.archlinux= ro threadirqs ibt=3Doff ipv6.disable=3D1 initrd /boot/intel-ucode.img /boot/initramfs-linux.img } Those are the grub entries for Alpine that I tested: 1. =E2=80=A2 rocketmouse@archlinux /boot/grub =E2=9C=97 =20 $ grep Alpine grub.cfg -A4 menuentry " Alpine Linux" { search --no-floppy --set=3Droot --label m1.alpine linux /boot/vmlinuz-lts root=3D/dev/disk/by-label/m1.alpine ro initrd /boot/initramfs-lts } 2. =E2=80=A2 rocketmouse@archlinux /boot/grub =E2=9C=97 =20 $ grep Alpine grub.cfg-2023-05-27+29.2_alpine_uuid -A4 menuentry " Alpine Linux" { search --no-floppy --set=3Droot --fs-uuid 56c09975-fb36-42e7-b95= 9-a2b64e6c9ebf linux /boot/vmlinuz-lts root=3DUUID=3D56c09975-fb36-42e7-b959-a2= b64e6c9ebf ro initrd /boot/initramfs-lts } 3. $ grep Alpine grub.cfg-2023-05-29.1_alpine_set_behind_fs-uuid -A4 menuentry " Alpine Linux" { search --no-floppy --fs-uuid --set=3Droot 56c09975-fb36-42e7-b95= 9-a2b64e6c9ebf linux /boot/vmlinuz-lts root=3DUUID=3D56c09975-fb36-42e7-b959-a2= b64e6c9ebf ro initrd /boot/initramfs-lts } More info: =E2=80=A2 rocketmouse@archlinux /boot/grub =E2=9C=97 =20 $ /bin/ls -hAl /mnt/m1.alpine{,/boot/{,efi/}} /mnt/m1.alpine: total 80K drwxr-xr-x 2 root root 4.0K May 29 15:17 bin drwxr-xr-x 3 root root 4.0K May 29 15:25 boot drwxr-xr-x 2 root root 4.0K May 29 15:16 dev drwxr-xr-x 26 root root 4.0K May 29 15:16 etc drwxr-xr-x 3 root root 4.0K May 27 13:56 home drwxr-xr-x 10 root root 4.0K May 29 15:16 lib drwxr-xr-x 5 root root 4.0K May 27 13:56 media drwxr-xr-x 2 root root 4.0K May 27 13:56 mnt drwxr-xr-x 2 root root 4.0K May 27 13:56 opt drwxr-xr-x 2 root root 4.0K May 27 13:56 proc drwx------ 2 root root 4.0K May 28 11:32 root drwxr-xr-x 3 root root 4.0K May 29 15:16 run drwxr-xr-x 2 root root 12K May 29 15:16 sbin drwxr-xr-x 2 root root 4.0K May 27 13:56 srv drwxr-xr-x 2 root root 4.0K May 27 13:56 sys drwxrwxrwt 2 root root 4.0K May 29 15:25 tmp drwxr-xr-x 8 root root 4.0K May 27 13:56 usr drwxr-xr-x 11 root root 4.0K May 27 14:09 var =20 /mnt/m1.alpine/boot/: total 47M -rw-r--r-- 1 root root 3.5M May 26 08:53 System.map-lts lrwxrwxrwx 1 root root 1 May 27 13:57 boot -> . -rw------- 1 root root 17M May 28 11:40 broken_initramfs-lts -rw-r--r-- 1 root root 246K May 26 08:53 config-lts drwxr-xr-x 2 root root 4.0K May 27 13:56 efi -rw------- 1 root root 17M May 29 15:25 initramfs-lts -rw-r--r-- 1 root root 9.9M May 26 08:53 vmlinuz-lts =20 /mnt/m1.alpine/boot/efi/: total 0 =E2=80=A2 rocketmouse@archlinux /boot/grub =E2=9C=97 =20 $ hwinfo --cpu | grep Model | sort -u Model: 6.191.5 "13th Gen Intel(R) Core(TM) i3-13100" =E2=80=A2 rocketmouse@archlinux /boot/grub =E2=9C=97 =20 $ hwinfo --memory | grep Size Memory Size: 32 GB $ sudo dmidecode -t2|grep Man -A1; printf "$(sudo dmidecode -s bios-vers= ion) "; sudo dmidecode -s bios-release-date Manufacturer: Gigabyte Technology Co., Ltd. Product Name: B760M DS3H DDR4 F4a 04/14/2023 =E2=80=A2 rocketmouse@archlinux /boot/grub =E2=9C=97 =20 $ cat /mnt/m1.alpine/etc/os-release=20 NAME=3D"Alpine Linux" ID=3Dalpine VERSION_ID=3D3.18.0 PRETTY_NAME=3D"Alpine Linux v3.18" HOME_URL=3D"https://alpinelinux.org/" BUG_REPORT_URL=3D"https://gitlab.alpinelinux.org/alpine/aports/-/issues" The ISO was checked against the signed checksum. Regards, Ralf