The officially official Devuan Forum!

You are not logged in.

#1 2021-08-28 19:32:09

vgal
Member
Registered: 2021-08-28
Posts: 8  

Make "fresh" copy Jessie iso.

Hey!

I have several older computers (pre 2010, starting from the Asus EEE 900 netbook).
I want to make a variant of Devuan Jessie (.iso) with already updated packages (downloaded once from archive.devuan.org), as well as with the possibility of a more flexible choice of additional packages (for example, only for XFCE + Firefox) and non PAE kernel.
I'm a beginner Linux user, no experience yet ...
Now my Host is WinXP, I installed in VirtualBox (5.2) the guest OS (devuan_jessie_1.0.0_i386_DVD.iso) and started experimenting smile

# https://wiki.debian.org/DebianInstaller/Modify/CD

#from 'root' user

mkdir cd
bsdtar -C cd/ -xf /media/cdrom0/devuan_jessie_1.0.0_i386_NETINST.iso

# replace (in "pool/..." dir) the .deb files with new ones (upgrade):

# debconf, debconf-i18n, debian-archive-keyring, devuan-baseconf, devuan-keyring, gcc-4.9-base, gnupg, gpgv, isc-dhcp-client, isc-dhcp-common, libc-bin, libc6, libc6-i686, libdb5.3, libdns-export100, libffi6, libgcc1, libgnutls-deb0-28, libgnutls-openssl27, libicu52, libirs-export91, libisc-export95, libisccfg-export90, libncurses5, libncursesw5, libpam-modules, libpam-modules-bin, libpam0g, libprocps3, libssl1.0.0, libstdc++6, libtasn1-6, libtinfo5, locales, login, multiarch-support, ncurses-base, ncurses-bin, passwd, perl-base, procps, sensible-utils, tzdata, wget

chmod -R +w cd

###############################################################
# create the file "config-deb":
###############################################################
# Points to where the unpacked CD\DVD is.
Dir {
    ArchiveDir "cd";
};

# Sets the top of the .deb directory tree.
TreeDefault {
   Directory "pool/";
};

# The location for a Packages file.               
BinDirectory "pool/DEBIAN/main" {
   Packages "dists/jessie/main/binary-i386/Packages";
};

BinDirectory "pool/DEVUAN/main" {
   Packages "dists/jessie/main/binary-i386/Packages";
};

# We are only interested in .deb files (.udeb for udeb files).                               
Default {
   Packages {
       Extensions ".deb";
    };
};
###############################################################

apt-ftparchive generate config-deb

# generate "Packages" file

apt-ftparchive packages cd/pool > cd/dists/jessie/main/binary-i386/Packages

# Replace 'cd/pool' on 'pool' in "Packages" file

# generate "Packages.gz" file

gzip -c cd/dists/jessie/main/binary-i386/Packages | tee cd/dists/jessie/main/binary-i386/Packages.gz > Packages.gz.log

# updating the Release file in cd/dists/jessie/ is to delete everything in the file from the "MD5Sum:" line to the end of the file

sed -i '/MD5Sum:/,$d' cd/dists/jessie/Release

# followed by (editing the file, if desired)

apt-ftparchive release cd/dists/jessie >> cd/dists/jessie/Release

# regenerate "cd/md5sum.txt"

cd cd
md5sum `find ! -name "md5sum.txt" ! -path "./isolinux/*" -follow -type f` > md5sum.txt
cd ..

# TODO: including Override Information

# Creating a new iso

dd if=/media/cdrom0/devuan_jessie_1.0.0_i386_NETINST.iso bs=1 count=432 of=isohdpfx.bin
xorriso -as mkisofs -o test.iso \
        -isohybrid-mbr isohdpfx.bin \
        -c isolinux/boot.cat -b isolinux/isolinux.bin \
        -no-emul-boot -boot-load-size 4 -boot-info-table ./cd

Run in VirtualBox with test.iso ...

Install base system (debootstrap) failed:
"Warning: Failure while unpacking required packeges. ..."
7 pngs - https://drive.google.com/drive/folders/ … VFqOv0tU4i

What's wrong?

Offline

#2 2021-08-30 13:59:16

vgal
Member
Registered: 2021-08-28
Posts: 8  

Re: Make "fresh" copy Jessie iso.

I decided to simplify the task to find the problem. Just rebuilding, no file replacements, just unpacking, reindexing and recalculating md5 and creating an new iso.
The error repeated ...

In the end, I found the reason. The fact is that Devuan uses two directories ('/pool/DEBIAN/' and '/pool/DEVUAN/'), and after executing "apt-ftparchive generate config-deb" information from only one directory gets to "Packages".

The next step will be to replace the files (pool local upgrade)...

Offline

#3 2021-08-30 16:15:06

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Make "fresh" copy Jessie iso.

Just a hunch but it might be useful for you to understand how Devuan merges Debian repos with amprolla.

Online

#4 2021-08-30 23:55:24

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,106  

Re: Make "fresh" copy Jessie iso.

@vgal, the filename attribute of the Packages file(s) contain the relative pathname to the packages, into the "pool" directory tree, which as you point out, has the subdirectories DEBIAN and DEVUAN, and below that, you find the further relative path into the publication servers' tree for the .deb file.

It does seem like apt-ftparchive does something else than reproduce the pool path from the associated Packages files, which I guess is in your step "# generate "Packages" file". Specifically, if you locate the associated Packages file snippet for the package concerned, either in the original-cd Packages file(s), or in your local /var/lib/apt/lists/*Packages, you will find the correct pool pathname for the package. Alternatively, you add a step to change the Packages files generated by apt-ftparchive by replacing all filename attributes with the correct pool/ relative pathnames as found in that pool.

Offline

#5 2021-09-06 00:15:41

vgal
Member
Registered: 2021-08-28
Posts: 8  

Re: Make "fresh" copy Jessie iso.

Thanks for answers.

Since I do not need automation, I decided that it would be best to simply manually replace the package information in the file dists/jessie/main/binary-i386/Packages.gz/Packages.
I, of course, do not have all the information, but my first impression is that it might not be worth splitting the packages into two directories ("DEVUAN and DEBIAN").

Now I have two options for NETINST.iso:
1 - replace only 'devuan-keyring'
2 - replacing 'devuan-keyring' and 45 more files (upgrade)

Now with NETINST.iso it is possible to install the system (via the Internet). Without internet, of course, a minimal installation is also possible.

I continue the experiment. Now with CD.iso. It is not yet clear what is the difference between "XFCE DE" and "Default DE" tasks and why the set of packages for the "standard" task ('INET install' and 'CD install') is different.

And the most important question: what are the ways to change|add the ability to select packages|programs|tasks during installation?

Offline

#6 2021-09-11 00:21:53

vgal
Member
Registered: 2021-08-28
Posts: 8  

Re: Make "fresh" copy Jessie iso.

A little automation won't be superfluous:

For a start, it's a good idea (or no smile) to make a local copy of the repository archive.
Since the file 'md5sum.txt' (which is at the root of every iso with the Devuan distribution) contains full paths to all files, why not use this ...

# Download all .deb's from md5sum.txt (/pool/*.deb) to current dir.
# Example one line: '8ba8293f9be16668fde39a2eea3c35a1  ./pool/DEBIAN/main/a/acl/libacl1_2.2.52-2_i386.deb'

Cdrom='/media/cdrom0/'

while read -r TextLine; do

  FilePath="${TextLine#*/}"         # 'pool/DEBIAN/main/a/acl/libacl1_2.2.52-2_i386.deb'

  if [ "${FilePath:0:4}" = "pool" ]; then

    DirName="${FilePath%/*}"        # 'pool/DEBIAN/main/a/acl'
    FileName="${FilePath##*/}"      # 'libacl1_2.2.52-2_i386.deb'
    ShortFileName="${FileName%%_*}" # 'libacl1'

    apt-get download $ShortFileName &>> download.log

  fi

done < $Cdrom'md5sum.txt' 

Unfortunately .udeb files have not been downloaded.
The kernel files 'linux-compiler *', 'linux-headers *' and 'linux-image *' also.

Offline

#7 2021-09-20 14:02:32

vgal
Member
Registered: 2021-08-28
Posts: 8  

Re: Make "fresh" copy Jessie iso.

So after experimenting with installing Devuan One, I have some observations.
Everything that is written below refers to the "i386" (32-bit x86) architecture, and in the Virtual Box. I installed in Expert text mode - https://drive.google.com/file/d/1pEyBZh … wufx8/view

Unfortunately, when installing from official ISO`s
  'devuan_jessie_1.0.0_i386_NETINST.iso'
  'devuan_jessie_1.0.0_i386_CD.iso'
  'devuan_jessie_1.0.0_i386_DVD.iso'
you will not be able to fully install Devuan if you answer "Yes" to the question "Use a network mirror?" https://drive.google.com/file/d/1FtUP1U … mOY2U/view

Even if you enter https://drive.google.com/file/d/1RiPnhC … soUVx/view from the keyboard "archive.devuan.org" and then "merged"
(or "deb.devuan.org", "merged" https://drive.google.com/file/d/1J117j8 … mYD2_/view, https://drive.google.com/file/d/12r1z-0 … va4RS/view ),
then (after downloading and unpacking the package list archives from the repository) with "Select and install software" you will end up with an error https://drive.google.com/file/d/1T7xHvG … n_4QK/view.

After this error, I went back to the main menu and saved the logs https://drive.google.com/file/d/1tK9l0i … m0Zjb/view

Sep 20 07:29:03 syslogd started: BusyBox v1.22.1
...
Sep 20 07:49:19 main-menu[174]: (process:1469): wget: bad address 'auto.mirror.devuan.org'
Sep 20 07:49:22 main-menu[174]: INFO: Menu item 'pkgsel' selected
Sep 20 07:49:24 pkgsel: checking for (security) updates to the base system
Sep 20 07:49:25 in-target: Reading package lists...
Sep 20 07:49:30 in-target: 
Sep 20 07:49:30 in-target: Building dependency tree...
Sep 20 07:49:30 in-target: 
Sep 20 07:49:30 in-target: Reading state information...
Sep 20 07:49:30 in-target: 
Sep 20 07:49:30 in-target: The following package was automatically installed and is no longer required:
Sep 20 07:49:30 in-target:   libuuid-perl
Sep 20 07:49:30 in-target: Use 'apt-get autoremove' to remove it.
Sep 20 07:49:30 in-target: The following packages have been kept back:
Sep 20 07:49:30 in-target:   linux-image-586
Sep 20 07:49:30 in-target: The following packages will be upgraded:
Sep 20 07:49:30 in-target:   apt apt-utils bash busybox cpio cron debconf debconf-i18n
Sep 20 07:49:30 in-target:   debian-archive-keyring devuan-baseconf devuan-keyring e2fslibs e2fsprogs
Sep 20 07:49:30 in-target:   gcc-4.9-base gnupg gpgv isc-dhcp-client isc-dhcp-common libapt-inst1.5
Sep 20 07:49:30 in-target:   libapt-pkg4.12 libbz2-1.0 libc-bin libc6 libc6-i686 libcomerr2 libdb5.3
Sep 20 07:49:30 in-target:   libdns-export100 libffi6 libgcc1 libgnutls-deb0-28 libgnutls-openssl27
Sep 20 07:49:30 in-target:   libicu52 libidn11 libirs-export91 libisc-export95 libisccfg-export90
Sep 20 07:49:30 in-target:   libjson-c2 libncurses5 libncursesw5 libpam-modules libpam-modules-bin
Sep 20 07:49:30 in-target:   libpam0g libprocps3 libss2 libssl1.0.0 libstdc++6 libtasn1-6 libtinfo5
Sep 20 07:49:30 in-target:   libudev1 linux-base locales login multiarch-support ncurses-base ncurses-bin
Sep 20 07:49:30 in-target:   passwd perl-base procps rsyslog sensible-utils tar tzdata udev vim-common
Sep 20 07:49:30 in-target:   vim-tiny wget zlib1g
Sep 20 07:49:31 in-target: 67 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Sep 20 07:49:31 in-target: Need to get 39.0 MB of archives.
Sep 20 07:49:31 in-target: After this operation, 260 kB disk space will be freed.
Sep 20 07:49:31 in-target: WARNING: The following packages cannot be authenticated!
Sep 20 07:49:31 in-target:   bash libc-bin libc6 libc6-i686 gcc-4.9-base libgcc1 libstdc++6 e2fslibs
Sep 20 07:49:31 in-target:   e2fsprogs login ncurses-bin perl-base tar libbz2-1.0 zlib1g libapt-pkg4.12
Sep 20 07:49:31 in-target:   gpgv devuan-keyring debian-archive-keyring gnupg apt ncurses-base
Sep 20 07:49:31 in-target:   debconf-i18n debconf libcomerr2 libncursesw5 libtinfo5 libncurses5 libpam0g
Sep 20 07:49:31 in-target:   libpam-modules-bin libpam-modules libss2 libdb5.3 cron libapt-inst1.5
Sep 20 07:49:31 in-target:   libprocps3 libssl1.0.0 linux-base procps udev libudev1 libgnutls-openssl27
Sep 20 07:49:31 in-target:   libtasn1-6 libgnutls-deb0-28 libidn11 libisc-export95 libdns-export100
Sep 20 07:49:31 in-target:   libffi6 libicu52 libisccfg-export90 libirs-export91 libjson-c2
Sep 20 07:49:31 in-target:   multiarch-support passwd sensible-utils tzdata apt-utils cpio
Sep 20 07:49:31 in-target:   isc-dhcp-client isc-dhcp-common rsyslog vim-tiny vim-common wget locales
Sep 20 07:49:31 in-target:   busybox devuan-baseconf
Sep 20 07:49:31 in-target: E
Sep 20 07:49:31 in-target: : 
Sep 20 07:49:31 in-target: There are problems and -y was used without --force-yes
Sep 20 07:49:31 in-target: 
Sep 20 07:49:31 kernel: [ 1230.491673] ISO 9660 Extensions: Microsoft Joliet Level 3
Sep 20 07:49:31 kernel: [ 1230.492901] ISO 9660 Extensions: RRIP_1991A
Sep 20 07:49:34 main-menu[174]: WARNING **: Configuring 'pkgsel' failed with error code 100
Sep 20 07:49:34 main-menu[174]: WARNING **: Menu item 'pkgsel' failed.
Sep 20 08:01:12 main-menu[174]: INFO: Menu item 'save-logs' selected

That is, when we try to update packages, we get an error.
This is because when configuring APT, there were several errors like this:
"Sep 20 07:48:22 in-target: W: GPG error: http://deb.devuan.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY BB23C00C61FC752C"
To prevent this from happening, you need to install 'devuan-keyring_2017.10.03' https://www.devuan.org/os/keyring (which expires [2022-09-03]).

There are probably several ways to solve this problem. I decided to rebuild the ISO, replacing 'devuan_jessie_1.0.0_i386_*.iso\pool\DEVUAN\main\d\devuan-keyring\devuan-keyring_2016.11.22_all.deb' with 'devuan-keyring_2017.10.03_all.deb'.

After that, the download of packages from the Devuan repository is successful.

Simply replacing the 'keyring' packages is not enough, additional steps are needed, which I wrote about above.
In short, it will be:

1) Unpack Devuan *.iso (or mount and copy in the file manager, not forgetting about hidden files)
2) Allow writing to files (chmod)
3) Change the content in the "pool..." folders
4) Using 'apt-ftparchive generate config-deb-x' create new "Packages-x" files using the appropriate config files for each subdirectory ("DEVUAN", "DEBIAN"). The resulting files will be located in "dists\jessie\main\binary-i386\" (or whatever you specify in the corresponding "config-deb")
5) Combine the received "Packages-x" files into one "Packages"
6) Create an archive "Packages.gz" for it
7) Remove everything except "Packages.gz" and "Release"
If changes are made not only in "main", then it is necessary to repeat 4-7
8) Using 'apt-ftparchive release ...' we update the information in the file "dists\jessie\Release\"
9) Let's recalculate the checksums for all files and save them in the file "md5sum.txt"
10) Create a new ISO

As for the last point, the version of the 'xorriso ...' command (which in the previous post) creates a * .iso file, which, when viewed in Windows, shows short names.
This variation adds Joliet:

xorriso -as mkisofs \
        -r -V 'Debian 1.0-final i386 1' \
        -o devuan-1.0-i386-DVD.iso \
        -J -J -joliet-long -cache-inodes \
        -isohybrid-mbr isohdpfx.bin \
        -b isolinux/isolinux.bin \
        -c isolinux/boot.cat \
        -boot-load-size 4 -boot-info-table -no-emul-boot \
        -eltorito-alt-boot \
        -e boot/grub/efi.img \
        -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \
        ./cd \
        2> devuan-1.0-i386-DVD.txt

Replace "DVD" with "CD" or "NETINST", or whatever you prefer.

This is an example of a plan. The most important thing to understand is:

1) All packages are located in the "pool\..." folders.
2) All "databases" that contain information about packages are located in files "Packages.gz" in "dists\jessie\..." in the corresponding subdirectories.
3) The file "dists\jessie\Release\" contains service information about all "databases"
4) The file "md5sum.txt" stores information about checksums for all files

Thus, if you change something, then you need to remember to update the related information.

Offline

Board footer