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
  •  


Dell Poweredge R640 Server | 2x Silver 4114 20 Cores | 16GB | 2x HDD Trays picture

Dell Poweredge R640 Server | 2x Silver 4114 20 Cores | 16GB | 2x HDD Trays

$1349.99



Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB picture

Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB

$510.00



Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD picture

Dell PowerEdge R620 Server 2x E5-2660 v1 2.2GHz 16 Cores 256GB RAM 2x 300GB HDD

$79.19



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x900Gb SAS, Proxmox picture

Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x900Gb SAS, Proxmox

$340.00



Dell PowerEdge R730, 2 sinks, SystemBoard, 8 trays,H330,Idrac 8 exp, 2x750w Psu picture

Dell PowerEdge R730, 2 sinks, SystemBoard, 8 trays,H330,Idrac 8 exp, 2x750w Psu

$135.00



Dell Poweredge R730xd 2.5in 2x E5-2690 v3 2.6ghz 24-Cores  64gb  H730  2x 750w picture

Dell Poweredge R730xd 2.5in 2x E5-2690 v3 2.6ghz 24-Cores 64gb H730 2x 750w

$189.99



CTO Dell PowerEdge R630 Server, 2x Xeon E5-2620V4, 64GB- 512GB RAM, 480GB SSDs picture

CTO Dell PowerEdge R630 Server, 2x Xeon E5-2620V4, 64GB- 512GB RAM, 480GB SSDs

$246.67



DELL PowerEdge R730 Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2680v4 2.4GHz =28 Cores 32GB H730 4xRJ45

$284.00



DELL R730XD Server 2x E5-2680v4 2.4GHz =28 Cores 128GB H730 4x 1.2TB SAS 4xRJ45 picture

DELL R730XD Server 2x E5-2680v4 2.4GHz =28 Cores 128GB H730 4x 1.2TB SAS 4xRJ45

$504.00