Tiny Core Linux
General TC => Tiny Core on Virtual Machines => Topic started by: halma on August 27, 2014, 06: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
# 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
-
I suspect you are running out of entropy.
Try adding the "nozswap" boot option.
-
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
# /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
# /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:
# 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
-
just for my memories:
*uncompressing on Debian
cpio -idv < corepure64.gz
*compress the files on Debian: (may need sudo apt-get install advancecomp)
inside the folder of the extracted files do:
sudo find | sudo cpio -o -H newc | gzip -9 > ../core.gz
cd ..
advdef -z4 core.gz
-
a small shell script what will do the work
#!/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%.*}