Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Need some Ubuntu sys admin assistance

Options
  • 09-08-2017 1:42pm
    #1
    Registered Users Posts: 7,980 ✭✭✭


    Hi there. Hopefully it's okay to post this here.

    I need to make the root of a system read only. So I thought I can install overlayroot and easy peasy. Since this is a Raspberry PI type system with Kernel 3.10.104-189 overlayroot doesn't actually work out of the box. Perhaps it can be added or perhaps there is another way.

    Can anyone advise on this or even better do it for cash?

    Thanks.


Comments

  • Registered Users Posts: 2,719 ✭✭✭niallb


    Is that an odroid C1?
    I think I have one of those around, and happy to help if I can reproduce the project setup, and build or install a newer kernel.
    What are you installing the root filesystem on?


  • Registered Users Posts: 7,980 ✭✭✭meglome


    niallb wrote: »
    Is that an odroid C1?
    I think I have one of those around, and happy to help if I can reproduce the project setup, and build or install a newer kernel.
    What are you installing the root filesystem on?

    Good guess it is indeed an Odroid, a C1+. I've installed a 16.04.2 minimal image from Odroid. It has the standard boot supplied and a 2.3gb root which I want to make read only. I have the rest of the disk as second writeable partition.

    Probably easier to add overlayroot to the kernel as it is enabled but has no driver as far as I can see. Though I'm not 100% either way.


  • Registered Users Posts: 7,980 ✭✭✭meglome


    Sorry it's all on a 16gb sd-card... boot, parition1, partition2. I've left partition 2 at 1gb and will expand to fit the disk on 'first boot'.


  • Registered Users Posts: 2,719 ✭✭✭niallb


    The C1+ seems to be practically the same spec as the C1 - just an improved model built when they ran out of the original stock.
    Which version of the OS did you use for the install?
    Was it the ubuntu-16.04.2-minimal-odroid-c1-20170221.img one or an earlier one?


  • Registered Users Posts: 7,980 ✭✭✭meglome


    niallb wrote: »
    The C1+ seems to be practically the same spec as the C1 - just an improved model built when they ran out of the original stock.
    Which version of the OS did you use for the install?
    Was it the ubuntu-16.04.2-minimal-odroid-c1-20170221.img one or an earlier one?

    That's the one I used.


  • Advertisement
  • Registered Users Posts: 2,719 ✭✭✭niallb


    Thanks for confirming.
    I downloaded the image there and couldn't immediately see any sign of the overlayfs setup in the initrd or in the root filesystem.

    Odroid did update the filesystem for their newer boards and went for kernel 4.9, but didn't bother updating this release.
    I'll stick it onto my own C1 after the weekend, and see if I can upgrade the kernel to one that supports the feature.


  • Registered Users Posts: 2,719 ✭✭✭niallb


    OK. Good news.
    I got this working.
    The delivered kernel is an older one but support for overlayfs is backported and loaded in it.

    The problem is that when the overlayroot package is installed it updates the initrd.img in /boot to include the hooks to set up overlay.
    Because the odroid is an armhf system and uses uboot, it reads the initrd from a different location which is mounted at /media/boot when you're running.

    This command will convert the ramdisk to the right format and write it to the correct place.
    Do check you have the right kernel with 'uname -a' and use the initrd with the same version number.


    mkimage -A arm -T ramdisk -C none -n uInitrd -d /boot/initrd.img-3.10.104-189 /media/boot/uInitrd


  • Registered Users Posts: 7,980 ✭✭✭meglome


    niallb wrote: »
    OK. Good news.
    I got this working.
    The delivered kernel is an older one but support for overlayfs is backported and loaded in it.

    The problem is that when the overlayroot package is installed it updates the initrd.img in /boot to include the hooks to set up overlay.
    Because the odroid is an armhf system and uses uboot, it reads the initrd from a different location which is mounted at /media/boot when you're running.

    This command will convert the ramdisk to the right format and write it to the correct place.
    Do check you have the right kernel with 'uname -a' and use the initrd with the same version number.


    mkimage -A arm -T ramdisk -C none -n uInitrd -d /boot/initrd.img-3.10.104-189 /media/boot/uInitrd

    Niall that is fantastic. Really bails me out here. Working like a charm.


Advertisement