dCore Import Debian Packages to Mountable SCE extensions > dCore x86_64

Install dCore-buster64 on hdd in Hyper-V

(1/1)

GregS:
Hi all, the task I'm trying to get done is as simple as to rollout a tiny proxy service over about 100 VMs which run under Hyper-V. I have not dealt with TCL before so it is something new to me but as far as it does really small footprint it would be much easier to deploy. I noticed that there is a dCore version which supports deb packages and I loved it because then it seems quite easy to complete with my task once I would have got dCore installed onto VM.

I wondering if dCore supports booting from HV hdd?  I ask because if  I boot from ISO I can't see HDD until running sce-import scsi and sce-load scsi. So I guess it will not boot as HDD is required to be seen during boot time. Does it means something need to be done with vmlinuz or/and initramfs? I'm pretty confused here and lack of skills.
Please guide me a bit guys I would really appreciate any help.

Jason W:
Hi Greg.  The following should work if you need scsi drivers in the base dCore*.gz.  The scsi-$kernelversion package has no dependencies, but this method can be used of a package has no dependencies or 100 of them.  Use a running instance of dCore-buster64 to import your package. 


--- Code: ---sce-import scsi-4.19.10-tinycore64

--- End code ---

Now you have an SCE scsi-4.19.10-tinycore64.sce of the package and any of it's dependencies in your SCE directory.

Then,download or place the dCore-buster64.gz in your current directory.  Use the below script to unpack the dCore-buster64.gz, name it perhaps dCore-unpack.sh:


--- Code: ---#!/bin/sh

CORE="$1"

if [ ! -d rootfs ]; then
mkdir rootfs
else
rm -r rootfs/*
fi

cd rootfs

zcat ../"$CORE" | cpio -i -H newc -d
 
cd -

--- End code ---

The use of the script is:


--- Code: ---dCore-unpack.sh dCore-buster64.gz

--- End code ---

That will unpack dCore-buster64.gz into a directory rootfs.

Now you want to copy the desired SCE(s) to the /tmp/builtin directory in the rootfs of what will be your new dCore-buster64.gz.

At the command line:


--- Code: ---cp /etc/sysconfig/tcedir/sce/scsi-4.19.10-tinycore64.sce* rootfs/tmp/builtin/

--- End code ---

Then, use the repack script below, named dCorepack.sh to create the final dCore-buster64.gz:


--- Code: ---#!/bin/sh

CORE="$1"
REPO=`cat rootfs/usr/share/doc/tc/repo.txt`
RELEASE=`echo dCore-"$REPO":$(date "+%Y.%m.%d.%H.%M")`
echo "$RELEASE" > rootfs/usr/share/doc/tc/release.txt
echo "$RELEASE" > dCore-"$REPO".latest
cd rootfs

find | cpio -o -H newc | gzip -2 > ../"$CORE"
cd ..
md5sum "$CORE" > "$CORE".md5.txt

cd -

--- End code ---

Usage is:


--- Code: ---dCorepack.sh dCore-buster64.gz

--- End code ---

Your new dCore-buster.gz now contains the scsi drivers.  This can be used with any needed extra SCEs in base, this is how dCorePlus is made. 




Jason W:
Actually, the above works with any needed packages to be available after boot, what you need is for the scsi drivers available in base at boot.  So below is a little different but should suffice. 

With the dCore-buster64.gz in the current directory, do the unpack with the below script, name it dCore-unpack.sh:


--- Code: ---#!/bin/sh

CORE="$1"

if [ ! -d rootfs ]; then
mkdir rootfs
else
rm -r rootfs/*
fi

cd rootfs

zcat ../"$CORE" | cpio -i -H newc -d
 
cd -

--- End code ---

Use the script to unpack the base:


--- Code: ---dCore-unpack.sh dCore-buster64.gz

--- End code ---

Then get the scsi drivers:


--- Code: ---wget http://tinycorelinux.net/dCore/x86_64/import/scsi-4.19.10-tinycore64.tar.gz

--- End code ---

Then untar the drivers into the base in rootfs:


--- Code: ---tar xvf scsi-4.19.10-tinycore64.tar.gz -C rootfs

--- End code ---

Then repack the base with the below script name it dCorepack.sh:


--- Code: ---#!/bin/sh

CORE="$1"
REPO=`cat rootfs/usr/share/doc/tc/repo.txt`
RELEASE=`echo dCore-"$REPO":$(date "+%Y.%m.%d.%H.%M")`
echo "$RELEASE" > rootfs/usr/share/doc/tc/release.txt
echo "$RELEASE" > dCore-"$REPO".latest
cd rootfs

find | cpio -o -H newc | gzip -2 > ../"$CORE"
cd ..
md5sum "$CORE" > "$CORE".md5.txt

cd -


--- End code ---

Usage is:


--- Code: ---dCorepack.sh dCore-buster64.gz

--- End code ---

Now all should be good.  My oversight on the kernel modules needed vs the packages needed on boot. 

curaga:
Perms note: unpacking and packing operations need to be done as root, otherwise you will get wrong perms/ownership and get issues.

Navigation

[0] Message Index

Go to full version