Announcement

Collapse
No announcement yet.

Backup for reliability

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Backup for reliability

    Alright, so im making a car computer software package that hopefully I can pass onto conplete strangers for their carputers. I am using gentoo linux and I have a question about this.

    Lets say the carputer suddenly turns off even if the shutdown controler didnt tell it too. There is a high possibility (at least when I do things) that something between the boot and login process will become corrupt (reiserfs) and the system wont boot correctly. So, I devise a plan: What if I put the entire base system (everything on / except the end users home dir files (mp3s and such)) on a 2nd partition in a compressed file. Then whenever chkdsk finds an error which needs root to repair it it simply invokes the backup command and read only copies the entire system to / and reboots.

    Feasable? Doing this the wrong way? Where is a good place to stick this kind of script?
    Current projects: iGmod reloaded (Latest release) (put on hiatus indefinatly)

    Unlimited Internet and gps tracking for $6 a month with boost mobile!

    Carputer 2: www.lmaocar.com

  • #2
    best way is to just install linux on a compact flash (read only) or some type of flash rom etc.. so if the system turns off/killed it wont effect the system files/boot process etc.. though compact flash isnt that fast to boot. But perhaps in suspend mode might be just fine

    Comment


    • #3
      Originally posted by PURDooM
      Alright, so im making a car computer software package that hopefully I can pass onto conplete strangers for their carputers. I am using gentoo linux and I have a question about this.

      Lets say the carputer suddenly turns off even if the shutdown controler didnt tell it too. There is a high possibility (at least when I do things) that something between the boot and login process will become corrupt (reiserfs) and the system wont boot correctly. So, I devise a plan: What if I put the entire base system (everything on / except the end users home dir files (mp3s and such)) on a 2nd partition in a compressed file. Then whenever chkdsk finds an error which needs root to repair it it simply invokes the backup command and read only copies the entire system to / and reboots.

      Feasable? Doing this the wrong way? Where is a good place to stick this kind of script?
      Well, the reason you use Journaling files systems like reiserfs, ext3, etc. is so the sytem can recover itself from a situation like this. When the system is incorrectly shutdown the system should run fsck on the potentially corrupt fs checking for and reparing any potential damage.

      If you felt you needed to restore an image you could just modify the script mentioned above (i dont know which one it is).

      Really though, there should be no reason to have to do the above step except in some really extreme cases. For the most part once you set up your system partitions they are not going to change. Really it will just be the data partition where writes are going to be happening. And only when people are importing their stuff to the system.

      Making the system read only is a pretty good idea too, the only thing is you may need to add a /var partition on your writable partitions for logs since some things can fail if they cannot write a log. Someone here will be able to verify this for us though.

      Keep us updated,
      -pkg

      Check out my tC: http://publicjestering.com/tc
      Check out my site: http://publicjestering.com

      Comment


      • #4
        my system runs in read only just the way you were talking about, it writes to disk when it shuts down. the thing is I shut my computer down everytime I shut the car off (I have a reeeeeeeeeeaaaaaaaaaaaalllllllllllyyyyyyyyyy long driveway (1/4 mile)). aka I live in the boonies.
        This post college life is a real drag

        Comment

        Working...
        X