# Linux Kernel Module Cheat

#### 23.3.1. gem5 disk persistency

TODO how to make gem5 disk writes persistent?

As of cadb92f2df916dbb47f428fd1ec4932a2e1f0f48 there are some `read_only` entries in the gem5 config.ini under cow sections, but hacking them to true did not work:

    diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
    index 17498c42b..76b8b351d 100644
    --- a/configs/common/FSConfig.py
    +++ b/configs/common/FSConfig.py
    @@ -60,7 +60,7 @@ os_types = { 'alpha' : [ 'linux' ],
                }

     class CowIdeDisk(IdeDisk):
    -    image = CowDiskImage(child=RawDiskImage(read_only=True),
    +    image = CowDiskImage(child=RawDiskImage(read_only=False),
                              read_only=False)

         def childImage(self, ci):

The directory of interest is `src/dev/storage`.