WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: building my own dCore-Image  (Read 10434 times)

Offline minnten

  • Newbie
  • *
  • Posts: 5
building my own dCore-Image
« on: October 01, 2018, 06:30:22 AM »
Hello,

I have a problem:
We still have some old Embedded computers, but now they are all going to break. The system in the embedded computers is only for displaying some quick overview on other runnung PC's in the Network. Our idea was to replace them with thinclients. Now I have set up these thinclients with dCore, so that virtualbox starts and executes the image of the old embedded computer in virtualbox automatically.
Now it has turned out that we would find that quite practical, if we could have this on a stick and we can go on any computer to start the embedded PC from there.

Now I have done tests with an installation on sticks, but they do not work as intended, because I do not get the tce folder cleanly bound.

My idea was to build a new image, which, like the image for the installation, is stored directly in the RAM.

Now to my actual question:

How do I create my own image containing a TCE / SCE folder loaded by default and the needed scripts?

Many thanks for your thoughts and the help


Minnten

Online core-user

  • Full Member
  • ***
  • Posts: 195
  • Linux since 1999
Re: building my own dCore-Image
« Reply #1 on: October 01, 2018, 08:58:17 AM »
Remaster it, on the Core Plus distro there is a program to do just that, not sure about dCore, maybe it can be added.
AMD, ARM, & Intel.

Offline minnten

  • Newbie
  • *
  • Posts: 5
Re: building my own dCore-Image
« Reply #2 on: October 01, 2018, 09:27:08 AM »
Hello,

I haven't found such a program in dCore so far. I know the program in TinyCore, but i do not know any similar at dCore.

Minnten

Online core-user

  • Full Member
  • ***
  • Posts: 195
  • Linux since 1999
Re: building my own dCore-Image
« Reply #3 on: October 01, 2018, 09:57:32 AM »
Well, if there isn't, I guess you will need to extract the files from the compressed image, do what needs to be done, & then re compress it.

(Squashfs - if memory serves me right, I'm on my RasPi just now, so can't check)

(Caution - I'd do it on a copy of the file, just in case,)
« Last Edit: October 01, 2018, 09:59:59 AM by core-user »
AMD, ARM, & Intel.

Offline minnten

  • Newbie
  • *
  • Posts: 5
Re: building my own dCore-Image
« Reply #4 on: October 01, 2018, 12:19:56 PM »
Hello,


I already was on this point, my problem is, where to put the tce directory ?
Normally the CD-Image puts it in the RAM and does not include it into the normal folders.


Greetings
Minnten

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: building my own dCore-Image
« Reply #5 on: October 01, 2018, 12:59:27 PM »
/tmp/builtin IIRC, but I don't know if that applies to dcore.
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: building my own dCore-Image
« Reply #6 on: October 01, 2018, 05:23:16 PM »
/tmp/builtin is the correct  location to place already imported SCEs and they will be loaded into RAM and installed. 

Did you use dCore-usbinstall to install to the usb stick?  It does a good job of setting up a TCE directory on the stick and it is located by filesystem label.  And also sets a waitusb command so the TCE directory on the stick is always found.  But placing SCEs in /tmp/builtin loads them the same except is more resource consuming of course. 

For those who don't know how to remaster dCore, below are the scripts I use to pack and unpack images. 

Run with root privileges the following as "dCoreunpack.sh dCore-stretch.gz" or another image name, in the same directory as the gz image:
Code: [Select]
#!/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 -


Run with root privileges the following as "dCorepack.sh dCore-stretch.gz" , in the same directory as the rootfs directory:
Code: [Select]
#!/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 -


« Last Edit: October 01, 2018, 08:33:21 PM by Jason W »

Offline minnten

  • Newbie
  • *
  • Posts: 5
Re: building my own dCore-Image
« Reply #7 on: October 02, 2018, 08:15:47 AM »
I have to thank you many times, without you I would probably still search in the depths of the WWW.

It worked, thanks

@ Jason W: Keep it up, great project

Offline mocore

  • Hero Member
  • *****
  • Posts: 659
  • ~.~
Re: building my own dCore-Image
« Reply #8 on: October 02, 2018, 11:31:15 AM »

I dont think i understand the meaning of
Now I have done tests with an installation on sticks, but they do not work as intended, because I do not get the tce folder cleanly bound.

Do you mean you have aproblem using the "tce=" bootcode ?
eg that  "tce=sdb3"  fails some how ??.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: building my own dCore-Image
« Reply #9 on: October 02, 2018, 04:05:04 PM »
Actually, device naming among USB drives can change across reboots, so using the format "tce=sdb3" may not work every time.  Better to use filesystem label or UUID. 

dCore-usbinstall uses label, and you specify a label for the USB drive in the dCore-usbinstall process and the USB is given that label and it is added to the boot command line.  Very easy and no chance for error in creating the entries in the boot command line.  Below is the entry in the boot file when I just made a dCore-stretch USB, and choosing the name dCore for the label:

append initrd=/dCorestretch.gz quiet waitusb=30:LABEL=dCore rd.udev.log-priority=0 net.ifnames=0 tce=LABEL=dCore/dCore-stretch

« Last Edit: October 02, 2018, 07:32:12 PM by Jason W »