Results 1 to 9 of 9

Thread: Mounting Linux read-only

  1. #1
    Newbie
    Join Date
    Jan 2002
    Posts
    1

    Post Mounting Linux read-only

    What is the best way to prevent harm while shutting down a linux box? Should I just mount the drives as read-only? Is this done it fstab? What do you guys do?
    Thanks

  2. #2
    Maximum Bitrate Meatballman's Avatar
    Join Date
    Jul 1999
    Location
    Hartsville, SC
    Posts
    747

    Post

    Install a journaling filesystem. You can kill power any time you like and still boot
    fast and not worry about a corrupt fs. I've used XFS and it works beautifully.

  3. #3
    Constant Bitrate samael's Avatar
    Join Date
    May 2001
    Location
    new zealand
    Posts
    130

    Post

    journaled file systems arnt safe from improper shutdown , but ext3 is pretty damn bullet proof. what you could do is boot into a ram disk (your root file system reside on a ram disk) and mount the hd file systems read only , then it would be impossible to shag up your fs. if you wanted to write something to disk you could unmount then remount read/write , then umount and remount read only , and that would be the only time improper shutdown would be bad , and you have control over that part to a certain extent (short of hardware failure).
    a lot of mini distros do just this , and i have set my machine (k5 133 with 16 meg ram) up using mulinux and that could play 3 128 kb/sec mp3 at once while running an ftp deamon and other services.
    apparently this is fairly straight forward to do (i havent done it myself , the distros do it by default) which is good

    (the only prob with mulinux is that its based on an older kernel and libc5 so coding for it is a bit of a prick)
    stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

  4. #4
    Constant Bitrate samael's Avatar
    Join Date
    May 2001
    Location
    new zealand
    Posts
    130

    Post

    oh and the root file system has to be mounted read write , or at least /proc has to be read write (interesting directory that one , info about running procedures and your hardware irq etc....).
    stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

  5. #5
    Maximum Bitrate Meatballman's Avatar
    Join Date
    Jul 1999
    Location
    Hartsville, SC
    Posts
    747

    Post

    Originally posted by samael:
    <STRONG>journaled file systems arnt safe from improper shutdown</STRONG>
    True, but it's a quick and easy solution to the problem. Avoiding lengthy fscks I mean. Anyhoo, you might also want to look at Chris Pinkham's COAR scripts. I haven't used them, but they are supposed to help set your machine up to boot off a ramdisk and mount your drives read-only. Hope that helps.

  6. #6
    Constant Bitrate samael's Avatar
    Join Date
    May 2001
    Location
    new zealand
    Posts
    130

    Post

    "but they are supposed to help set your machine up to boot off a ramdisk "

    no i am talking about booting of a hd , and setting up a ram drive using the system memory and mounting that read/write , and mounting other filesystems (residing on the hard disk) read only. im not talking about one of those (cool arse) solid state memory drives , although on want one
    it dosent matter if that isnt unmounted cleanly as its set up every time you boot. its probably only an option when everything is set up right because it can be i wee bit annoying to change the setup on disk....
    stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

  7. #7
    Maximum Bitrate
    Join Date
    Mar 2001
    Location
    Cincinnati, Ohio
    Posts
    729

    Post

    I don't remeber how to do it, but go look over at the Cajun website, it explains it.
    Clarion 200watt head unit w/ Aux in.
    Kicker 800watt 4 channel amp
    In a 96 Grand Prix SE.

  8. #8
    Maximum Bitrate Meatballman's Avatar
    Join Date
    Jul 1999
    Location
    Hartsville, SC
    Posts
    747

    Post

    Originally posted by samael:
    <STRONG>no i am talking about booting of a hd , and setting up a ram drive using the system memory and mounting that read/write , and mounting other filesystems (residing on the hard disk) read only.</STRONG>
    Uh...that's what I meant dude. Sorry I didn't say that quite right. Have a look at the scripts...they were made to work with CAJUN but have been generalized to work with other setups.

    [ 01-09-2002: Message edited by: Meatballman ]

  9. #9
    Constant Bitrate samael's Avatar
    Join Date
    May 2001
    Location
    new zealand
    Posts
    130

    Post

    oh sorry dude. anyway i will have to look at thise scripts , i will be doing something like this myself soon and best i understand how to do it befor i try it
    stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

Bookmarks

Posting Permissions

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