updates the broken machines doc
This commit is contained in:
parent
ce6a4fd5b1
commit
34e46e0ede
|
@ -0,0 +1,34 @@
|
||||||
|
# Hardware
|
||||||
|
|
||||||
|
* compare `/proc/interrupts` between a physical machine, a VM and a Raspberry Pi
|
||||||
|
* compare `/proc/ioports` between a physical machine, a VM and a Raspberry Pi
|
||||||
|
* compare `/proc/dma` between a physical machine, a VM and a Raspberry Pi
|
||||||
|
* install a physical machine, first with BIOS, next with UEFI via debian expert install
|
||||||
|
* inspect the link between `kernelspace` and `userspace` via `strace`
|
||||||
|
* learn about device ID's via `udev` rules
|
||||||
|
* manage hdd's in a VM to explore SATA, SCSI, etc
|
||||||
|
* install debian on a LVM and expand with a second disk
|
||||||
|
* add a new hdd after installation, format, mount it and add it to fstab
|
||||||
|
|
||||||
|
# Booting
|
||||||
|
|
||||||
|
* replace systemd with sysV
|
||||||
|
|
||||||
|
# Topic 103: GNU and Unix Commands
|
||||||
|
|
||||||
|
* explore different shells
|
||||||
|
* basic regex exercises
|
||||||
|
* vim regex exercises on html/md files
|
||||||
|
* sed exercises for multiple files
|
||||||
|
|
||||||
|
# 103.5 Create, monitor and kill processes
|
||||||
|
|
||||||
|
* deep dive into htop with strace and lsof
|
||||||
|
* use ps and pgrep for scripting purposes
|
||||||
|
* practical usage of `nice` with compilation tests
|
||||||
|
* `nohup`
|
||||||
|
|
||||||
|
# 104.6 Create and change hard and symbolic links
|
||||||
|
|
||||||
|
* git dotfiles with symlinks
|
||||||
|
* nginx sites-enabled vs sites-available
|
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
|
@ -1,10 +1,12 @@
|
||||||
# Broken Machines
|
# Broken Machines
|
||||||
|
|
||||||
Over the coarse of my Linux career I broke quite a few machines.
|
Over the coarse of my Linux career I broke quite a few machines.
|
||||||
Hopefully you can fix them for me.
|
Hopefully you can fix these for me.
|
||||||
The username and password of the first account created is isib/isib unless mentioned in the exercise.
|
The username and password of the first account created is isib/isib unless mentioned in the exercise.
|
||||||
|
|
||||||
## Broken Machine 1
|
## GRUB problems
|
||||||
|
|
||||||
|
### Broken Machine 1
|
||||||
|
|
||||||
I messed up and forgot to install grub during the Debian installation.
|
I messed up and forgot to install grub during the Debian installation.
|
||||||
Can you find a way to fix this for me please?
|
Can you find a way to fix this for me please?
|
||||||
|
@ -12,21 +14,77 @@ Thanks!
|
||||||
|
|
||||||
![broken 1](./assets/debian_broken_1.png)
|
![broken 1](./assets/debian_broken_1.png)
|
||||||
|
|
||||||
## Broken Machine 2
|
#### Tips
|
||||||
|
|
||||||
|
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/).
|
||||||
|
|
||||||
|
### Broken Machine 2
|
||||||
|
|
||||||
This machine seems to boot into `htop` and nothing else!
|
This machine seems to boot into `htop` and nothing else!
|
||||||
There must be a way to fix this without having to reinstall the machine.
|
There must be a way to fix this without having to reinstall the machine.
|
||||||
|
|
||||||
![broken 2](./assets/debian_broken_2.png)
|
![broken 2](./assets/debian_broken_2.png)
|
||||||
|
|
||||||
## Broken Machine 3
|
#### 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
|
||||||
|
|
||||||
Not `htop` again!
|
Not `htop` again!
|
||||||
|
|
||||||
![broken 3](./assets/debian_broken_3.png)
|
![broken 3](./assets/debian_broken_3.png)
|
||||||
|
|
||||||
## Broken Machine 4
|
#### 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
|
||||||
|
|
||||||
I forgot my password...
|
I forgot my password...
|
||||||
|
|
||||||
![broken 4](./assets/debian_broken_4.png)
|
![broken 4](./assets/debian_broken_4.png)
|
||||||
|
|
||||||
|
#### 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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue