Is it possible to configure boot to run alpine using a read-only mounted squashfs file?
The mkinit code seems to include some squashfs support, but I can not figure if that could be used for my purpose.
/Lars
Skickat från min iPhone
---
Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org
Help: alpine-user+help@lists.alpinelinux.org
---
that its a great idea! we could have a saved squasfs root alpine and
bottstrap when make a packaging.. so we could emulate the behaviour of the
suse open build engine service
seems the mkinit does are not enought
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
El vie., 7 de jun. de 2019 a la(s) 06:40, Lars-Erik Helander (
lehswe@icloud.com) escribió:
> Is it possible to configure boot to run alpine using a read-only mounted> squashfs file?>> The mkinit code seems to include some squashfs support, but I can not> figure if that could be used for my purpose.>> /Lars>> Skickat från min iPhone>>> ---> Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org> Help: alpine-user+help@lists.alpinelinux.org> --->>
gr4eat, thanks for the hints
El vie., 7 de jun. de 2019 a la(s) 10:27, Paul Zillmann (p.zillmann@h6g.de)
escribió:
> Hello Lars-Erik,>> Am 07.06.19 um 12:40 schrieb Lars-Erik Helander:> > Is it possible to configure boot to run alpine using a read-only mounted> squashfs file?>> Yes it is, supposing the Kernel and initramfs are not part of the> squashfs file.> Take a look at [1] if the Kernel arguments work for you.>> Otherwise you can modify the init script here:> - mount the fs where the squashfs lies> - mount the squashfs> - mount a tmpfs> - mount an overlayfs as the new root, lower dir would be squashfs,> upper dir is the tmpfs> The scipt is located at /usr/share/mkinitfs/initramfs-init> Important parts at this section is "nlplug-findfs" and "exec> /bin/busybox switch_root" to exit the initramfs into the bootet system.> (You can replace the code in lines 479-490 as present in the linked> repository)>> Don't forget do add the squashfs and overlayfs Kernel modules into the> initramfs, then regenerate the initramfs.>> You should also take a look into the Alpine Netboot which uses modloop> instead of squashfs.>> 1: https://git.alpinelinux.org/mkinitfs/tree/initramfs-init.in#n455>> - Paul>> >> > The mkinit code seems to include some squashfs support, but I can not> figure if that could be used for my purpose.> >> > /Lars> >> > Skickat från min iPhone> >> >> > ---> > Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org> > Help: alpine-user+help@lists.alpinelinux.org> > ---> >>>> ---> Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org> Help: alpine-user+help@lists.alpinelinux.org> --->>
Hello Lars-Erik,
Am 07.06.19 um 12:40 schrieb Lars-Erik Helander:
> Is it possible to configure boot to run alpine using a read-only mounted squashfs file?
Yes it is, supposing the Kernel and initramfs are not part of the
squashfs file.
Take a look at [1] if the Kernel arguments work for you.
Otherwise you can modify the init script here:
- mount the fs where the squashfs lies
- mount the squashfs
- mount a tmpfs
- mount an overlayfs as the new root, lower dir would be squashfs,
upper dir is the tmpfs
The scipt is located at /usr/share/mkinitfs/initramfs-init
Important parts at this section is "nlplug-findfs" and "exec
/bin/busybox switch_root" to exit the initramfs into the bootet system.
(You can replace the code in lines 479-490 as present in the linked
repository)
Don't forget do add the squashfs and overlayfs Kernel modules into the
initramfs, then regenerate the initramfs.
You should also take a look into the Alpine Netboot which uses modloop
instead of squashfs.
1: https://git.alpinelinux.org/mkinitfs/tree/initramfs-init.in#n455
- Paul
>> The mkinit code seems to include some squashfs support, but I can not figure if that could be used for my purpose.>> /Lars>> Skickat från min iPhone>>> ---> Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org> Help: alpine-user+help@lists.alpinelinux.org> --->
---
Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org
Help: alpine-user+help@lists.alpinelinux.org
---
Hi Paul,
thank you very much for the hints :)
/Lars
Skickat från min iPhone
> 7 juni 2019 kl. 16:27 skrev Paul Zillmann <p.zillmann@h6g.de>:> > Hello Lars-Erik,> >> Am 07.06.19 um 12:40 schrieb Lars-Erik Helander:>> Is it possible to configure boot to run alpine using a read-only mounted squashfs file?> > Yes it is, supposing the Kernel and initramfs are not part of the squashfs file.> Take a look at [1] if the Kernel arguments work for you.> > Otherwise you can modify the init script here:> - mount the fs where the squashfs lies> - mount the squashfs> - mount a tmpfs> - mount an overlayfs as the new root, lower dir would be squashfs, upper dir is the tmpfs> The scipt is located at /usr/share/mkinitfs/initramfs-init> Important parts at this section is "nlplug-findfs" and "exec /bin/busybox switch_root" to exit the initramfs into the bootet system. (You can replace the code in lines 479-490 as present in the linked repository)> > Don't forget do add the squashfs and overlayfs Kernel modules into the initramfs, then regenerate the initramfs.> > You should also take a look into the Alpine Netboot which uses modloop instead of squashfs.> > 1: https://git.alpinelinux.org/mkinitfs/tree/initramfs-init.in#n455> > - Paul> >> >> The mkinit code seems to include some squashfs support, but I can not figure if that could be used for my purpose.>> >> /Lars>> >> Skickat från min iPhone>> >> >> --->> Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org>> Help: alpine-user+help@lists.alpinelinux.org>> --->> > > > ---> Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org> Help: alpine-user+help@lists.alpinelinux.org> --->
---
Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org
Help: alpine-user+help@lists.alpinelinux.org
---