Skip to content

Instantly share code, notes, and snippets.

@gitawego
Last active January 5, 2022 22:53
Show Gist options
  • Save gitawego/4323ee1b51ef59149982494427bbef59 to your computer and use it in GitHub Desktop.
Save gitawego/4323ee1b51ef59149982494427bbef59 to your computer and use it in GitHub Desktop.
chrome os

Chrome OS Tips

Change your Chromebook’s performance setting

in setting chrome://flags/#scheduler-configuration, choose Enables Hyper-Threading on relevant CPUs. and restart

mount partitions (copied from MuntashirAkon)

  • Open crosh (CTRL+ALT+T, then type shell in terminal)
  • find partition using lsblk -e7
  • run the following:
    echo /home/$USER/u-$CROS_USER_ID_HASH/MyFiles/
    
    with this command, you will get the real path ex: /home/chronos/u-910450b5b86edd74333ce14f446ec9c7a44301e0/MyFiles/
  • add mount entries in /usr/local/fstab like this
    /dev/sda1   /home/chronos/<user-id>/MyFiles/data1  auto    defaults   0      0
    /dev/sda2   /home/chronos/<user-id>/MyFiles/data2  auto    defaults   0      0
    
  • mount root as writable
    sudo mount -o rw,remount /
  • create file /etc/init/mount-internals.conf with following content
    start on start-user-session
    task
    
    script
        fstab="/usr/local/fstab"
        # Check for the existence of fstab
        if [ -e "${fstab}" ]; then # fstab found
            # Create directories if not exist only if the user is a valid user
            for mount_point in `cat "${fstab}" | grep -vE "^\s*#" | awk '{print $2}'`; do
                if ! [ -e "${mount_point}" ] && [ -e `dirname "${mount_point}"` ]; then
                    mkdir -p "${mount_point}"
                fi
            done
            # mount fs, errors don't matter
            mount -a -T "${fstab}" || true
        fi
    end script
  • reboot system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment