Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: AlejandroPadrino on February 17, 2012, 04:38:08 AM
-
Hello, is there any way to identify the cdrom unit from where TinyCore Linux 4.1 is loaded? I want to load some .tcz packages automatically from TinyCore cdrom.
Thank you.
-
Loop all cd drives, or perhaps check the cd label.
-
If you want to change what the cd loads automatically, you will have to remaster the cd, or create a persistent store on your hard drive.
-
Hello, is there any way to identify the cdrom unit from where TinyCore Linux 4.1 is loaded? I want to load some .tcz packages automatically from TinyCore cdrom.
Thank you.
Use the cde directory as that is what it is designed to perform. See release notes for Core 4.2
The tce directory needs to be on a writable store. Having it on a cdrom effectively breaks Core.
-
Curaga, how to loop all cd drives?
Roberts, I was try TinyCore 4.2.1. It haves a boot error and only goes to console.
Thank you for all replies.
-
That's a bash scripting question, really.
for i in /mnt/sr*; do
#something
done
-
Thank you, Curaga. But, to identify cdrom drive can be next ...?
set cddrive=/mnt/sr$i
How to do?
-
for i in /mnt/sr*; do
echo $i
done
-
Hi AlejandroPadrino
This should give you a baseline to get you started:
#!/bin/sh
LABEL="MultiCore"
CDROM=""
for i in `cat /etc/sysconfig/cdroms` # Loop through all the CD drives on the machine
do
CDROM=`blkid $i | grep $LABEL` # Search for the CDs label
if [ -n "$CDROM" ] # was the label found?
then # Yes
i=`echo $i | cut -c5-` # Remove /dev from string
CDROM=/mnt$i # Prefix the string with /mnt
break
else # CD label was not found
CDROM="Not found."
fi
done
echo $CDROM
Since I am not proficient at scripting, this should not be taken as the best way to do this, it does work though.