The officially official Devuan Forum!

You are not logged in.

#1 Re: Off-topic » Refracta-SnapShot - Question » 2024-10-13 10:13:29

The issue "Compression error for type [cpio archive]" is solved in Refracta Snapshot 10.4.1.

Download Refracta Snapshot BASE
Download Refracta Snapshot GUI

Tested okey dokey on:

- Debian 12.7.0 Gnome amd64
- Ubuntu 24.04.1 LTS amd64
- Linux Mint Cinnamon 22 amd64

#3 Re: Other Issues » [SOLVED] (username) is not in the sudoers file. » 2024-10-13 09:56:54

Debian also returns "YourUserName is not in the sudoers file", when issuing the sudo command.
To add YourUserName to /[etc/sudoers] perform the following actions:

> open Terminal
   

su - root

    > type the password of the root account
   

visudo

    > press the [arrow-down] button
    > go to section "# User privilege specification"
    > add a line beneath "root...ALL": "{YourUserName} ALL=(ALL:ALL) ALL", e.g.:
   

obi7kenobi ALL=(ALL:ALL) ALL

    > press [ctrl]+[O] (write out)

    message: "file name to write: /etc/sudoers.tmp"
    This file name is OK. The actual file is [/etc/sudoers].

    > press <enter>
    > press [ctrl+[X] to exit the editing mode

#4 Re: Off-topic » Refracta-SnapShot - Question » 2024-04-22 12:19:43

Dear fsmithred, The new [/bin/refractasnapshot-gui] version 10.4.0 does not solve my problem.

Problem:
"Compression error for type [cpio archive]" when extracting initrd.img-6.5.0-26-generic.

Investigation:
1. [xed /var/log/refractasnapshot.log]:

Replace "xed" with your favorite editor.

++ file -L /boot/initrd.img-6.5.0-26-generic
++ egrep -o 'Zstandard compressed|gzip compressed|XZ compressed|cpio archive'
+ initrd_compression='cpio archive'
+ '[' '!' 'cpio archive' ']'
+ popd
+ '[' 'cpio archive' == 'Zstandard compressed' ']'
+ '[' 'cpio archive' == 'gzip compressed' ']'
+ '[' 'cpio archive' == 'XZ compressed' ']'
+ popd
+ echo 'Initrd is extracted'
+ edit_initrd
+ pushd /tmp/extracted
+ '[' -f conf/conf.d/cryptroot ']'
+ '[' -f cryptroot/crypttab ']'
+ '[' -f conf/conf.d/resume ']'
+ '[' -f conf/conf.d/zz-resume-auto ']'
+ popd
+ rebuild_initrd
+ pushd /tmp/extracted
+ '[' 'cpio archive' == 'gzip compressed' ']'
+ '[' 'cpio archive' == 'XZ compressed' ']'
+ '[' 'cpio archive' == 'Zstandard compressed' ']'
+ echo 'Compression error for type [cpio archive]...'
+ exit 1

2. The command [file -L /boot/initrd.img-6.5.0-26-generic] returns "ASCII cpio archive (SVR4 with no CRC)". This information is flaw.

Cause:
Linux Mint 21.3 uses an initrd.img file of type "initramfs" as of kernel version 5.15.0-94, and cannot be extracted/rebuilded using the cpio command.

Solution:
Use unmkinitramfs to extract- and mkinitramfs to rebuild the initrd file.

(tested on kernel: vmlinuz-6.5.0-26-generic, initrd: initrd.img-6.5.0-26-generic, distro: Linux Mint 21.3, desktop: Cinnamon 6.0.4, base: Ubuntu 22.04)

> [sudo xed /bin/refractasnapshot-gui]
> search for: "extract_initrd ()"

> replace:
from: extract_initrd () {
to:    }
with:

extract_initrd () {
# Customized {FillInCurrentDateTime} by {FillInYourName} 

    rm -rf /tmp/extracted
    mkdir /tmp/extracted
    pushd /tmp/extracted	
    
    unmkinitramfs "$initrd_image" "/tmp/extracted"
    
    if [ $? -eq 0 ]; then 
        echo "SUCCESS: unmkinitramfs has successfully extracted the original Initrd to /tmp/extracted" 
    else 
        echo "ERROR: unmkinitramfs has failed to extract the original Initrd"
        echo "Script execution terminated"
        rm -rf /tmp/extracted
        exit 1 
    fi
    popd
}

> search for: "rebuild_initrd ()"

> replace:
from: rebuild_initrd () {
to:    }
with:

rebuild_initrd () {
# Customized {FillInCurrentDateTime} by {FillInYourName}

    pushd /tmp/extracted
    mkinitramfs -c gzip -o ${work_dir}/iso/live/${initrd_image##*/}

    if [ $? -eq 0 ]; then 
        echo "SUCCESS: mkinitramfs has successfully rebuilded the custom Initrd" 
    else 
        echo "ERROR: mkinitramfs has failed to rebuild the custom Initrd"
        echo "Script execution terminated"
        rm -rf /tmp/extracted
        exit 1 
    fi
    popd
    rm -rf /tmp/extracted
}

Notice that the container is compressed using the gzip algorithm. I guess this solution can also help Ubuntu users.

Nonetheless, still very happy using Refracta Snapshot!

Board footer

Forum Software