Skip to content

Commit 262fe42

Browse files
committed
Move GRUB to x86 bare metal cheat
1 parent ac21aff commit 262fe42

34 files changed

+1302
-1242
lines changed

Diff for: 7zip.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# 7zip
22

3-
Microsoft proprietary program.
4-
53
Can do lots of formats:
64

75
- 7z format
@@ -11,3 +9,9 @@ Can do lots of formats:
119
But *use only for 7z*, which it was made for.
1210

1311
With 7zip, you can open `.exe` files to extract their inner data.
12+
13+
## ISO extract
14+
15+
`7z` looks like the best option besides mounting a loop back device: <http://unix.stackexchange.com/questions/70738/what-is-the-fastest-way-to-extract-an-iso>
16+
17+
7z -x a.iso

Diff for: README.md

+26-13
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ Includes Linux concepts and utilities that work on Linux, not necessarily in the
3030
1. [dmesg](demesg.md)
3131
1. [installkernel](installkernel.md)
3232
1. Initialization
33-
1. [Install Operating System](install-operating-system.md): how to install a new OS
34-
1. [Boot](boot.md)
35-
1. [GRUB](grub.md)
36-
1. [Init](init.md): System V, Upstart
33+
1. [Install Operating System](install-operating-system.md): how to install a new OS
34+
1. [Boot](boot.md)
35+
1. [Init](init.md): System V, Upstart
3736
1. System information
3837
1. [lsb_release](lsb_release.md)
3938
1. [uname](uname.md)
4039
1. Hardware
41-
[cpuid](cpuid.md)
42-
[lspci](lspci.md)
40+
1. [cpuid](cpuid.md)
41+
1. [lspci](lspci.md)
42+
1. [lsusb](lsusb.md)
4343
1. [Filesystem](filesystem.md)
4444
1. [File permissions](file-permissions.md)
4545
1. [Hardlink](hardlink.md)
@@ -50,8 +50,10 @@ Includes Linux concepts and utilities that work on Linux, not necessarily in the
5050
1. [FUSE](FUSE.md)
5151
1. [fuser](fuser.md)
5252
1. [lsblk](lsblk.md)
53+
1. [fstab](fstab.md)
5354
1. [mountall](mountall.md)
5455
1. [pathchk](pathchk.md)
56+
1. [sync](sync.md)
5557
1. [swap partition](swap-partition.md)
5658
1. [tune2fs](tune2fs.md)
5759
1. [UUID](uuid.md)
@@ -87,17 +89,20 @@ Includes Linux concepts and utilities that work on Linux, not necessarily in the
8789
1. [stat](stat.md)
8890
1. [tree](tree.md)
8991
1. Permissions
90-
1. [chown](chown.sh)
91-
1. [chmod](chmod.sh)
92+
1. [chown](chown.sh)
93+
1. [chmod](chmod.sh)
9294
1. File managers
93-
1. [Krusader](krusader.md)
94-
1. [vifm](vifm.md)
95+
1. [Krusader](krusader.md)
96+
1. [vifm](vifm.md)
9597
1. Partitions
9698
1. [parted](parted.md)
9799
1. [gparted](gparted.md)
100+
1. [Home partition](home-partition.md)
101+
1. [MBR](mbr.md)
102+
1. [GPT](gpt.md)
98103
1. [CD DVD](cd-dvd.md)
99-
[isoinfo](isoinfo.md)
100-
[eject](eject.md)
104+
1. [isoinfo](isoinfo.md)
105+
1. [eject](eject.md)
101106
1. [Terminal](terminal.md): terminal emulators, ANSI escapes, control characters
102107
1. [Guake](guake.sh)
103108
1. Stream and file manipulation
@@ -202,15 +207,23 @@ Includes Linux concepts and utilities that work on Linux, not necessarily in the
202207
1. User accounts
203208
1. [id](id.md)
204209
1. [usermod](usermod.md)
205-
1. [Desktop](desktop/): X, XDG, GNOME, KDE and related utilities
210+
1. [Desktop](desktop.md)
211+
1. [X11](x11.md)
212+
1. [freedesktop.org](freedesktop-org.md)
213+
1. [Display manager](display-manager.md)
214+
1. [LightDM](lightdm.md)
215+
1. [Window manager](window-manager.md)
206216
1. [Default applications](default-applications.md)
207217
1. [update-alternatives](update-alternatives.md)
218+
1. [Startup programs](startup-programs.md)
208219
1. Notifications
209220
1. [libnotify](libnotify.md)
210221
1. [zenity](zenity.md)
211222
1. Screenshots
212223
1. [recordMyDesktop](recordMyDesktop.md)
213224
1. [xwd](xwd.md)
225+
1. [Screensaver](screensaver.md)
226+
1. [IBus](ibus.md)
214227
1. [logkeys](logkeys.md)
215228
1. [setleds](setleds.md)
216229
1. [solaar](solaar.md)

Diff for: audio/README.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ WAV to MP3:
7373

7474
### id3tool
7575

76-
Get id3 tags info (for mp3 for example):
76+
Get id3 tags info (for MP3 for example):
7777

7878
TITLE="`id3tool "$1" | grep '^Song Title:' | awk '{ for (i=3;i<=NF;i++) { printf $i; printf " " } }'`"
7979
ARTIST="`id3tool "$1" | grep '^Artist:' | awk '{ for (i=2;i<=NF;i++) { printf $i; printf " " } }'`"
@@ -91,17 +91,28 @@ GUI.
9191

9292
#### shntool
9393

94-
Single APE and CUE in dir, FLAC output, formatted as number, author, track
94+
Single APE and CUE in dir, FLAC output, formatted as `number - author - track`
9595

96-
shntool split -f *.cue -o flac *.ape -t '%n - %p - %t'
96+
shntool split -f *.cue -o flac -t '%n - %p - %t' *.ape
97+
98+
You need the `mac` CLI tool to do this, and the easiest way to get it is with:
99+
100+
sudo add-apt-repository -y ppa:flacon
101+
sudo apt-get update
102+
sudo apt-get install -y flacon
103+
104+
See also:
105+
106+
- <http://unix.stackexchange.com/questions/165485/why-can-i-not-split-a-ape-file>
107+
- <http://superuser.com/questions/251362/split-monkeyaudio-ape-cue-log-of-whole-audio-cd-into-mp3-of-individual>
97108

98109
### SoX
99110

100111
Set of utilities record, play and modify files via CLI.
101112

102113
Interactive front end for libSoX.
103114

104-
Must install available formats separatelly.
115+
Must install available formats separately.
105116

106117
Record from microphone into `a.wav` file:
107118

Diff for: boot.md

+2-37
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,13 @@
22

33
Info on the boot process and its configuration.
44

5-
## BIOS
6-
7-
TODO
8-
9-
## Bootload
10-
11-
Bootloading is the name of the process for starting up the system, in particular loading the kernel code, also called kernel image, into RAM memory.
12-
13-
Summary of the boot process:
14-
15-
- <http://www.ibm.com/developerworks/library/l-linuxboot/>
16-
- <http://www.thegeekstuff.com/2011/02/linux-boot-process/>
17-
18-
The first thing the computer does is to run fixed code from the BIOS.
19-
20-
It tries to find all the devices all devices that can contain a kernel image like: hard disk, CD/DVD, flash drives, floppies.
21-
22-
It searches for the Master Boot Record (MBR).
23-
24-
In normal desktop operation, the hard disk is the main MBR source, but when you install your OS, you load it from either a CD / DVD or USB stick.
25-
26-
The search order is deterministic and configurable. Typically the first and default option is the hard disk.
27-
28-
The first splash screen shown to the users comes from this process.
29-
30-
If you are quick enough on you keyboard, you can stop the default boot, and manually chose another boot source.
31-
32-
This way you can tell your BIOS to take a live CD or USB even if the OS is installed on the hard disk.
33-
34-
## Second stage bootloader
35-
36-
The 512B of the MBR is a too little space for having a flexible boot system.
37-
38-
The MBR points to a second stage bootloader in its disk which which will do the actual booting.
39-
40-
The most popular second stage bootloader for Linux now is GRUB. LILO was a popular alternative in the past. Windows has its own bootloader.
5+
First you must understand the non-Linux-specifics with minimal examples: <https://github.com/cirosantilli/x86-bare-metal-examples>
416

427
## boot directory
438

449
Usually located at `/boot/`.
4510

46-
It contains the following files:
11+
Contains the following Linux specific files:
4712

4813
- `config-VERSION`: the kernel configuration options, generated at configuration before kernel compilation by `make menuconfig`
4914
- `abi-VERSION`: TODO what is? Looks like the kernel symbol table of exported symbols.

Diff for: compression.md

+5
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ If you don't have very strict constraints, default to:
1313

1414
- `zip` if you want OS portability
1515
- `tar.gz` if you want to maintain Linux filesystem metadata intact: permissions, symlinks, etc.
16+
17+
TODO: underestand these formats:
18+
19+
- lzip. Extensions: `.lz`
20+
- Extension `.xz`. TODO.

0 commit comments

Comments
 (0)