Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: dufus on December 07, 2010, 11:36:35 AM
-
Just a spurious thought here. If you guys are working inside rebuildfstab, it sure would be nice (for `ol dufus a least) if it would probe for mounted ram drives and add them. If it already does probe, please disregard this post ( you're all going to fast for me to keep up with).
-
I'd say to mount/umount ramdisks (if that is what you mean by "ram drives") seems kind of redundant, when TC by default runs in a tmpfs (which I think has a max. size of 90% of usable RAM.
Except if you have a certain usage in mind which might have benefits I might have overlooked.
-
@dufus
Could you explain how it would be useful to add already mounted ramdisks to fstab? They're gone after a reboot, and AFAIK formatting one does not cause an udev event (so rebuildfstab wouldn't run on such a time, only after the next "proper device" event).
-
While we are on rebuildfstab, please include the following:
if ntfs-3g is installed replace the "ntfs" filesystem type with "ntfs-3g", so that write access is possible just by mounting without any big hassle.
-
if ntfs-3g is installed replace the "ntfs" filesystem type with "ntfs-3g", so that write access is possible just by mounting without any big hassle.
I'd support that request, but I'd like to suggest a minor enhancement of it: Have a check in the startup script of the 'ntfs-3g.tcz' extensions which forces a re-run of 'rebuildfstab' if any 'ntfs' file systems are already in '/etc/fstab'.
The impact of this variation should be that as soon as 'ntfs-3g.tcz' is installed all NTFS file systems become tagged with 'ntfs-3g' in '/etc/fstab'.
-
While we are on rebuildfstab, please include the following:
if ntfs-3g is installed replace the "ntfs" filesystem type with "ntfs-3g", so that write access is possible just by mounting without any big hassle.
+1
-
What would be the impact if ntfs partitions would already be mounted either with any of the ntfs or ntfsmount drivers?
-
Have a check in the startup script of the 'ntfs-3g.tcz' extensions which forces a re-run of 'rebuildfstab' if any 'ntfs' file systems are already in '/etc/fstab'.
How about the other way round: ntfs-3g will call rebuildfstab on load via /usr/local/tce.installed/ntfs-3g ? Easier to implement and the call will be done at the right time.
-
Have a check in the startup script of the 'ntfs-3g.tcz' extensions which forces a re-run of 'rebuildfstab' if any 'ntfs' file systems are already in '/etc/fstab'.
How about the other way round: ntfs-3g will call rebuildfstab on load via /usr/local/tce.installed/ntfs-3g ? Easier to implement and the call will be done at the right time.
I might have had a slow start today but isn't '/usr/local/tce.installed/ntfs-3g' what I'm referring to as the "startup script of the 'ntfs-3g.tcz' extension"?
With that I meant something like grep -q ntfs '/etc/fstab' && rebuildfstab in '/usr/local/tce.installed/ntfs-3g', plus something along the lines of
[ "$FSTYPE" = "ntfs" -a -n "$( which ntfs-3g )" ] && FSTYPE="ntfs-3g"
OPTIONS="noauto,users,exec"
case "$FSTYPE" in
ntfs-3g) OPTIONS="$OPTIONS,rw,umask=000" ;;
ntfs) OPTIONS="$OPTIONS,ro,umask=000" ;;
instead of
OPTIONS="noauto,users,exec"
case "$FSTYPE" in
ntfs) OPTIONS="$OPTIONS,ro,umask=000" ;;
in '/usr/bin/rebuildfstab'
(WARNING: code has not been really tested)
-
I run what I call "http-thin-mode" (I call it that because.... well what's my name). My backup "mydata.tgz" gets pulled in through httplist boot option. Then on shutdown, I do backup to ram-drive and post it back out to the server through shutdown.sh. But it takes an extra cpio.gz file to do it because ram-drives are not detected as devices. I'm just lazy, that's all. Don't want to have to write it into fstab myself.
-
You don't have to have an /etc/fstab entry to mount a device.
-
I might have had a slow start today but isn't '/usr/local/tce.installed/ntfs-3g' what I'm referring to as the "startup script of the 'ntfs-3g.tcz' extension"?
Never post a topic just before going to bed... I read it as "the (global) startup script should check for ntfs-3g.tcz". :-| Sorry.
After taking a quick look at it, I'd say that your modification should work, but I've got a suggestion for a small improvement: instead of
[ "$FSTYPE" = "ntfs" -a -n "$( which ntfs-3g )" ] && FSTYPE="ntfs-3g"
I'd go for [ "$FSTYPE" = "ntfs" -a -f "/usr/local/tce.installed/ntfs-3g" ] && FSTYPE="ntfs-3g"
It should be slightly faster.