WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tinycorelinux as Xen PV domu?  (Read 5056 times)

Offline halma

  • Full Member
  • ***
  • Posts: 164
tinycorelinux as Xen PV domu?
« on: August 27, 2014, 03:23:05 AM »
hi

has someone successfull running Tinycorelinux as a Xen PV (Paravirtualized) domu? and maybe can provide the config too ? :)

i tried but it stop at booting as you can see on the attached screenshot

and thats my config
Code: [Select]
# Kernel paths for install
kernel = "/home/xendomains/tctest/vmlinux"
ramdisk = '/home/xendomains/tctest/corepure64-3.gz'
extra='console=hvc0 root=/dev/xvda1 waitusb=5 root=UUID=3c087998-32cb-4f37-b0cb-12bfabc98d5c tce=xvda1 home=xvda1 opt=xvda1'

# Path to HDD and iso file
disk = [
        'format=raw, vdev=xvda, access=w, target=/home/xendomains/tctest/disk.img',
        'format=raw, vdev=xvdc, access=r, devtype=cdrom, target=/home/xendomains/tctest/TinyCore-5.3.iso'
       ]

# Network configuration
#vif = ['bridge=br0']

# DomU settings
memory = 512
name = "alpine"
vcpus = 1
maxvcpus = 1
boot="d"

best regards
Halma
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tinycorelinux as Xen PV domu?
« Reply #1 on: August 27, 2014, 07:30:23 AM »
I suspect you are running out of entropy.

Try adding the "nozswap" boot option.
« Last Edit: August 27, 2014, 07:52:45 AM by gerald_clark »

Offline halma

  • Full Member
  • ***
  • Posts: 164
Re: tinycorelinux as Xen PV domu?
« Reply #2 on: August 27, 2014, 08:48:03 AM »
after some researching and testing i come to the result that you have to modify some file to work correctly with xen as a domu

the "rootfs" needs some modifications, i took the corepure64.gz and extracted it with zcat/cpio, then into the "/etc" folder
modify /etc/inittab and add line "hvc0::respawn:/sbin/getty -nl /sbin/autologin 38400 hvc0" under the line "tty1::respawn:/sbin/getty -nl /sbin/autologin 38400 tty1" save it.

/etc/inittab
Code: [Select]
# /etc/inittab: init configuration for busybox init.
# Boot-time system configuration/initialization script.
#
::sysinit:/etc/init.d/rcS

# /sbin/getty respawn shell invocations for selected ttys.
tty1::respawn:/sbin/getty -nl /sbin/autologin 38400 tty1
hvc0::respawn:/sbin/getty -nl /sbin/autologin 38400 hvc0
#tty2::respawn:/sbin/getty 38400 tty2
#tty3::respawn:/sbin/getty 38400 tty3
#tty4::askfirst:/sbin/getty 38400 tty4
#tty5::askfirst:/sbin/getty 38400 tty5
#tty6::askfirst:/sbin/getty 38400 tty6

# Stuff to do when restarting the init
# process, or before rebooting.
::restart:/etc/init.d/rc.shutdown
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/etc/init.d/rc.shutdown

the second file under "/etc" modify /etc/securetty and add "hvc0 and xvc0 directly under each other under "console"

/etc/securetty
Code: [Select]
# /etc/securetty: List of terminals on which root is allowed to login.
#
console
hvc0
xvc0
# For people with serial port consoles
# ttyS0

# Standard consoles
tty1
tty2
tty3
tty4
tty5
tty6
tty7

after you have done modify the both files just zip it again back with cpio / advdef and have phun :)

and my domu xen config:
Code: [Select]
# Kernel paths for install
kernel = "/home/xendomains/tctest/vmlinuz64"
ramdisk = '/home/xendomains/tctest/corepure64.gz'

extra="console=tty xencons=tty nousb nortc nodhcp norestore noswap noutc nofstab nozswwap"

# Path to HDD and iso file
#disk = [
#        'format=raw, vdev=xvda, access=w, target=/home/xendomains/tctest/disk.img',
#        'format=raw, vdev=xvdd, access=r, devtype=cdrom, target=/home/xendomains/tctest/TinyCore-5.3.iso'
#       ]
disk = [ 'file:/home/xendomains/tctest/TinyCore-5.3.iso,xvdc:cdrom,r','file:/home/xendomains/tctest/disk.img,xvda,w' ]


# Network configuration
#vif = ['bridge=br0']

# DomU settings
memory = 512
name = "tc"
vcpus = 1
maxvcpus = 1

so far i can now run TC as PV (Paravirtualized) domU ... great stuff :)
best regards
« Last Edit: August 27, 2014, 08:52:35 AM by halma »
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline halma

  • Full Member
  • ***
  • Posts: 164
Re: tinycorelinux as Xen PV domu?
« Reply #3 on: September 03, 2015, 08:28:40 AM »
just for my memories:
*uncompressing on Debian
Code: [Select]
cpio -idv < corepure64.gz
*compress the files on Debian: (may need sudo apt-get install advancecomp)

inside the folder of the extracted files do:

Code: [Select]
sudo find | sudo cpio -o -H newc | gzip -9 > ../core.gz
cd ..
advdef -z4 core.gz
« Last Edit: September 03, 2015, 08:33:39 AM by halma »
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline halma

  • Full Member
  • ***
  • Posts: 164
Re: tinycorelinux as Xen PV domu?
« Reply #4 on: October 14, 2015, 05:41:16 AM »
a small shell script what will do the work

Code: [Select]
#!/bin/sh


#This little script will fix the hold on "nonblocking pool is initialized hangs on boot"
#Problem, on tinycorelinux, running as xen domain!
#
# You need to run this scrit with "sudo"
#
#(C)Halma 14.Okt. 2015

#place here the original file core.gz or corepure64.gz
filename=core.gz



##################################################################
##################################################################
##################################################################
PWD=$(pwd)
tmpfolder=tmpfolder

#remove old stuff
[ -d "$PWD/$tmpfolder" ] && rm -rf $PWD/$tmpfolder
[ -f "$PWD/${filename%.*}" ] && rm -rf $PWD/${filename%.*}

#create tmpfolder
mkdir $PWD/$tmpfolder
cd $PWD/$tmpfolder

#unzip all
gunzip ../$filename
cpio -idv < ../${filename%.*}

#modify stuff
echo "hvc0::respawn:/sbin/getty -nl /sbin/autologin 38400 hvc0" >> $PWD/etc/inittab
echo "hvc0" >> $PWD/etc/securetty
echo "xvc0" >> $PWD/etc/securetty

#zip all
sudo find | sudo cpio -o -H newc | gzip -9 > ../${filename%.*}-xen.gz
cd ..
advdef -z4 ${filename%.*}-xen.gz

#remove old stuff
[ -d "$PWD/$tmpfolder" ] && rm -rf $PWD/$tmpfolder
[ -f "$PWD/${filename%.*}" ] && rm -rf $PWD/${filename%.*}
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol