1

I would like to run the following command for the installation that has broken /usr/share/X11/xkb/symbols/us. Editing the file, restarting, just puts the false parameters there back again and again.

sudo apt-get install --reinstall xkb-data

The following methods are just about replacing the file with correct inputs but I cannot get it right.

Unsuccessful Attempts in Live USB

I do

sudo -i 
root@ubuntu~# sudo cp /home/ubuntu/Desktop/file /usr/share/X11/xkb/symbols/us
  • also tried root@ubuntu~# cp /home/ubuntu/Desktop/file /usr/share/X11/xkb/symbols/us
  • also tried root@ubuntu~# cat /home/ubuntu/Desktop/file > /usr/share/X11/xkb/symbols/us
  • also tried root@ubuntu~# sudo cat /home/ubuntu/Desktop/file > /usr/share/X11/xkb/symbols/us
  • also tried sudo gedit /usr/share/X11/xkb/symbols/us. It says that it saved successfully. Closing window. Seeing it again. No things saved.

Output: no change. Expected result: replacement of the file. This method worked first time but not anymore. Doing gedit .../us shows the original file, not the new one.

  • 3rd iteration i.e. 3rd startup of Live USB on already, to exclude human mistake

If I could login into Ubuntu system and run the command sudo apt-get install --reinstall xkb-data, it would solve the problem. However, the above method should also work. I do not understand why write is occurring.

System: Ubuntu 16.04 64 bit
Hardware: Macbook Air 2013-mid

1 Answers1

0

First find out the appropriate section by lsblk. I did by following here in the GUI

sudo mkdir /mnt/foo
sudo mount /dev/sda2 /mnt/foo
sudo mount --bind /dev /mnt/foo/dev && 
sudo mount --bind /dev/pts /mnt/foo/dev/pts && 
sudo mount --bind /proc /mnt/foo/proc && 
sudo mount --bind /sys /mnt/foo/sys
sudo chroot /mnt/foo

sudo apt-get install --reinstall xkb-data
exit
reboot

It works! I do not understand why I got initrams error with persistent live ubuntu in Macbook. Only the default Live Ubuntu worked.