The officially official Devuan Forum!

You are not logged in.

#1 Re: Devuan Derivatives » SDK or (Debian) Live-build » 2021-05-04 07:33:32

Ozi wrote:

Yes I have live-build working for Devuan. I haven't made new Devuan packages for it. I have only made a few changes to the way the installer script works. The live-build maintainer has made the naming convention consistent across all scripts.

I'm happy to send you the setup script!

@Ozi - That would be perfect. - Thank you so much.

#2 Devuan Derivatives » SDK or (Debian) Live-build » 2021-05-02 13:25:29

grafiksinc
Replies: 4

Hello forum,
Hope you are all doing well,
Over at PeppermintOS we are re-basing on Debian and Devuan
With Devuan we will go with runit as the init system.

Our Debian build is reaching completion pretty soon we are starting to look at the tools needed for Devuan.
Now.... on  Debian we used the live-build tools to do what we do.....

I notice that you guys have this SDK:
https://www.devuan.org/os/distro-kit

That kinda got me wondering:
1. Should we use the SDK
or
2. Can we use the live-build tools with Devuan?

I figure I would ask  before we spent too much time down either road..

Thank  you all very much for your time,

#4 Re: Hardware & System Configuration » Refracta-SnapShot - EFI Questions - Solved » 2021-01-10 13:41:07

fsmithred wrote:

If you chose force_efi, then I assume your host system boots in legacy bios mode. Make sure both grub-pc.bin and grub-efi-amd64.bin installed. And you'll need to have a copy of the not-installed grub package in the root of the system (or somewhere else if you specify the location in the config file.)

I like to install grub-efi-amd64 in the system and put the grub-pc  deb package in the root, so it's available during installation on bios sytems. It works the opposite way, too, but if grub-efi is the one that's installed, then you will also have efibootmgr in the live system. That will make life easier if you boot on a uefi system.

dpkg -l |grep grub

Check to make sure there are two partitions in the iso.
fdisk -l <snapshot.iso>

The place I am building is in a VM using virtualbox hmmmm.....okay... make sense what you are saying.... thanks for the tip...

#5 Hardware & System Configuration » Refracta-SnapShot - EFI Questions - Solved » 2021-01-10 12:05:03

grafiksinc
Replies: 3

Hi forum - So far so good, SnapShot has been working great... but I do have one thing I been dealing with.

Base OS - Debian Bullseye
I make all my changes good to go smile
In the  config I have this set:
make_efi="yes"
force_efi="yes"

But.....I cant get it to boot UEFI ---- basically the system does not provide the UEFI option with my ISO

Here is a testing scenario I have:

Hardware:
MB - ASROCK B450M Pro 4, Processor- Ryzen 3 Third Gen

Now If I take vanilla  debian and burn its ISO to a USB.....I get the UEFI option and it boots to the live session
This proves that the Hardware has no issues

But....If I take my ISO I created with RefractaSnapshot and burn it to a USB .....I do not get the UEFI option.

Let me add:
The EFI files are in the ISO, and looking at the logs i don't see any errors concerning  EFI creation.

Is there a step i am missing?

I really appreciate the help in advance.

#6 Re: Devuan Derivatives » Init question » 2021-01-05 23:02:32

Perfect!.....Thanks for the info. have a good safe 2021!

#7 Devuan Derivatives » Init question » 2021-01-05 05:47:41

grafiksinc
Replies: 4

Hello forum, I have a question for you all...... forgive me if this seems a bit simplistic, but our distribution, I develop for is in the process of using Devuan as a base, between sysvinit  and openrc could you guys expand on the differences or pros and cons of each.... I have read up on  them but I wanted to see what this community thought. We are still at the cross roads as to which init to use at the moment.

Thank you in advance for any thought or comments/

#8 Re: Off-topic » Refracta-SnapShot - Question » 2020-09-18 12:03:21

Hello guys --- I wanted to update this post just to have closure...
Again thank you so much for advice and support....

Long story short I could not get around the compression problem with Ubuntu....
So, with Ubuntu what we did was take the "Snapshot without" crypt-setup, and then later  I used  a tool called "Cubic" to update the ISO.
https://launchpad.net/cubic
And that was problem solved.

But....I am glad I came here, because the work you guys have done and the  freedom you offer speaks volumes. 
I think a lot of folks just don't understand just how much systemd touches so many things... 

Who knows maybe I can convince my community, and team to be open to a Devuan base wink 
I hear OpenRc may be the init to use though....is that true I am really ignorant on that subject..?

Again.... thank you!

#9 Re: Off-topic » Refracta-SnapShot - Question » 2020-08-22 12:16:29

@HevyDevy and @fsmithred

Here are my results,
**I have not tried the manual method @fsmithred mentioned yet.

I did change the compression in the initramfs.conf to gzip and updated the initramfs no issues there...
Ran Snapshot and it ...came back with the same Decompression error.

Now....for myself I know exactly where the  problem area is in the snapshot script. That is here which is what you guys have already mentioned.

	elif [ "$COMPRESSION" = "cpio archive" ]; then
		echo "Archive is cpio archive..."
		(cpio -i ; zcat | cpio -i) < "$initrd_image"
		exit_code="$?"
		if [ "$exit_code" -ne 0 ] ; then
			(cpio -i ; xzcat | cpio -i) < "$initrd_image"
			exit_code="$?"
			if [ "$exit_code" -ne 0 ] ; then
				echo "Decompression error" && exit 1

Before I try the  manual method I wanted to ask the following:
Ubuntu talks about using unmkinitramfs to extract an  initramfs image.... because they are using lz4
The manpage is here: https://manpages.debian.org/buster/init … .8.en.html
Starting with 20.04...... lz4 is the standard used by Ubuntu to compress an initramfs image.

My question is......is unmkinitramfs the correct tool that I should try to add to the snapshot script?
or.... am I going in the wrong direction

#10 Re: Off-topic » Refracta-SnapShot - Question » 2020-08-22 00:00:04

Thank you so much! for the advice I think I will
Try changing the compression to gzip. and give it ago...

If that does not work then I will  update the script to include lz4 compression.
I will update this post, with the results. and what I did when it is all said and done .;)

#11 Re: Off-topic » Refracta-SnapShot - Question » 2020-08-21 12:21:04

All.....Sorry for the late reply, I am in Japan....

Looks like it is lz4

xtNu70il.png


where as my Debian is gzip...

#12 Re: Off-topic » Refracta-SnapShot - Question » 2020-08-20 10:43:50

@fsmithred - here is the result of file -L /boot/initrd.img
  fRXWnY2l.png

Also I did as you suggested I ran snapshot  with JUST cryptsetup installed and NOT calamares the result is the same.
Here is the terminal output from debug mode.
  cpGSiucl.png

Do you want the whole log, file? if so I emailed it to.

@HevyDevy - Yep it is in the same location -
CvOuVngl.png

#13 Re: Off-topic » Refracta-SnapShot - Question » 2020-08-19 13:03:36

@HevyDevy - that solved my problem on the Debian 10 --- thank you very very much! I  did start off of the net install could have been a flook...;)

@fsmithred - Thanks to HevyDevy - the Debian is good to go....... now the Ubuntu is the stickler..... It does have xz-utils and gzip, that is not the issue...
and this command file -L /initrd.img returns
Ubuntu - Screen
g4SqUhHl.png

hmmm... so doing boot a directory comparison Ubuntu on the left and Debian on the right
eyVxDBhl.png

you can see the file structure is of course different -

Just for the sake of concept I did run file -L /initrd.img on Debian and it did return the following:
/initrd.img: ASCII cpio archive (SVR4 with no CRC)

Being that the structure on Ubuntu is different it is worth mentioning the kernel and initrd setting for the .conf file for snapshot  in etc had to be set like this:

kernel_image ="/boot/vmlinuz"
initrd_image ="/boot/initrd.img"


Where as on debian this is all it needed:

kernel_image ="/vmlinuz"
initrd_image ="/initrd.img"

As I mentioned on Ubuntu everything works fine until I install cryptsetup.

Another thing... I did I try with initrd_crypt=yes in the .conf file.... and removed cryptsetup that allows Snapshot to complete successfully... but the calamaeres settings  does not like that, because its looking for that specific cryptsetup file structure.

I know this is long but I really appreciate the advice..:)

#14 Re: Off-topic » Refracta-SnapShot - Question » 2020-08-18 11:59:37

@fsmithred – thanks! For the help.
Let me preface this as using snapshot with the refracta-installer  everything works as expected.

Version of SnapShot being used:
refractasnapshot-base_10.2.10_all.deb
refractasnapshot-gui_10.2.10_all.deb

Operating System environments tested:

Ubuntu 20.04
Debian 10 (Buster)
Both running in Virtual Box

The problem below happens on both distros with the  exact same error log

Problem:
I want to take a “snapshot” of my build, however I want to use “calamares” as the installer.
I also want to use the  “calamares-settings-debian (10.0.20-1+deb10u3)“ package for my installer setup.
That package is located here: https://packages.debian.org/stable/cala … ngs-debian
Now…. these settings install on both distros listed above and run with no problem, and the settings work just fine with calamares.

***NOTE:  Before setting up  calamares with the “calamares-settings-debian” package I ran snapshot  and it completed successfully using the “01 Create a snapshot” option***

After setting up calamares and then applying the “calamares-settings-debian” package snapshot does Not complete.  It errors out with the following error:


+ [[ -n '' ]]
+ '[' yes = yes ']'
+ clean_initrd
+ extract_initrd
+ mkdir /tmp/extracted
+ pushd /tmp/extracted
++ egrep -o 'gzip compressed|XZ compressed|cpio archive'
++ file -L /boot/initrd.img
+ COMPRESSION='cpio archive'
+ '[' 'cpio archive' = 'gzip compressed' ']'
+ '[' 'cpio archive' = 'XZ compressed' ']'
+ '[' 'cpio archive' = 'cpio archive' ']'
+ echo 'Archive is cpio archive...'
+ cpio -i
62 blocks
+ cpio -i
+ zcat

gzip: stdin: not in gzip format
cpio: premature end of archive
+ exit_code=2
+ '[' 2 -ne 0 ']'
+ cpio -i
cpio: kernel/x86/microcode/AuthenticAMD.bin not created: newer or same age version exists
62 blocks
+ cpio -i
+ xzcat
xzcat: (stdin): File format not recognized
cpio: premature end of archive
+ exit_code=2
+ '[' 2 -ne 0 ']'
+ echo 'Decompression error'
+ exit 1

Looking through the snapshot script I have been able to find where it is interrupted, that is in this snippet:

extract_initrd () {

	mkdir /tmp/extracted
	pushd /tmp/extracted

	COMPRESSION=$(file -L "$initrd_image" | egrep -o 'gzip compressed|XZ compressed|cpio archive')

	if [ "$COMPRESSION" = "gzip compressed" ]; then
		echo "Archive is gzip compressed..."
		zcat "$initrd_image" | cpio -i

	elif [ "$COMPRESSION" = "XZ compressed" ]; then
		echo "Archive is XZ compressed..."
		xzcat "$initrd_image" | cpio -d -i -m

	elif [ "$COMPRESSION" = "cpio archive" ]; then
		echo "Archive is cpio archive..."
		(cpio -i ; zcat | cpio -i) < "$initrd_image"
		exit_code="$?"
		if [ "$exit_code" -ne 0 ] ; then
			(cpio -i ; xzcat | cpio -i) < "$initrd_image"
			exit_code="$?"
			if [ "$exit_code" -ne 0 ] ; then
				echo "Decompression error" && exit 1
			else
				COMPRESSION="XZ compressed"
			fi
		else
			COMPRESSION="gzip compressed"
		fi
		
		echo "COMPRESSION is $COMPRESSION"

	else
		echo "Decompession error..." && exit 1
	fi

	popd

	echo "Initrd is extracted"

}

Now…..I know what is causing this issue but I am not sure how to resolve it.
Back to the “calamares-settings-debian” package:
https://packages.debian.org/stable/cala … ngs-debian
one of the dependencies is  cryptsetup  a dummy package that installs cryptsetup-initramfs and cryptsetup-run that is causing snapshot to stop,

So I uninstalled cryptsetup and ran snapshot and it completed no problem, but now the calamares installation in the iso, does not complete because cryptsetup is not found.
Of course I want to use cryptsetup, because of LUKS for encryption, for the sake of installation I want to keep it around,

Which brings be  to my question,  the error that gets thrown is a decompression error  is there an additional command I can use to get past decompression because it seems to be using gzip, XZ, or cpio.
Or am I all wrong about how I am using cryptsetup?

Other reference links:
https://packages.debian.org/buster/cryptsetup
https://packages.debian.org/buster/cryptsetup-initramfs
https://packages.debian.org/buster/cryptsetup-run

#15 Off-topic » Refracta-SnapShot - Question » 2020-08-16 05:58:41

grafiksinc
Replies: 20

Hello Forum- before I go into detail about SnapShot. I wanted to make sure I am in the right spot.
Is this the correct place to pose a question about this package?

Thank you  in advance

Board footer

Forum Software