Score:0

Can't boot Linux

id flag

I run a single boot Linux computer. I am fairly new to Linux. It froze yesterday and so I held the off button to force shut it down.

I think the reason it froze was because I may have somehow removed permission to read the root folder.

I didn't think of mentioning this however because if I did do that then it was far too easy to do such a dangerous thing for my computer.

I ran the following command because I wanted to remove my permission to paste files there:

sudo chmod -rwx /

If that is the cause of the problem, maybe it'd be worth putting in backup read and write permissions not even sudo can change.

Anyway, when I turned it back on, I was met with a black screen that showed:

Dev/sda2: recovering journal
Dev/sda2: clean, 369185/30498816 files, 9456082/121965056 blocks

I can not enter GRUB because none of the buttons that may work, do.

I have tried all Ctrl + Alt + Function keys but the only change I can make is to swap between a blinking underscore and the previously mentioned lines.

I know the HDD is not failing because the only reason I switch to Linux as because my old HDD broke and I had to get a brand new one and wanted to try out a new OS. Despite not being able to enter the GRUB menu, sometimes when I try, my laptop will just turn on without outputting any screen.

It may be worth mentioning I removed the screen of my laptop and am currently using VGA to output to a TV. I have tried entering the installation don't boot however to no avail as nothing seemed to happen however I do think it may be worth another try?

Maybe I just didn't wait long enough or something. Even so, I wouldn't know how to progress from there.

Ubuntu version is 20.04.

FedKad avatar
cn flag
Try to boot from the installation media and check the disk.
24601 avatar
in flag
please [edit] your question to include the version of ubuntu you are using.
Nmath avatar
ng flag
Are you sure that your other hardware is viable?
Kent avatar
in flag
I don't know if I can help, but it would be helpful to have a bit more information. When you originally installed Linux (Ubuntu?) on your laptop, what did you use to install? Live CD? USB stick? You say that the laptop "froze" so you forced it to quit by holding down the power button. Was it running normally when it "froze?" Do you know how to get to your BIOS to check or change the boot order?
Darkdestroyer2025 avatar
id flag
Ok so I think the reason it crashed in the first place was because I may jave accidentally removed permission to read the folder "/" whilst trying to change it to default. I changed it to paste a file into a directory. When it froze all the icons disapeared and then the screen went black. I left it for a few minites before turning it off. I do not know how to get to bios. The installation media was a dvd so I guess live cd?
Darkdestroyer2025 avatar
id flag
Also excuse my name it was from my google account 5 years ago xD
Darkdestroyer2025 avatar
id flag
@Nmath do you mean my installation media? Or my hdd? Both worked fine before.
Darkdestroyer2025 avatar
id flag
@FedonKadifeli I will let you know the results of that. EDIT: I think the bootnorder prioritises my hdd as now change occurs upon booting with the CD present
Kent avatar
in flag
The / folder is your root folder. If you somehow disabled access to / then I do not know any way to recover your system. There may be a way to repair the file system by booting to a Live Disk image (or USB image) of Ubuntu and using fsck to repair the original file system. But I am not sure that is possible in your case. If I were in your shoes, I would probably cut my losses and reinstall the OS entirely. Someone else may have better advice for you, but reinstalling the OS is the only option that occurs to me. Sorry I can't offer better advice to you.
Organic Marble avatar
us flag
Consider an edit to your question to include the key facts about how you broke the system by changing permissions on /.
Artur Meinild avatar
vn flag
If you ran `sudo chmod -rwx /`, then your system is ruined. You'll want to understand the implications of running such commands on a *nix system. Rule #1 is: Do NOT run commands you don't fully understand. Good luck reinstalling your system (and I mean this very sincerely).
Darkdestroyer2025 avatar
id flag
@Artur Meinild ye that's line is the fucker I thought it would only remove my permissions because I read somewhere else on this page that the OS treats the user and the computer itself as 2 different "entities" or "variables" when it comes to permissions. I thought the worst that would happen is that I'd have to give the permissions back to myself. So should I just wipe the hard drive backing up anything I need on a windows computer? I'd assume linux permissions don't apply there. Also thanks for the luck I may need it lmao.
Artur Meinild avatar
vn flag
You should probably boot a Linux system from a Live USB, and see if you can restore permissions to back up any data you need (as others also have mentioned). That's the best advice I can give.
Score:0
cn flag

What you did here with sudo chmod -rwx / command is you have removed the read, write and execute permission of root directory for all users. This means you will not be able to list the content of any directory on your system, not be able to create/delete any files or directory on your system and most important of all you will not be able to run any program on your system. All this combined will make you pc unbootable. The only user who can fix this is root user but there is no way you can get to the root user. Now what you can do is create a live usb of any linux os, boot into the live environment, mount you root partition in the liveboot environment at any mountpoint (say /mnt/). Now when you do sudo ls -l /, in the output you will see that the directory /mnt/ has no premissions. Now to fix it, undo what you did, i.e run the command: sudo chmod a+rwx /mnt/, this will restore all the premissions you removed, that's it. Now you can reboot and you system will boot fine.

Darkdestroyer2025 avatar
id flag
I am sure this would have worked however before I got the chance to see this I had already re-installed ubuntu instead.
Shah Fahad avatar
cn flag
I guess you learned you lesson the hard way ;).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.