WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Recent Posts

Pages: 1 ... 8 9 [10]
91
Off-Topic - Tiny Core Lounge / Re: $7 computer
« Last post by hiro on July 22, 2014, 10:09:55 AM »
i didn't know they have any possibility to add a display? where do you see that?
92
Off-Topic - Tiny Core Lounge / Re: $7 computer
« Last post by cast-fish on July 22, 2014, 09:23:24 AM »
appartenly....if you order one....but use it's official proper name ___ Pogoplug BLACK or "m1" name or something....they actually send you a Pogoplug e02 version....which is the upgraded model with 1.2ghz marvel soc and 256 ram.  (for 7 dollars)

93
Off-Topic - Tiny Core Lounge / Re: $7 computer
« Last post by cast-fish on July 22, 2014, 09:21:22 AM »
ye

 i think the "mobile" version was disscontinued....but large retailers like amazon may have 10's of thousands stored...

will maybe get one...because you can leave it plugged in at home to your router.....and it's a great NAS or "remote desktop computer"....

V
94
Off-Topic - Tiny Core Lounge / Re: $7 computer
« Last post by cast-fish on July 22, 2014, 09:18:10 AM »
ye, the official web site is irrelevant.


They cost $7 with shipping.

You can install a "window manager" also...like XFCE....they are nice full blown linux computers.

THey also perform nicely, as intended...the Pogoplug NAS idea.

To use them as a dekstop computer, you need to "remote desktop connect" to them from some other laptop or internet connected cafe computer.

This computer would service many needs of regular people like social networks, web browsing
listening to streaming internet radio (via a USB soundcard)

V
95
thanks mainmachine, am glad someone found it useful. 

Finally got around to making an extension based on this script, am submitting " core-remaster.tcz "  asap to both x86 & x86_64 repo's
(remember it's intended for minor modifications of core.gz, corepure64.gz, modules*.gz, or rootfs*.gz only)


here is the final script
Code: [Select]
#!/bin/sh
# Author coreplayer2
# date 07/12/14

. /etc/init.d/tc-functions

# requires a connection to download advcomp.tcz if not found locally


################################################################

##draw at full screen width a line in blue ( use xy=(line#) for row position )
f_line() {
wide=`stty size | cut -d" " -f2`
printf "\033["$xy";0H${BLUE}"
printf '%*s\n' "$(( wide-1 ))" '' | tr ' ' =
printf "${NORMAL}"
}

f_cleanup() {
sudo rm -rf /tmp/core_extract
sudo rm -rf /tmp/core_package
}

f_extract() {
# prepare directories
mkdir -p /tmp/core_extract
mkdir -p /tmp/core_package

#extract core*.gz
cd /tmp/core_extract && zcat /tmp/$mycore | $user cpio -i -H newc -d
}

f_repack() {
cd /tmp/core_extract

#update modules list
$user depmod -a -b /tmp/core_extract `uname -r`

#re-package and compress new core*gz
$user find | $user cpio -o -H newc | $user gzip -2 > /tmp/core_package/$mycore
$user advdef -z4 /tmp/core_package/$mycore
}

f_chkconn(){
echo "${MAGENTA}Testing connection to server, please wait...${NORMAL}"
busybox wget -s -T 20 http://tinycorelinux.net/index.html
case $? in
0) echo "${GREEN}connection ok${NORMAL}"; cx=0;;
1) echo "${YELLOW}check internet connection, then try again${NORMAL}"; sleep 5; cx=1;;
esac
}

################################################################
##main script

trap 'f_cleanup ; trap 2 ; kill -2 $$' 1 2 3 13 15
##install advcomp dep
if [ ! -e /usr/local/tce.installed/advcomp ]; then
      tce-load -i advcomp
fi
if [ ! -e /usr/local/tce.installed/advcomp ]; then
  f_chkconn
    if [ "x$cx" == x0 ]; then
      echo -e " ${BLUE}fetching missing dependancy${NORMAL} "
      tce-load -wil advcomp
    fi
fi
if [ ! -e /usr/local/tce.installed/advcomp ]; then
 echo -e " ${YELLOW}Dependancy not found, exiting...${NORMAL} "
 sleep 5
 exit
fi

clear
printf "\033[1;2H${MAGENTA}core.gz remaster${NORMAL} "
xy=2
f_line

cat <<-info
 To extract then re-package core.gz,
 core64.gz, module.gz or corepure64.gz

 First copy core*.gz to /tmp directory then

 To extract
 Select "E" when prompted

 To repackage
 run this script again
 Select "P" when prompted

 Notes
 1. When repackaging a x86_64 core/module.gz, use this script
    on same architecture (booted to core64 or corepure64)

 2. Extracting will remove any previously extracted
    /tmp/core_extract working directories

info
read -p "${CYAN} Enter ${NORMAL}when ready to continue, or ${YELLOW}Ctrl+C ${NORMAL}to quit "


[ `/usr/bin/id -u` -ne 0 ] && user=sudo


if [ -e /tmp/core_package/*.gz ]; then
echo -e "\n ${YELLOW}re-packaged core/module.gz exists already, "
read -n1 -p " Delete and startover..? ${WHITE}(${MAGENTA}y${NORMAL}/${MAGENTA}n${WHITE}) " yn
case $yn in
[yY] ) f_cleanup;;
[nN] ) echo -e "\n exiting.."; sleep 2; exit;;
esac
fi

##test for 1 working archive in /tmp dir
archive=$(find /tmp -maxdepth 1 -name "*.gz" | wc -l)
if [ x"$archive" == x0 ]; then
 clear
 printf "\033[2;4H${MAGENTA}Archives found = ${YELLOW}$archive${NORMAL} "
 xy=3
 f_line
 printf "\033[4;4H${YELLOW}Archive not found, \n   ${NORMAL}Please copy core/module*.gz to /tmp directory and try again\n\n "
 read -p "  ${CYAN}Enter ${NORMAL}when ready to exit "
 exit
elif [ x"$archive" != x0 -a x"$archive" != x1 ]; then
 clear
 printf "\033[2;4H${MAGENTA}Archives found = ${YELLOW}$archive${NORMAL}\n "
 xy=3
 f_line
 printf "\033[4;4H${YELLOW}Only 1 expected\n   ${NORMAL}Please remove unneeded core-module*.gz copies from /tmp directory and try again\n\n "
 read -p "  ${CYAN}Enter ${NORMAL}when ready to exit "
 exit
fi


mycore=$($user find /tmp -maxdepth 1 -name "*.gz")
mycore=${mycore##*/}

##Extract or RePackage
if [ -d /tmp/core_extract ]; then
clear
printf "\033[2;4H${MAGENTA}Processing ${WHITE}$mycore${NORMAL} "
xy=3
f_line

## Extract or package choice
printf "\033[5;4H${BLUE}Choose ${WHITE}(${MAGENTA}P${NORMAL}/${MAGENTA}p${WHITE})${BLUE} to re-Package, or"
printf "\033[6;4HChoose ${WHITE}(${MAGENTA}E${NORMAL}/${MAGENTA}e${WHITE})${BLUE} to startover and Extract, or${NORMAL} "
printf "\033[7;4H${YELLOW}Ctrl+C ${NORMAL}to quit \n\n"

while [ "$ep" != [ep] ]; do
read -s -n1 -p "" ep

case $ep in
[Ee] )
echo -e "${BLUE} Extracting ${WHITE}$mycore${NORMAL} \n"
f_cleanup
set -x
f_extract
set +x
echo -e "\n${WHITE} $mycore ${BLUE}extract completed${NORMAL} \n\n when ready, run this script again with ${MAGENTA}P${NORMAL} option to re-Package \n"
read -p "${CYAN} Enter ${NORMAL}when ready to exit "
exit
;;

[Pp] )
    if [ -d /tmp/core_extract ]; then

echo -e "${BLUE}RePacking ${WHITE}$mycore ${BLUE}please wait...${NORMAL} \n"
set -x
f_repack
set +x
echo -e "\n${WHITE} $mycore ${BLUE}repackage complete${NORMAL} "
sudo rm -rf /tmp/core_extract
echo -e "\n re-packaged $mycore can be found in /tmp/core_package/$mycore \n"
read -p "${CYAN} Enter ${NORMAL}when ready to exit "
exit
    else
echo -e "\n${RED} Invalid option selected \n No working \"Extracted directory\" found, exiting... ${NORMAL} "
sleep 3

    fi

;;

* )
echo -e "Key not supported, please try again "
;;

esac
done
else
clear
printf "\033[2;4H${MAGENTA}Processing ${WHITE}$mycore${NORMAL} "
xy=3
f_line

## Extract or package choice
printf "\033[5;4H${BLUE}Choose ${WHITE}(${MAGENTA}E${NORMAL}/${MAGENTA}e${WHITE})${BLUE} to Extract archive, or${NORMAL} "
printf "\033[6;4H${YELLOW}Ctrl+C ${NORMAL}to quit \n\n"

while [ "$e" != e ]; do
read -s -n1 -p "" e

case $e in
[Ee] )
echo -e "${BLUE} Extracting ${WHITE}$mycore${NORMAL} \n"
f_cleanup
set -x
f_extract
set +x
echo -e "\n${WHITE} $mycore ${BLUE}extract completed${NORMAL} \n\n when ready, run this script again with ${MAGENTA}P${NORMAL} option to re-Package \n"
read -p "${CYAN} Enter ${NORMAL}when ready to exit "
exit
;;


* )
echo -e "Key not supported, please try again "
;;

esac
done
fi

exit
96
Hi onelife
First thing to remember, there is no such thing as failsafe. All you can do is try to make a system as robust as possible and minimize
the windows of opportunity for a failure.
Quote
... but this would mean I need to add the md5 check element to the filetool.sh script right?
Not necessarily. You could call the filetool.sh script from the shutdown script and then generate the MD5 from there.
Quote
... there's still no way of knowing if the filetool.sh process was completed 100%?
The script outputs the word  failed  if it fails.
97
Hi Rich,

Thanks for that - Sounds fab! but please excuse my possibly silly question, but this would mean I need to add the md5 check element to the filetool.sh script right? I think this must be the case as otherwise, there's still no way of knowing if the filetool.sh process was completed 100%? Or am I missing something. IOW, you can't md5 checksum a backup that you don't know for 100% sure completed successfully.

*** updated thought ***

After looking at the filetool.sh script - Another maybe silly thought, surely if the backup process was run to create say for example "mydata_new.tgz" file and then only AFTER the tar has completed, do the "mv -f" to move the current mydata.tgz > mydatabk.tgz and THEN mydata_new.tgz > mydata.tgz. - Just a thought as at the moment I see the "mv -f" happens before the new backup has actually been taken and I guess that's where the "danger window" occurs.

Thanks again for your help - Much appreciated!
98
TCE Talk / Re: new linux_api_headers ...something is wrong
« Last post by Rich on July 22, 2014, 05:34:56 AM »
Hi halma
Please use  Code  tags when posting the output of commands. This will automatically result in a scrollbox for long outputs.
99
Hi onelife
After running a backup generate a MD5 file of it. If the backup doesn't complete. the MD5 file won't match on the next reboot. Modify
the bootsync.sh file to check if the MD5 file matches.
If it doesn't, copy the backup file and MD5 over the originals and reboot (use cp and not mv).
If it does, copy the current backup and MD5 over the previous version.
You will need to remaster to modify the bootsync.sh file since these changes can't be part of the backup for obvious reasons.
You should also add a test to see if both backup files exist. If they don't, allow the boot to complete so they can be created.
100
TCB Q&A Forum / Re: tinycore | microcore
« Last post by Greg Erskine on July 22, 2014, 04:58:57 AM »
Hi halma,

I asked a similar question...it was answered here.

http://forum.tinycorelinux.net/index.php/topic,17205.msg103251.html#msg103251

regards
Pages: 1 ... 8 9 [10]