Tiny Core Linux

Tiny Core Base => TCB Tips & Tricks => Topic started by: linuxhelp on July 30, 2012, 02:13:21 AM

Title: Hidden Bootcode for readonly rootfs?
Post by: linuxhelp on July 30, 2012, 02:13:21 AM
Hello,

is there a bootcode for readonly mount of rootfs?
i tried to set /forcefsck with filetool not possible
i like to use it for a remote thin client (Root on CF-Disk)
which is switched on/off by mechanic timer clock
umount -r /dev/sda1 #not possible dev-busy

thanks..
Title: Re: Hidden Bootcode for readonly rootfs?
Post by: tinypoodle on July 30, 2012, 05:15:19 AM
Hello,

is there a bootcode for readonly mount of rootfs?
Quite an interesting question, though I couldn't think of any usage scenario where that would be of any benefit, as rootfs is residing in shared mem.
Quote
i tried to set /forcefsck with filetool not possible
Can you elaborate about that, not clear what is meant.
Quote
i like to use it for a remote thin client (Root on CF-Disk)
which is switched on/off by mechanic timer clock
umount -r /dev/sda1 #not possible dev-busy

thanks..
One possible approach would be to boot with code "base", then copy needed files to rootfs, e.g. extensions to /tmp/tce/optional - that would allow for umounting any persistent storage medium.
Title: Re: Hidden Bootcode for readonly rootfs?
Post by: Rich on July 30, 2012, 10:26:01 AM
Hi tinypoodle
He is backing up a file called  /forcefsck  in an attempt to force fsck to run on boot:
http://www.cyberciti.biz/faq/linux-force-fsck-on-the-next-reboot-or-boot-sequence/
Title: Re: Hidden Bootcode for readonly rootfs?
Post by: tinypoodle on July 30, 2012, 11:05:29 AM
Oh... In short, that would neither make much sense for core, nor could it ever work, for a multitude of reasons.
Title: Re: Hidden Bootcode for readonly rootfs?
Post by: Rich on July 30, 2012, 11:14:21 AM
Hi linuxhelp
When you say  "(Root on CF-Disk)"  , are you referring to a "scatter installation"? Tinycores root file system
is in RAM.
Title: Re: Hidden Bootcode for readonly rootfs?
Post by: linuxhelp on August 08, 2012, 06:09:03 PM
Hi@All

- sorry for my bad english description (rootfs means TCL on CF-Disk)
- forcefsck or autofsck option could be useful if a TCL-System lost Power and the CF-Disk
is cleaned and checked on every boot.

do you agree? Can we make a "TCL- Wish Options" inside this forum for brainstorming new good ideas for the next TCL Version?


One Solution:
- add boot option tce=hda1
- create with #touch /mnt/hda1/tce/copy2fs.flg
- copy onboot.lst  #cp /mnt/hda1/tce/onboot.lst  /mnt/hda1/tce/copy2fs.lst
- reboot
all Apps copied to RAM, a #sudo e2fsck /dev/hda1
.. is now possible..
Title: Re: Hidden Bootcode for readonly rootfs?
Post by: gerald_clark on August 08, 2012, 07:14:26 PM
This has been discussed many times.
The answer has always been no.
Core needs to boot fast.
Disk writes are rare as the fs is in RAM.
If you want to run fsck, boot with "base norestore" and check it manually.
Title: Re: Hidden Bootcode for readonly rootfs?
Post by: curaga on August 09, 2012, 05:22:21 AM
Plus, only ext can be fsck'd in the base. One is likely to have other FS around too.