Results 1 to 4 of 4

Thread: Install as RO filesystem

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Posts
    3

    Install as RO filesystem

    Hi all,

    I have an app that I want to run on linux that does not require filesystem access. I want to install it on several computers which may be turned on and shut down ungracefully, so I want to be sure that nothing is ever written to disk anyway. I thought knoppix would be a good place to start, because being CD-ROM based, it runs happily on a read-only filesystem.

    I installed knoppix on a computer using knoppix-install from the CD, using the "CD-based" distribution option. I set the / filesystem to ro via /etc/fstab, but it is still mounted as rw and I can still write to the filesystem when the computer boots up. I want to enforce that the / partition remain ro so that I know nothing is writing to it, and the computer can bounce any time without any files open.

    Does knoppix mount the filesystems from some location other than /etc/fstab?

    Al

  2. #2
    Senior Member registered user
    Join Date
    Feb 2005
    Location
    Colorado, USA
    Posts
    205
    Does knoppix mount the filesystems from some location other than /etc/fstab?
    Well, yes and no.

    Knoppix actually rewrites /etc/fstab while the computer is booting. You can see when this happens - a line is written to the screen in blue and yellow that says,
    Code:
    Scanning for Harddisk partitions and creating /etc/fstab...
    If it goes by too fast, you can review the boot process by typing
    Code:
    $ dmesg
    This behavior is a good thing when running from CD, because the disk never knows from one boot to the next what environment it will find. It's probably not that useful after installation to HD, and can be downright annoying in situations like yours.

    True to the Unix Way, there are different options for dealing with this default behavior. The easiest is probably to give the Knoppix parameter nofstab at boot time. You can do it each and every time you want to skip the rewrite or, if you're using a bootloader, add a line like this:
    Code:
    append="nofstab"
    If there's already an append line, just add to it:
    Code:
    append="lang=us nofstab"
    Note that this isn't a kernel parameter - it's specific to Knoppix. So it won't work if you do a Debian install. Of course, it won't be needed if you do a Debian install.

    Other ways involve modifying the script that carries out the procedure, and aren't hard at all. Do this by editing (as root) /etc/init.d/knoppix-autoconfig. On my system there are 12 lines of code starting at line 951 (or search for nofstab). The file has useful comments inside, so it's easy to see what it does.

    You can comment these lines out by adding # at the beginning of each one. (Well, two of the lines are already just comments, so you'd do that to the other 10.) Or you could add a test for HD-install - the script already does that for other actions, so you could browse through the file and see how it's done elsewhere.

    Still other ways might be to have the boot process skip this whole script entirely, or put something else in its place. Whatever gets you down the road.

    I hope this helps!

    -- Ed

  3. #3
    Junior Member
    Join Date
    Mar 2005
    Posts
    3
    Hi mr_ed

    Thank you for the reply! I was able to set my fstab the way I liked it, and now I understand better how knoppix boots. But I found in the same file, on line 486:

    Code:
    # / must be rw in any case, starting from here
    mount -o remount,rw / 2>/dev/null
    so it remounts root as rw anyway. Back to square #1, I booted again from CD, and found that it creates a 2mb root partition on "/dev/root", then fills it with a default filesystem full of symlinks to the CD. It's great! All the binaries are run from the CD image, but / is still a writable partition for temporary files.

    Now I'm stuck though. Where does it get /dev/root from? And what populates it with the filesystem full of symlinks? I suspect the answer lies in a pivitroot call, but I don't know much about pivitroot, or where it's called from. I didn't find any hints in the knoppix-autoconf script.

    Basically, I want to be able to do this same thing when booting from the hard drive: mount the hard drive as read-only, then create a root mountpoint that contains this same default filesystem as when booting from the CD. Then I would have a temporary root filesystem that could be trashed and thrown away, and start over when the box is rebooted.

    Are there any hints for where I should look to accomplish this?

    Thanks all!

    Al

  4. #4
    Senior Member registered user
    Join Date
    Feb 2005
    Location
    Colorado, USA
    Posts
    205
    As you saw, I was in over my head with the last question, never mind this one!

    I'm sorry, I don't know. I did some poking around but didn't find anything useful. I would suspect that it was something on the CD (in the compressed KNOPPIX file) that didn't get copied to HD, but when you remaster a new CD, everything comes from the HD.

    This should be an easy question for someone who knows the process better. If you don't get an answer shortly, give another shout.

    -- Ed

Similar Threads

  1. Compressed filesystem
    By abby in forum Customising & Remastering
    Replies: 0
    Last Post: 03-11-2007, 09:56 AM
  2. how to install. new to filesystem
    By pyromaniac in forum MS Windows & New to Linux
    Replies: 2
    Last Post: 12-02-2006, 08:26 PM
  3. Trying to Resize Windows Filesystem for Knoppix/DEB Install
    By rossi in forum MS Windows & New to Linux
    Replies: 3
    Last Post: 07-06-2005, 09:24 PM
  4. Install over previous ReiserFS filesystem stalls.
    By mallyone in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 02-01-2005, 10:46 PM
  5. compressed filesystem?
    By rex in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 05-25-2004, 04:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


IBM System X3850-X5 Server w/4x Intel  Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD picture

IBM System X3850-X5 Server w/4x Intel Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD

$1299.99



Unused IBM 09P0037 MAINBOARD For  RS/6000 7044-170 P-Series picture

Unused IBM 09P0037 MAINBOARD For RS/6000 7044-170 P-Series

$375.00



DEFECTIVE IBM SYSTEM X3530 M4 7160AC1 Server 2INTEL XEON E52430L 0 80GB  G3D picture

DEFECTIVE IBM SYSTEM X3530 M4 7160AC1 Server 2INTEL XEON E52430L 0 80GB G3D

$142.50



IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM

$179.99



IBM 02YC027 Seagate ST2400MM0129 2.4TB 10K SAS 12Gb/s 2.5

IBM 02YC027 Seagate ST2400MM0129 2.4TB 10K SAS 12Gb/s 2.5" Server Hard Drive

$200.00



IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU picture

IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU

$999.99



Compaq ProLiant 1500R 5/100 rack server, Series 3155, with IBM 2.1GB HD, VINTAGE picture

Compaq ProLiant 1500R 5/100 rack server, Series 3155, with IBM 2.1GB HD, VINTAGE

$295.00



IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES picture

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES

$110.30



IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon  E5620 picture

IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon E5620

$199.99



Rare Vintage IBM 93ZZ PowerPC Server Board - MCM Ceramic CPU - 40N1844 - 1.1 lbs picture

Rare Vintage IBM 93ZZ PowerPC Server Board - MCM Ceramic CPU - 40N1844 - 1.1 lbs

$49.99