Jump to content

R2D2_C3PO

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by R2D2_C3PO

  1. I looked a bit into your idea and tried to estimate if is is possible in a reasonable time. While at this task I already submitted a patch to the check_first_login script (https://github.com/igorpecovnik/lib/pull/366). 

     

    My new task proposal would be this:

    Write a script which asks the user at the first login what he wants to do with the unpartitioned space on the SD-Card.

    Options: 

    a) Use whole SD-Card for root (as it currently happens automatically)

    B) Partition disk and use space for a configurable mountpoint with any supported filesystem (perhaps with some options to choose from, e.g. /home, /var/www, ...)

    c) Leave space unpartitioned (options: ask again at next boot; never ask again)

     

    When selecting option B) fstab will be updated automatically. The amount reserved for root is user selectable (with reasonable limits). 

    The current mechanism to resize the root fs at first boot would be disabled. Doing this at first login is as good as during first boot. 

     

     

    Does this proposal sound good?

     

    I think this would be a great addition. But unfortunately this seems to be the wrong way (since you will waste enourmous amounts of time with this 'change things later with a script' approach -- BTDT many times). I believe it would be better to combine the benefits of btrfs and being able to use SD cards of any size in another way:

    • check the target audience: people who know why btrfs/snapshots rock and assume they want to do something serious with Armbian and their device(s)
    • assume installation media requirements are understood (it's 2016 and there's no reason to use an old crappy and ultra slow SD card with 4 GB that has been found in the drawer)
    • make use of partitions

    That being said I think we should make using at least a 16GB SD card a prerequisit (we have already a list of recommended SD cards and good performance needs larger cards anyway). Then we can add another build variant:

    • choose btrfs for the rootfs, choose 8 GB in size (so we end up with a small ext4 partition and a large btrfs partition)
    • enhance the firstrun script to automatically partition the remaining size on the card
    • enhance the check_first_login.sh script to ask the user whether he wants to use this partition for /home or for something else -- /var/www for example
    • adjust fstab and settings accordingly

    Since we're talking here about a H3 board to give away unfortunately this won't work (now) since using btrfs with our 3.4.112 legacy kernel on H3 boards would be simply insane (tons of unfixed bugs, btrfs stability is even with most recent kernels not that great), mainline kernel is a requirement for btrfs anyway. But since we're not that far away from using mainline on H3 boards and development is time consuming (especially when modifying partitions in a realiable way when 4 different distros are involved!) it's worth to start now.

  2. While this idea is not on any list it might still be interesting for some people. There is already an option to build an image with btrfs as the root filesystem. However this requires rebuilding the whole image and you have to know the SD card size in advance. I will write a script to convert an already existing image (or even an already used system on a SD-Card) to btrfs. This script will also handle the related problems (creating an ext4 boot partition, updating fstab, etc.).

     

    I will also try to create a script to set up automatic btrfs snapshots before and after any package installations (especially for the automated updates). This is the main reason why I want to switch to btrfs. Is allows for easy rollbacks if something goes wrong and provides a nice mechanism for incremental backups. 

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines