Subject: [alpine-user] Makig a custom ISO image

From: Matija Papec <[email-masked]>
Date: Wed, 14 Sep 2016 09:26:44 +0200

http://stackoverflow.com/questions/39484723/alpine-linux-makig-a-custom-iso-image

Tnx in advance

---

From: Natanael Copa <[email-masked]>
Date: Wed, 14 Sep 2016 12:00:18 +0200

On Wed, 14 Sep 2016 09:26:44 +0200

> http://stackoverflow.com/questions/39484723/alpine-linux-makig-a-custom-iso-image

In case someone would like to answer on the mailing list, the question is:

Tried to build rescue iso by following

https://wiki.alpinelinux.org/wiki/How_to_make_a_custom_ISO_image

(used alpine-extended-3.4.3-x86.iso installed onto hdd before that)

When booting newly created image, it complains immediately after boot prompt. What should I do to create proper ISO image?

<screenshot with error message: "/sbin/init not found in new root. Launching emergency recovery shell">

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 14 Sep 2016 12:02:50 +0200

On Wed, 14 Sep 2016 12:00:18 +0200

> <screenshot with error message: "/sbin/init not found in new root. Launching emergency recovery shell">

At the boot prompt, could you please try enter: grsec noquiet

I suspect that apk fails to install the needed packages to the /sysroot for some reason.

-nc

---

---

From: Matija Papec <[email-masked]>
Date: Wed, 14 Sep 2016 12:33:37 +0200

Hello
​
Natanael,

it shows some progress, but ends with same error message,

https://snag.gy/r3F7wP.jpg

On Wed, Sep 14, 2016 at 12:02 PM,
​​
Natanael Copa <[email-masked]> wrote:

> > When booting newly created image, it complains immediately after boot
> prompt. What should I do to create proper ISO image?
> >

---

From: Natanael Copa <[email-masked]>
Date: Thu, 15 Sep 2016 12:53:52 +0200

On Wed, 14 Sep 2016 12:33:37 +0200
Matija Papec <[email-masked]> wrote:

> *

The warning message says that the apk index is untrusted. This means that the pubkey is missing in the initramfs.

You need to copy the key (~/.abuild/*.pub) to /etc/apk/keys/ and rebuild the iso.

> **

---

---

From: Matija Papec <[email-masked]>
Date: Thu, 15 Sep 2016 15:18:15 +0200

> You need to copy the key (~/.abuild/*.pub) to /etc/apk/keys/ and rebuild

​Tnx, I've copied *pub​ files and ran #make PROFILE=alpine-rescue iso

but resulting iso complains in the same way.

​localhost:~/alpine-iso# ls -la ~/.abuild/
total 32
drwxr-xr-x    2 root     root          4096 Sep 14 09:01 .
drwx------    4 root     root          4096 Sep 14 08:56 ..
-rw-rw----    1 root     root          1679 Sep 14 08:09 root-57d8e98f.rsa
-rw-r--r--    1 root     root           451 Sep 14 08:09
root-57d8e98f.rsa.pub
-rw-rw----    1 root     root          1679 Sep 14 08:17 root-57d8eb88.rsa
-rw-r--r--    1 root     root           451 Sep 14 08:17
root-57d8eb88.rsa.pub
-rw-rw----    1 root     root          1675 Sep 14 09:01 root-57d8f5b7.rsa
-rw-r--r--    1 root     root           451 Sep 14 09:01
root-57d8f5b7.rsa.pub
localhost:~/alpine-iso# ls -la /etc/apk/keys/
total 40
drwxr-xr-x    2 root     root          4096 Sep 15 15:07 .
drwxr-xr-x    4 root     root          4096 Sep 14 08:16 ..
-rw-r--r--    1 root     root           451 Sep 14 07:43
[email-masked]
-rw-r--r--    1 root     root           451 Sep 14 07:43
[email-masked]
-rw-r--r--    1 root     root           451 Sep 14 07:43
[email-masked]
-rw-r--r--    1 root     root           451 Sep 14 07:43
[email-masked]
-rw-r--r--    1 root     root           451 Sep 14 07:43
[email-masked]
-rw-r--r--    1 root     root           451 Sep 15 15:07
root-57d8e98f.rsa.pub
-rw-r--r--    1 root     root           451 Sep 15 15:07
root-57d8eb88.rsa.pub
-rw-r--r--    1 root     root           451 Sep 15 15:07
root-57d8f5b7.rsa.pub
​