WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Hidden Bootcode for readonly rootfs?  (Read 5755 times)

Offline linuxhelp

  • Newbie
  • *
  • Posts: 17
    • www.linuxonlinehelp.de
Hidden Bootcode for readonly rootfs?
« 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..
www.linuxonlinehelp.de
Nonprofit Linux PC & Server Support

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Hidden Bootcode for readonly rootfs?
« Reply #1 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Hidden Bootcode for readonly rootfs?
« Reply #2 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/

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Hidden Bootcode for readonly rootfs?
« Reply #3 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: Hidden Bootcode for readonly rootfs?
« Reply #4 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.

Offline linuxhelp

  • Newbie
  • *
  • Posts: 17
    • www.linuxonlinehelp.de
Re: Hidden Bootcode for readonly rootfs?
« Reply #5 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..
« Last Edit: August 08, 2012, 07:05:30 PM by linuxhelp »
www.linuxonlinehelp.de
Nonprofit Linux PC & Server Support

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Hidden Bootcode for readonly rootfs?
« Reply #6 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: Hidden Bootcode for readonly rootfs?
« Reply #7 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.
The only barriers that can stop you are the ones you create yourself.