-1

Long story short, I modified the file /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme, which was supposed to change the login screen wallpaper. But I don't know anything about CSS and now I can't boot Ubuntu anymore.

I made my laptop dual boot between Windows 10 and Ubuntu 20.04. So I'm expecting to fix that file from Windows. How can I get the root privilege and then access the ubuntu partition on Windows?

These were my attempts:

  • Ext2Fsd: It could see the content of all of my partitions, except the root and home. When I mounted them, the root and home partitions just appeared to be empty.

  • Ext2Explorer: It displayed no partition (even with run as admin)

  • Linux Reader: I mounted the root partition, and could actually go to the directory of the CSS file! But when I try to fix it (by first copy it to Windows, type it back to its original content, and then paste it back to its directory), it says: No such file or directory. I also tried to disable the read-only mount permission but there's always an error from nowhere that stopped the process.

  • DiskGenius: Same as Linux Reader: I could get to the CSS file location, copy & paste, but "No such file or directory" again.

  • Windows Subsystem for Linux: I went to /dev, ls -l and looked for sdb1 2 3 4, one of them was my root partition. But there're only a pile of tty files, no sdb. Also went to /mnt, which shown me 3 files C D E that were my Windows partitions. I used Ext2Fsd to mount my root as F, and went to /mnt/F. It's empty.

I guess those attempts failed because I don't have the permission to write on the root partition.

Melebius
  • 11,431
  • 9
  • 52
  • 78
  • 1
  • @Kulfy I have read the article and tried the softwares it mentioned but with fruitless result. – Revol Noom Aug 05 '20 at 10:50
  • There is no good and clean way to write to ext4 partitions from Windows since Windows doesn't simply recognise ext4. To share data you can always use an NTFS partition. – Kulfy Aug 05 '20 at 11:07
  • @Kulfy Well I've read that line too many times but still had hope somehow. Now I think that's a bummer that I'd have to reinstall ubuntu again :( Thank you for your attention. – Revol Noom Aug 05 '20 at 11:20
  • Are you getting some errors while booting? If your main purpose is to revert back the changes, you can ask a new question specifying the errors and what caused the error. Files can be edited from a LiveUSB, TTY and even recovery mode. So, re-installing the OS might not be required. – Kulfy Aug 05 '20 at 11:22
  • @Kulfy Oh i didn't think about that. The usb I first used to install Ubuntu was lost. Thanks for the suggestion. I'll go buy a new one tomorrow. – Revol Noom Aug 05 '20 at 12:33

1 Answers1

0

So, thanks to Kulfy, I've created a bootable USB burned with Ubuntu. And then, via the terminal, I have successfully copied my file back to its original location by sudo cp.

Also, I want to warn any future reader who wants Windows to write to ext4: Don't Do That. After I used DiskGenius on Windows to delete a file on Ext4, the disk I wrote on become corrupted and I had to use fsck to fix it.

Melebius
  • 11,431
  • 9
  • 52
  • 78