WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Raspberry Pi / Re: Edimax EW-7811Un Loosing connection during night
« Last post by aug on Today at 01:27:29 AM »
I added
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
into /etc/modprobe.conf and it worked..... ;-)

But i have a other very strange problem with the network
I configure eth0 with
 ifconfig eth0 add 192.168.1.99 up
and then
 ifconfig wlan0 add 192.168.1.2 up

wlan0 is the interface for daily work and eth0 for cases everything goes wrong and is normally not connected. But unless i connect eth0
wlan0 is not working ... very strange
22
xf86-video-intel is a Xorg driver.
23
So I ended up following the rabbit for a while longer; the following is a continuation of the idea of an installation script but is still not complete and should be consider alpha

comments on code etc are welcome, so are bug reports and error checking especially if you can tell me where I went wrong on something.

This is first ever attempt at this kind of script and as of yet it is not done nor feature complete but I need a bit of a respite from it, but it may be helpful to others, and someone might want to polish it out and finish it before I get around to working on it again.

Code: [Select]
#!/bin/sh
#
# Partial installation script for installing Tiny Core Linux onto an LVM
# Created and tested on Core Plus 8.0 x86
# By CowboyEnvy (C) 2017, GNU General Public License version 2
#
# This is given as is without warranty and it is currently INCOMPLETE!
#
# The Goal is to create a standalone LVM installation of Tiny Core Linux
# on an LVM parition without needing an external source for pretce drivers
# This could be done either by remastering the core.gz or creating a second
# initrd image and merging the two at boot time
#
# I have opted for the second option as it seems a little more elegant and
# portable across multiple iterations of TinyCoreLinux
#
# I have attempted to make it is safe as possible and do some error checking
# However it is provided as is and may completely erase your disk even if you are
# Careful
#
# The following script is incomplete and is not completely automatic there
# are several things you will have to do on your own
#
# The remaining Steps are documented in the script, please read the script
# completely before proceeding

echo ""
echo "+-----------------------------------------------------------------------"
echo "| `basename $0` 0.0.2a (c) 2017 by CowBoyEnvy GNU License ver 2.0 "
echo "+-----------------------------------------------------------------------"
echo ""

# Here we check all the command line parameters.

echo "Checking paramaters ..."
for i in $*; do
case $i in
*=*)
case $i in
pv*) PV_PART=${i#*=} ;;
lv*) LV_NAME=${i#*=} ;;
vg*) VG_NAME=${i#*=} ;;
src*) SOURCE_DIR=${i#*=} ;;
tce*) TCE_DIR=${i#*=} ;;
dest*) DESTINATION_DIR=${i#*=} ;;
mount*) MOUNT_PATH=${i#*=} ;;
kernel*) KERNEL_VER=${i#*=} ;;
temp*) TEMP=${i#*=} ;;
size*) LV_SIZE=${i#*=} ;;
esac
;;
*)
case $i in
--install) INSTALL=true ;;
--pause) PAUSE=true ;;
--force) FORCE="-f" ;;
--vgcreate) VGCREATE_=true ;;
--pvcreate) PVCREATE=true ;;
--base) BASE=true ;;
--remaster) REMASTER=true ;;
--format) FORMAT=true ;;
--clean) CLEAN=true ;;
--build) BUIlD=true ;;
--help)  HELP=true ;;
esac
;;
esac
done

PAUSE=true ; #placed here for debugging

##
## Sanity Check
##

## check/set default values

echo "Setting some defaults ..."
[ -z $KERNEL_VER ] && KERNEL_VER=`uname -r` && echo `uname -r`
[ $INSTALL ] && [ -z $DESTINATION_DIR ] && DESTINATION_DIR=/TinyCore
[ $INSTALL ] && [ -z $MOUNT_PATH ] && [ $LV_NAME ] && MOUNT_PATH=/mnt/$LVM_LV_NAME
[ $MOUNT_PATH ] && [ $DESTINATION_DIR ] && DESTINATION_PATH=$MOUNT_PATH/$DESTINATION_DIR
[ -z $TEMP ] && TEMP=/tmp/lvm2

echo "Kernel : $KERNEL_VER"
echo "Desination dir : $DESTINATION_DIR"
echo "Mount Path : $MOUNT_PATH"

## [ $VG_NAME ] && [ $LV_NAME ] && [ $PV_PART ]

[ $PAUSE ] && echo "Parse: Physical Volume, Volume Group, Volume Name"

if [ $VG_NAME ] && [ $LV_NAME ] && [ $PV_PART ] && [ $PV_PART ] && [ -b $PV_PART ] ; then
LVM_DM_BLK=/dev/mapper/$VG_NAME-$LV_NAME
echo "Physical Volume: $PV_PART"
echo "Volume Group   : $VG_NAME"
echo "Logical Volume : $LV_NAME"
echo "Device Mapper  : $LVM_DM_BLK"
elif [ $VG_NAME ] && [ $LV_NAME ] && [ $PV_PART ] ; then
echo "$PV_PART is not a valid block device"
exit
elif [ $VG_NAME ] && [ $LV_NAME ] ; then
LVM_DM_BLK=/dev/mapper/$VG_NAME-$LV_NAME
echo -n "Volume Group   : $VG_NAME"
sudo vgdisplay | grep -q "VG Name *$VG_NAME" && echo "EXISTS!" || echo ""
echo -n "Logical Volume : $LV_NAME"
sudo lvdisplay | grep -q "lv Name *$LV_NAME" && echo "EXISTS!" || echo ""
echo "Device Mapper  : $LVM_DM_BLK"
elif [ $PV_PART ] ; then
[ $VG_NAME ] || echo "Volume Group not specified!"
[ $LV_NAME ] || echo "Logical Volume not specified!"
echo "Syntax error: Physical Volume , Volume Group and Logical Volume must be specified together!"
echo "see $0 --help for more details"
exit
elif [ $VG_NAME ] || [ $LV_NAME ]; then
[ $VG_NAME ] || echo "Volume Group not specified!"
[ $LV_NAME ] || echo "Logical Volume not specified!"
echo "Syntax error: Volume Group and Logical Volume must be specified together!"
echo "see $0 --help for more details"
exit
else
echo ""
fi

[ $SOURCE_DIR ] && KERNEL=`find $SOURCE_DIR/boot/ -regex ".*/vmlinuz.*"`
[ $SOURCE_DIR ] && INITRD=`find $SOURCE_DIR/boot/ -regex ".*/core.*gz"`

if [ $SOURCE_DIR ]; then
if [ -f $KERNEL ] && [ -f $INITRD ]; then
echo "source : $SOURCE_DIR"
echo "Kernel : $KERNEL "
echo "initrd : $INITRD "
elif [ -d $SOURCE_DIR/boot ]; then
echo "source : $SOURCE_DIR"
[ -z $KERNEL ] && echo "Kernel         : NOT FOUND! $KERNEL"
[ -z $INITRD ] && echo "initrd         : NOT FOUND! $INITRD"
exit
elif [ -f $SOURCE_DIR ] || [ -b $SOURCE_DIR ]; then
echo "source : $SOURCE_DIR , is not a valid directory"
exit
else
echo "$SOURCE_DIR : Does not contain a boot directory!!"
exit
fi
elif [ -z $SOURCE_DIR ] && [ -z $INSTALL ] ; then
echo "No Source Specified ... skipping installation"
fi

if [ $TCE_DIR ] && [ -f $TCE_DIR/optional/lvm2.tcz ] ; then
echo "tce source: $TCE_DIR"
elif [ -z $TCE_DIR ]; then
if [ $SOURE_DIR ] && [ -f $SOURCE_DIR/tce/optional/lvm2.tcz ]; then
TCE_DIR=$SOURCE_DIR/tce
echo "tce source: $TCE_DIR"
elif [ $SOURE_DIR ] && [ -f $SOURCE_DIR/cde/optional/lvm2.tcz ]; then
TCE_DIR=$SOURCE_DIR/cde
echo "cde source: $TCE_DIR"
elif [ -z $TCE_DIR ] && [ -d /etc/sysconfig/tcedir ]; then
TCE_DIR=/etc/sysconfig/tcedir
echo "tce dfault: $TCE_DIR"
else
echo "No Valid TCE/CDE source located."
echo "Please specify a valid TCE/cde location with tce=TCE_SOURCE"
exit
fi
elif [ -f $TCE_DIR/optional/lvm2 ]; then
echo "tce source: $TCE_DIR"
elif [ -d $TCE_DIR/optional ]; then
echo "tce source: $TCE_DIR : lvm2.tcz NOT found!"
exit
elif [ -d $TCE_DIR ]; then
echo "tce source: $TCE_DIR/optional is not a valid directory"
exit
else
echo "tce source: $TCE_DIR is not a valid directory"
exit
fi

[ $MOUNT_PATH ] && mount | grep -qE "^/dev/.+$MOUNT_PATH.+[(]rw," && MOUNT_RW=true || MOUNT_RW=
[ -b $LVM_DM_BLK ] && NO_DM_BLK= || NO_DM_BLK=true

if [ $CLEAN ] && [ $MOUNT_RW ]; then
[ -$TEMP ] && [ -d $TEMP ] && rm -r $TEMP && echo "... Removing Temporary Files ... $TEMP"
[ $DESTINATION_PATH ] && [ -d $DESTINATION_PATH ] && sudo rm -rf `ls $DESTINATION_PATH` && echo " ... Removing directory tree ... $DESTINATION_PATH "
[ $MOUNT_PATH ] && [ -d $MOUNT_PATH ] && sudo umount $MOUNT_PATH >& /dev/null && echo $MOUNT_PATH
[ $MOUNT_PATH ] && [ -d $MOUNT_PATH ] && sudo rm -r $MOUNT_PATH
elif [ $CLEAN ] && [ $NO_DM_BLK ]; then
echo " ... $LVM_DM_BLK does not exist ... cleaning temp files"
[ $TEMP ] && [ -d $TEMP ] && rm -rf $TEMP && echo "... Removing Temporary Files ... $TEMP"
[ $MOUNT_PATH ] && [ -d $MOUNT_PATH ] && sudo rm -r $MOUNT_PATH
elif [ $CLEAN ] && [ -d $TEMP ]; then
[ $TEMP ] &&  [ -d $TEMP ] && rm -rf $TEMP && echo "... Removing Temporary Files ... $TEMP"
[ $MOUNT_PATH ] && [ -d $MOUNT_PATH ] && sudo rm -r $MOUNT_PATH
fi

[ $CLEAN ] && [ $PAUSE ] && echo "Press <ENTER> to continue" && read junk

if [ $MOUNT_PATH ] && [ -d MOUNT_PATH ] && [ -z FORCE ]; then
echo "$MOUNT_PATH , is an exsiting directory"
echo "Please do one of the following three options"
echo "Specify a new directory to be used"
echo "use --force to proceed anyway and overwrite destination files"
echo "use --force and --clean to remove the directory and it's children before proceeding"
exit
elif [ $MOUNT_PATH ] && [ -d `echo "$MOUNT_PATH" | sed 's|\(.*\)/.*|\1|' ` ]; then
echo -n "Mount path : $MOUNT_PATH"
echo " ... Parent Directory Found "
echo "$MOUNT_PATH" | sed 's|\(.*\)/.*|\1|'
[ -d $MOUNT_PATH ] || mkdir $MOUNT_PATH
fi

if [ $TEMP ] && [ -d $TEMP ] && [ -z $FORCE ]; then
echo "$TEMP , is an exsiting directory"
echo "Please do one of the folow three options"
echo "Specify a new directory to be used"
echo "use --force to proceed anyway and overwrite destination files"
echo "use -clean to remove the directory and it's children before proceeding"
exit
elif [ -d `echo "$TEMP" | sed 's|\(.*\)/.*|\1|' ` ] ; then
echo -n "Temp folder : $TEMP"
echo " ... Parent Directory Found "
echo "$TEMP" | sed 's|\(.*\)/.*|\1|'
[ $TEMP ] || mkdir $TEMP
fi

echo DESTINATION_PATH=$DESTINATION_PATH
echo LV_SIZE=$LV_SIZE
 
##
## Load required TCE extensions to complete install
## We will need LVM2.tcz as well as advcomp to complete the initrd build process
##

[ -f /usr/local/tce.installed/lvm2 ] || tce-load -iw lvm2.tcz
[ -f /usr/local/tce.installed/advcomp ] || tce-load -iw advcomp

##
## you will need lvm2.tcz and it's dep (including .dep files)
## you need an onboot.lst to tell core what files to load
## you will also need onpre.sh as an executable file to run a script
## to activate your Logical Volumes
##

if [ $TEMP ] ; then
## Build the pretce directory structure if it does not exist

[ -d $TEMP ] || mkdir $TEMP
[ -d $TEMP/tmp ] || mkdir $TEMP/tmp
[ -d $TEMP/tmp/tce ] || mkdir $TEMP/tmp/tce
[ -d $TEMP/tmp/tce/optional ] || mkdir $TEMP/tmp/tce/optional

## Transfer all needed tcz .dep and md5.txt files
cd $TCE_DIR/optional ; cp `ls glib2* libdevmapper* libffi* liblvm2* lvm2* ncurses* raid-dm-* readline* udev-lib*` $TEMP/tmp/tce/optional/
cd $TEMP ; echo $PWD
! [ -f tmp/onpre.sh ] && echo  "#!/bin/sh " > tmp/onpre.sh
echo "vgchange -ay ; wait 2" >> tmp/onpre.sh
chmod 755 $TEMP/tmp/onpre.sh
! [ -f tmp/onpre.sh ] && echo "lvm2.tcz" > tmp/tce/onboot.lst
[ -f tmp/onpre.sh ] && echo "lvm2.tcz" >> tmp/tce/onboot.lst
##
## This is a standard build process for building initrd images,
## We are only creating an appending file to extend core.gz
## you will need both core.gz and lvm2.gz to boot your system
## The process can be modified slightly to create a single core-lvm2.gz initrd
##

sudo find | sudo cpio -o -H newc | gzip -11 > ../lvm2.gz
advdef -z4 ../lvm2.gz
fi

## Then if  you do not already have a Volume group you wish to add
## TinyCoreLinux to you will need to create both a physical volume
## and a volume group before you can create a logical volume for
## Tiny Core Linux
##
## A Physical volume is either a GPT or MSDOS mbr partition of
## type 8e you can manually create one using fdisk PHYSICAL_DEVICE
##
## Once you have a Physical Volume you will need to initalize it
## you can do so by executing the following command
##

if [ $PVCREATE ] && [ $FORCE ] && [ -b $PV_PART ] && [ $VG_NAME ] && [ $LV_NAME ]; then
echo ""
echo "The next Step will initialize a PV, erasing information on that parition"
echo "Assuming you have entered:"
echo
echo "$0 --pvcreate --force pv=PHYSICAL_DEVICE vg=VOLUME_GROUP lv=LOGICAL_VOLUME"
echo
echo "it might just be simpler to type sudo pvcreate PHYSICAL_DEVICE"
echo "or press ctrl+c to terminate the script"
echo "Press <ENTER> to continue" && read junk
echo sudo pvcreate $PV_PART
fi

## It might be easier just to type:
## sudo pvcreate PHYSICAL_DEVICE

##
## Mark logical volumes active so they can be used by tinycore
## Once marked active they will be automatically mapped by Tiny Core
## Linux they may also have /mnt directories created for them
##

if [ $LVM_DM_BLK ]; then
echo "Checking for $LVM_DM_BLK ..."
[ -b $LVM_DM_BLK ] || sudo vgchange -ay
[ $PAUSE ] && echo "Press <ENTER> to continue" && read junk
fi


##
## Once you have a physical device you will need to create a Volume Group
## the Volume group can be extended across multple partitions and disk
## However for simplicity the basic configuarion is a single partition
## uncomment the following line at your own risk, or execute the command
##
## sudo vgcreate $VG_NAME $PV_PART

if ! `sudo vgdisplay | grep -qe "  VG Name.*$VG_NAME"` && [ -b $PV_PART ] && [ $VGCREATE ] ; then
[ $LV_SIZE ] && echo sudo lvcreate -n $LV_NAME -L $LV_SIZE $VG_NAME
[ $PAUSE ] && echo "Press <ENTER> to continue" && read junk
fi

##
## The following command will check to see if there is a mapper device already
## loaded and if it is not found will attempt to create your Logical Volume
##
if ! `sudo lvdisplay | grep -qe "  LV Name.*$LV_NAME"` && `sudo vgdisplay | grep -qe "  VG Name.*$VG_NAME"`; then
[ $LV_SIZE ] && echo sudo lvcreate -n $LV_NAME -L $LV_SIZE $VG_NAME
[ $PAUSE ] && echo "Press <ENTER> to continue" && read junk
FORMAT=true
fi

##
## The next step is to create the file system on the LV, we can do so by executing the
## following command, it should promp before overwriting and existing file system
## however it has been commented out for additional safety
##

[ FORMAT ] && mkfs.ext4 $LVM_DM_BLK

##
## Create Know Directory to work with and mount the files system
## it just seems easier to create a specific mount instead of trying to figure
## how to identify which /mnt/dm-# directory to use
##
## Also create the base tce structure
[ $PAUSE ] && echo "Press <ENTER> to continue" && read junk

! [ -d $MOUNT_PATH ] && [ $MOUNT_PATH ] sudo mkdir $MOUNT_PATH && echo " ... Creating Mount Path $MOUNT_PATH"
! `mount | grep -qe ".*$MOUNT_PATH.*"` && [ $LVM_DM_BLK ] && sudo mount $LVM_DM_BLK $MOUNT_PATH && echo "Mounting : $LVM_DM_BLK : $MOUNT_PATH"
! [ -d $DESTINATION_PATH ] && `mount | grep -qe ".*$MOUNT_PATH.*"` && sudo mkdir $DESTINATION_PATH $DESTINATION_PATH/tce

##
## Copy Core files and extensions to new LVM volume
## I'm trying to get everything here, it's probably over kill
##

if [ DESTINATION_DIR ] && [ -d $DESTINATION_PATH ] && `mount | grep -qe ".*$MOUNT_PATH.*"` ; then
sudo chown -R $USER:staff $DESTINATION_PATH
[ -d $SOURCE_DIR/boot ] && cp -rf $SOURCE_DIR/boot $DESTINATION_PATH
[ -d $SOURCE_DIR/tce ] && for file in `ls $SOURCE_DIR/tce` ; do cp -Rf $SOURCE_DIR/tce/$file $DESTINATION_PATH/tce ; done
[ -d $SOURCE_DIR/cde ] && for file in `ls $SOURCE_DIR/cde` ; do cp -Rf $SOURCE_DIR/cde/$file $DESTINATION_PATH/tce ; done
[ -d /tmp/tce ] && for file in `ls /tmp/tce` ; do cp -Rf /tmp/tce/$file $DESTINATION_PATH/tce ; done

[ $PAUSE ] && echo "Press <ENTER> to continue" && read junk
sudo cp ../lvm2.gz $DESTINATION_PATH/boot/
fi


echo "You will need the following UUID to configure your bootloader"
blkid -s UUID $LVM_DM_BLK

##
## good luck!
##

24


Should Xfbdev.tcz be included in the dep of this extension?

There are 3 X servers in TC:
Xvesa, Xfbdev, Xorg
Xvesa only works on 32-bit system.
Xfbdev crashes on some hardware.
Xorg is the biggest.


Correct but doesn't xf86-video-intel use only Xfbdev? Or can it communicate with at least one other xserver?

Also what about Nano-X it seems to be a fourth Xserver although likely not relevant to the discussion.

Tiny core is stripped so it is making me learn a lot, it's a fun challenge but I keep loosing myself down rabbit holes.



Sent from my SM-G930V using Tapatalk

25
Should Xfbdev.tcz be included in the dep of this extension?

There are 3 X servers in TC:
Xvesa, Xfbdev, Xorg
Xvesa only works on 32-bit system.
Xfbdev crashes on some hardware.
Xorg is the biggest.

Quote
on a similar note should Xlibs.tcz be included with Xfbdev.tcz as Xlibs.tcz is needed for startx as well?

Not sure about that.
26
General TC Talk / Re: Best Adobe photoshop alternate for tinycore
« Last post by malikawan on June 21, 2017, 08:11:31 PM »
Thanks Juanito
27
TCE Bugs / Re: firefox-ESR
« Last post by tcFan on June 21, 2017, 03:42:15 PM »
Thanks man.

Maybe APPS could have a reminder to upgrade everything after a fresh install. : -)
28
TCE Bugs / dbus not starting?
« Last post by tcFan on June 21, 2017, 03:40:14 PM »
hello,

trying to follow the wiki instructions for loading PulseAudio, it seems I can't get dbus to start.

Everything else is working, if I load pulseaudio by sudo and with the --system flag it can even play video music from within Firefox, and get controls through pavucontrol, etc.

I'd like to run it "properly" though. I place the "dbus-launch" script on .X.d/dbus but nothing happens (status returns negative), chmod the file into an executable, also nothing. I do make sure to back it up. Placed dbus.tcz onboot.lst, at the top, as well. Any ideas please?

Edit: Do I have to place something at bootlocal.sh?
29
TinyCorePure64 8.0

Title:          xf86-video-intel.tcz
Description:    xorg intel video driver
Version:        20170216
Extension_by:   juanito

Should Xfbdev.tcz be included in the dep of this extension?
I know I need to include Xfbdev.tcz in onboot.lst in order for startx  to find an xserver

it seems logical then to have Xfbdev be listed in the dependencies?
what about the other xf86-video-CHIPSET.tcz packages?

Title:          Xfbdev.tcz
Description:    X framebuffer
Version:        1.3.0
Extension_by:   juanito

on a similar note should Xlibs.tcz be included with Xfbdev.tcz as Xlibs.tcz is needed for startx as well?

Are they excluded for a specific reason?
Are there use cases where you would not want them included?

I'm not familiar enough with X
Thoughts comments?
30
TCE Talk / QtWeb missing dependencies
« Last post by cowboyenvy on June 21, 2017, 10:21:32 AM »
Title:          QtWeb.tcz
Description:    QtWeb Portable Web Browser
Version:        3.8.5
Extension_by:   nitram
TinyCore 8.0

extension QtWeb.tcz has no .dep file it should have:

Code: [Select]
fontconfig.tcz
[/conde]
Pages: 1 2 [3] 4 5 ... 10