-
Basefile erstellen scheitert an fehlndem rpm-Paket
Hallo zusammen,
ich arbeite mich gerade in FAI (Fully automatic Installation) ein und müsste in diesem Zuge ein so genanntes Basefile erstellen.
In diesem Basefile ist das Basissystem für Open SuSE Leap 15.2 enthalten. Es wird später von FAI einfach auf die Festplatte entpackt und kann danach gestartet werden.
Die Erstellung des Basefiles wird jedoch wie folgt abgebrochen:
Paket lsb-release-3.1-lp152.1.1.noarch abrufen (1/4), 19,8 KiB ( 29,3 KiB entpackt)
Abrufen: lsb-release-3.1-lp152.1.1.noarch.rpm ............................................................................................................[fertig]
(1/4) Installieren: lsb-release-3.1-lp152.1.1.noarch .....................................................................................................[fertig]
Paket libzypp-17.24.1-lp151.2.19.1.x86_64 abrufen (2/4), 2,2 MiB ( 8,1 MiB entpackt)
Abrufen: libzypp-17.24.1-lp151.2.19.1.x86_64.rpm .................................................................................................[Nicht gefunden]
Datei './x86_64/libzypp-17.24.1-lp151.2.19.1.x86_64.rpm' auf Medium 'http://download.opensuse.org/update/leap/15.2/oss' nicht gefunden
Abbrechen, wiederholen, ignorieren? [a/w/i/...? zeigt alle Optionen] (a): a
Während oder nach der Installation/dem Entfernung von Paketen ist ein Problem aufgetreten:
Die Installation wurde gemäß Anweisung abgebrochen.
Und in der Tat ist zu sehen, dass das angeforderte rpm-file tatsächlich dort nicht zu finden ist.
Hier auch noch das Skript, was das Basefile erstellen soll.
***************************************************************************************************
#!/usr/bin/env bash
if [ $# -ne 2 ]; then
echo "Missing argument(s)! This script doesn't have super-cow powers!"
echo "Usage: ./$(basename $0) ISO TARGET"
exit 0
fi
if [ $(id -u) != 0 ]; then
echo "You must be root!"
exit 0
fi
iso=$1
target=$2
iso_target="$(mktemp -d $(pwd)/basefiles.XXXXXXXX)"
mount -o loop "$iso" "$iso_target"
tmp_target="$(mktemp -d $(pwd)/basefiles.XXXXXXXX)"
tar xJf "$iso_target/base-x86_64.tar.xz" -C "$tmp_target"
umount "$iso_target" && rm -rf "$iso_target"
rpm --root "$tmp_target" -Va
touch "$tmp_target/etc/fstab"
mount sysfs "$tmp_target/sys" -t sysfs
mount proc "$tmp_target/proc" -t proc
mount devpts "$tmp_target/dev/pts" -t devpts
global_opts="--root $tmp_target --non-interactive"
install_opts="--auto-agree-with-licenses --no-recommends"
rpm --root "$tmp_target" --rebuilddb
tmp_repos="$(mktemp $(pwd)/XXXXXXXX.repo)"
zypper repos --export "$tmp_repos"
zypper --root "$tmp_target" addrepo -f -r "$tmp_repos"
rm "$tmp_repos"
zypper --root "$tmp_target" refresh
zypper $global_opts install $install_opts branding-openSUSE
zypper $global_opts install $install_opts --type pattern base yast2_basis
zypper $global_opts install $install_opts lsb-release zypper zypper-log
zypper $global_opts dist-upgrade
zypper $global_opts clean --all
rpm --root $tmp_target -e kernel-debug patterns-openSUSE-base \
grub2 grub2-i386-pc grub2-x86_64-efi grub2-branding-openSUSE
rm -f $tmp_target/etc/resolv.conf && chroot "$tmp_target" netconfig update -f
rm -f $tmp_target/etc/hostname
rm -f $tmp_target/etc/hosts
umount "$tmp_target/sys" "$tmp_target/proc" "$tmp_target/dev/pts"
tar --one-file-system -C $tmp_target -cf - . | gzip -9 >$target.tar.gz # && \
# rm -rf $tmp_target
**********************************************************************************************
Über Tipps die Zur Ergreifung des Übeltäters führen, würde ich mich sehr freuen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks