How to edit /boot/efi

19,734

You can't use sudo with cd. To get into protected directories, you can type

sudo bash

To get a root login shell or type

su -

To log in as root in your current shell. The behavior of both is identical, the back end differences won't matter much for what you're doing.

Share:
19,734

Related videos on Youtube

Zach Dahle
Author by

Zach Dahle

Updated on September 18, 2022

Comments

  • Zach Dahle
    Zach Dahle over 1 year

    I have installed rEFInd, and it works well enough, but I am trying to add a theme. To do so, I need access to the /boot/efi/ folder. When I try to access it, I get the following error:

    rufio1337@BattleStation:/$ cd boot/efi
    bash: cd: boot/efi: Permission denied
    

    (As sudo):

    rufio1337@BattleStation:/$ sudo cd boot/efi
    sudo: cd: command not found
    

    In the GUI it shows the folder with an x on it.

    Anybody know how I can get access to this folder?


    Running fdisk -l gives me the following:

    Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: 29D3E65C-B559-44C9-A9E9-A1FFEA5BA586
    
    Device        Start        End    Sectors  Size Type
    
    /dev/sda1        2048    1640447    1638400  800M Windows recovery environment
    
    /dev/sda2     1640448    2172927     532480  260M EFI System
    
    /dev/sda3     2172928    2435071     262144  128M Microsoft reserved
    
    /dev/sda4     2435072 3878256639 3875821568  1.8T Microsoft basic data
    
    /dev/sda5  3878258688 3907028991   28770304 13.7G Windows recovery environment
    
    
    Disk /dev/sdb: 232.9 GiB, 250059350016 bytes, 488397168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x5c74ae42
    
    
    Device     Boot     Start       End   Sectors   Size Id Type
    
    /dev/sdb1              63 347550949 347550887 165.7G  c W95 FAT32 (LBA)
    
    /dev/sdb2       347551742 488396799 140845058  67.2G  5 Extended
    
    /dev/sdb5       347551744 463405055 115853312  55.2G 83 Linux
    
    /dev/sdb6       463407104 488396799  24989696  11.9G 82 Linux swap / Solaris
    
    • Zach Dahle
      Zach Dahle almost 9 years
      I would also like to point out that I am veeery new to Linux, so child-speak is appreciated!
    • Pilot6
      Pilot6 almost 9 years
      cd /boot/efi is correct. But if you are new, I do not recomment to start with efi themes ;-)
    • Michael
      Michael almost 9 years
      You also have to be root sudo -I maybe work fine.
    • oldfred
      oldfred almost 9 years
      What version of Ubuntu. They changed the mount in fstab from defaults to umask=0077 which locks it. I had to change back to defaults. And just remounting did not work. I had to reboot. sudo nano /etc/fstab
    • Warren Hill
      Warren Hill almost 9 years
      Not a duplicate but related to 1st problem Why doesn't sudo cd /var/named work?