Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: grisxa on September 21, 2010, 07:22:18 AM
-
Hello!
I've found a bug (you may call it mis-feature :) ).
When I boot from CD after TCL has been installed on HDD, system mounts tce folder from that HDD ignoring the same folder on CD.
So I've decided to specify it with boot option 'tce=LABEL=TinyCore/tce'. This volume label ('TinyCore') is created with mkisofs option -V while remastering image.
But such trick doesn't work! As I can see, /sbin/blkid is responsible for disk detection and it checks /etc/blkid.tab cache file which, in turn, doesn't contain records for my CD yet. I don't know why it was not found on cache creation, but if I rebuild it later in find_mountpoint() function, all goes well.
Test case (QEMU with tinycore_3.0.iso as CDROM):
$ /sbin/blkid -lt LABEL=TinyCore -o device
[empty]
$ sudo /sbin/blkid -w /etc/blkid.tab /dev/hd? /dev/sd?
$ /sbin/blkid -lt LABEL=TinyCore -o device
/dev/hdc
Maybe it's a good idea to insert somewhere this blkid -w command? (See my patch).
-
I wouldn't add a call like that, probing a cd drive can take up several seconds. It's especially bad that the patch would add it to find_mountpoint, which can be called many times.
However, if it's the only cd drive, /dev/cdrom should point to it. Try the attached patch, with it you should be able to use "tce=cdrom" or "tce=cdrom/dir".
-
I would not advise to point tce directory to a read only device as many other parts of Tiny Core will be disabled. There are already published means to store and load extensions from cdroms whilst maintaing the availability of a useful tce directory.
-
I would not advise to point tce directory to a read only device as many other parts of Tiny Core will be disabled. There are already published means to store and load extensions from cdroms whilst maintaing the availability of a useful tce directory.
My goal is to load extensions from CD only, because system on HDD sometimes can get broken.
So I would like to avoid mounting tce folder from HDD.
(It's for remastered image of course.)
-
However, if it's the only cd drive, /dev/cdrom should point to it. Try the attached patch, with it you should be able to use "tce=cdrom" or "tce=cdrom/dir".
Thanks, but actually I make a hybrid ISO, which also could be saved on the USB flash.
As I can see, /sbin/blkid is responsible for disk detection and it checks /etc/blkid.tab cache file which, in turn, doesn't contain records for my CD yet. I don't know why it was not found on cache creation, but if I rebuild it later in find_mountpoint() function, all goes well.
After some debugging I've found that initial blkid cache is created (and later is updated) by /usr/sbin/fstype call from /usr/sbin/rebuildfstab with command 'blkid $1'. But fstype is not called for CDROM devices! So my new suggession is to call blkid "$DEVROOT/$DEVNAME" in rebuildfstab just to fill blkid cache with CDROM entry (see patch).
-
Ash does not support &> IIRC, that's a bash addon. Ash would treat that as & >, background and redirect.
-
&> works fine in ash. Just be sure there is no space between th '&' and the '>'.
-
I stand corrected. :)