2021-05-10 11:42:42 +02:00
# Broken Machines
Over the coarse of my Linux career I broke quite a few machines.
2021-05-12 12:00:19 +02:00
Hopefully you can fix these for me.
2021-05-10 11:42:42 +02:00
The username and password of the first account created is isib/isib unless mentioned in the exercise.
2021-05-12 12:00:19 +02:00
## GRUB problems
### Broken Machine 1
2021-05-10 11:42:42 +02:00
I messed up and forgot to install grub during the Debian installation.
Can you find a way to fix this for me please?
Thanks!
![broken 1 ](./assets/debian_broken_1.png )
2021-05-12 12:00:19 +02:00
#### Tips
2021-08-17 00:02:47 +02:00
< details >
< summary > Spoiler warning< / summary >
2021-05-12 12:00:19 +02:00
How did this happen?
Well, you probably encountered the *black screen of death* on one or more Linux VM's yourself.
When at the very last stage of the Debian installation you forget to install GRUB you created this problem yourself.
The installation is complete and functional but the system has no way of booting.
There are a lot of different approaches to fix this but they all boil down to the same solution.
You need to install GRUB on the MBR of the HDD `/dev/sda` .
Luckily there are dedicated live disk images (ISO's) to fix this.
I would recommend having a look at [supergrub2 ](https://www.supergrubdisk.org/ ).
2021-08-17 00:02:47 +02:00
< / details >
2021-05-12 12:00:19 +02:00
### Broken Machine 2
2021-05-10 11:42:42 +02:00
This machine seems to boot into `htop` and nothing else!
There must be a way to fix this without having to reinstall the machine.
![broken 2 ](./assets/debian_broken_2.png )
2021-05-12 12:00:19 +02:00
#### Tips
Your GRUB configuration is causing this!
Luckily by default GRUB offers a *recovery mode* in it's *advanced options* .
This will drop you into a shell where you can fix the configuration file I messed up.
### Broken Machine 3
2021-05-10 11:42:42 +02:00
Not `htop` again!
![broken 3 ](./assets/debian_broken_3.png )
2021-05-12 12:00:19 +02:00
#### Tips
I said *by default* before no?
Well, here the *recovery mode* is missing so you'll have to find a way to override the `init` parameter of GRUB so you can get a shell to fix what I messed up.
### Broken Machine 4
2021-05-10 11:42:42 +02:00
I forgot my password...
![broken 4 ](./assets/debian_broken_4.png )
2021-05-12 12:00:19 +02:00
#### Tips
Overriding the `init` parameter in GRUB is a classic Linux hack.
If you have physical access to a Linux machine you can gain `root` access with the following method.
The easiest way to protect a machine form this attack is to do full disk encryption or to set a GRUB password.
## Disks and problems
### Broken Machine 5
Somebody erased the MBR from the HDD.
Can you put a new one on there?
Don't forget to install GRUB again once the HDD is fixed.
This is a tricky one but there are quite a few tutorials online to help you out.
![broken 5 ](./assets/debian_broken_5.png )
### Broken Machine 6
The root partition is pretty much full but the disk is big enough to house more data.
Can you please enlarge the disk so we can comfortably use the machine again without running into `no space left on device` issues?
![broken 6 ](./assets/debian_broken_6.png )
### Broken Machine 7
The install works but the root partion is rediculously small.
Luckily the installation was done on a LVM volume so we can add more disks to it!
![broken 7 ](./assets/debian_broken_7.png )
2021-07-07 14:24:27 +02:00
### Broken Machine 8
2021-07-07 14:23:24 +02:00
I **know** the user and password for my main account are isib/isib but I can't log in!
There *must* be something weird with my account definition.
![broken 8 ](./assets/debian_broken_8.png )