~alpine/users

2 2

An issue with a DIY rescue CD

Details
Message ID
<9d00eb29-f7c1-abce-d3ac-6bc85fad6c5a@riihineva.no-ip.org>
DKIM signature
missing
Download raw message
Hi,

I have made kind of a rescue CD. It basically works but I have at least 
one issue left: When I have a "diskless" installation in a HD and try to 
boot from CD, Alpine loads apkovl and modloop from the HD and things go 
south.

With the help from IRC I found the apkovl boot parameter which I can use 
to force the apkovl to be loaded from CD. But with modloop I have been 
not so lucky.

What I have learned this far (if I'm not too confused) is that 
initramfs/nlplug-findfs searches and mounts all drives. Then init script 
searches all mounts to find modloop and happens to find it from sda1 
which is not what I want.

Can I somehow restrict the search onto the boot media, the CD, or 
prevent any other drives to get mounted at all? Is there any other ideas?

How should I go forward?

--

Timo
Details
Message ID
<c8aae49a-4fc5-3788-fb14-0cd5ed2914b7@riihineva.no-ip.org>
In-Reply-To
<9d00eb29-f7c1-abce-d3ac-6bc85fad6c5a@riihineva.no-ip.org> (view parent)
DKIM signature
missing
Download raw message
Patch: +4 -1
Hi again,

I actually solved this for now by hacking /etc/init.d/modloop:


diff --git a/main/openrc/modloop.initd b/main/openrc/modloop.initd
index 87069b487a..5491ca029f 100755
--- a/main/openrc/modloop.initd
+++ b/main/openrc/modloop.initd
@@ -31,7 +31,10 @@ find_modloop() {
 	IFS="$oifs"
 	for line; do
 		img=${line%%:*}
		verify_modloop "$img" || eerror "Failed to verify signature of $img!"
		if ! verify_modloop "$img"; then
			eerror "Failed to verify signature of $img!"
			continue
		fi
 		mount "$img" -o loop,ro /.modloop || continue
 		if [ -d /.modloop/modules/$kver ]; then
 			return 0


and by adjusting initfs_cmdline in my custom profile:


initfs_cmdline="$initfs_cmdline apkovl=/media/sr0/alpine.apkovl.tar.gz"



I think "the correct" solution would be to look only in the drive from 
where Linux was booted, but I don't know how initramfs could 
unambiguously tell which drive was the boot drive. My know-how runs out 
early.

--

Timo
Details
Message ID
<984430469.31652.1590215591141@mail.vodafone.de>
In-Reply-To
<c8aae49a-4fc5-3788-fb14-0cd5ed2914b7@riihineva.no-ip.org> (view parent)
DKIM signature
missing
Download raw message
Hi,

> Timo Ketola <timo@riihineva.no-ip.org> hat am 21. Mai 2020 um 20:05 geschrieben:

> I think "the correct" solution would be to look only in the drive from 
> where Linux was booted, but I don't know how initramfs could 
> unambiguously tell which drive was the boot drive. My know-how runs out 
> early.

Would you share a little how you made the rescue CD? It's such a good idea,
but I didn't find much in the wiki. Could you post it, maybe adding it
directly at:
https://wiki.alpinelinux.org/wiki/How_to_make_a_custom_ISO_image
Reply to thread Export thread (mbox)