Update INITIATION.md

This commit is contained in:
mayfrost 2018-07-11 10:22:33 +00:00 committed by GitHub
parent 2acd9bfc3a
commit 7f953bf4ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,8 +30,9 @@ Boot in UEFI mode if on UEFI, BIOS if on BIOS, and select installation media. Th
* Check which NIC you are using. * Check which NIC you are using.
`ip addr` `ip addr`
* Make sure your network is up. * Make sure your network is up.
```ip link set <NIC> up ```
dhcpcd <NIC> ip link set <NIC> up
dhcpcd <NIC>
``` ```
In the case you need Wi-Fi please refer to https://github.com/mayfrost/guides/blob/master/NETWORKING.md In the case you need Wi-Fi please refer to https://github.com/mayfrost/guides/blob/master/NETWORKING.md
@ -46,14 +47,14 @@ In these examples we make only two partitions but you can extend this if you kno
* Use parted. * Use parted.
`parted /dev/sda` `parted /dev/sda`
* Inside parted, if on UEFI label the disk "_gpt_", but if on BIOS label it "_msdos_". * Inside parted, if on UEFI label the disk "_gpt_", but if on BIOS label it "_msdos_".
``` ```
mklabel <LABEL> mklabel <LABEL>
unit mb unit mb
mkpart primary 0g 128 mkpart primary 0g 128
mkpart primary 128 -1 mkpart primary 128 -1
toggle 1 boot toggle 1 boot
p free p free
quit quit
``` ```
## FILESYSTEM ## FILESYSTEM
@ -81,8 +82,9 @@ The two most important are the root directory ("_/_") and the boot directory ("_
`mkdir /mnt/boot` `mkdir /mnt/boot`
`mount /dev/sda1 /mnt/boot` `mount /dev/sda1 /mnt/boot`
* If on UEFI make boot directory and mount. * If on UEFI make boot directory and mount.
```mkdir -p /mnt/boot/efi ```
mount /dev/sda1 /mnt/boot/efi mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
``` ```
* Create other directories under the new root directory. * Create other directories under the new root directory.
`mkdir -p /mnt/{dev,sys,proc,tmp,usr/src,var}` `mkdir -p /mnt/{dev,sys,proc,tmp,usr/src,var}`
@ -93,20 +95,22 @@ Don't forget to create and mount the extra directories in the case you had creat
* On __CRUX__ run "_setup_", and if on UEFI during the setup select grub2-efi (if using GRUB 2), efibootmgr, and elfutils from opt (only select core, and say yes when you're asked if you want to select individual packages). And if you are not using LILO de-select it from core. * On __CRUX__ run "_setup_", and if on UEFI during the setup select grub2-efi (if using GRUB 2), efibootmgr, and elfutils from opt (only select core, and say yes when you're asked if you want to select individual packages). And if you are not using LILO de-select it from core.
`setup` `setup`
* On __Source Mage GNU/Linux__ download and uncompress the tarball inside the new root directory. * On __Source Mage GNU/Linux__ download and uncompress the tarball inside the new root directory.
```cd /mnt ```
cd /mnt
wget -c "http://download.sourcemage.org/image/official/smgl-stable-<VERSION>-basesystem-x86_64.tar.xz" wget -c "http://download.sourcemage.org/image/official/smgl-stable-<VERSION>-basesystem-x86_64.tar.xz"
tar xJvf smgl-stable-<VERSION>-basesystem-x86_64.tar.xz tar xJvf smgl-stable-<VERSION>-basesystem-x86_64.tar.xz
``` ```
### CHROOT ### CHROOT
* On __CRUX__ you can issue the next command to mount everything else and chroot automatically. * On __CRUX__ you can issue the next command to mount everything else and chroot automatically.
`setup-chroot`   `setup-chroot`  
* On __Source Mage GNU/Linux__ mount everything else manually. * On __Source Mage GNU/Linux__ mount everything else manually.
```mount --bind /dev /mnt/dev ```
mount --bind /dev /mnt/dev
mount --bind /tmp /mnt/tmp mount --bind /tmp /mnt/tmp
mount --bind /sys /mnt/sys mount --bind /sys /mnt/sys
mount -t proc none /mnt/proc mount -t proc none /mnt/proc
mount -t devpts none /mnt/dev/pts mount -t devpts none /mnt/dev/pts
``` ```
* On __Source Mage GNU/Linux__ chroot manually specifying Bash in case live media has another shell. * On __Source Mage GNU/Linux__ chroot manually specifying Bash in case live media has another shell.
`chroot /mnt /bin/bash` `chroot /mnt /bin/bash`
@ -116,9 +120,10 @@ mount -t devpts none /mnt/dev/pts
### CHANGE NETWORK INTERFACES ### CHANGE NETWORK INTERFACES
* On __CRUX__ modify "_/etc/rc.d/net_" with the rules you want (IP, gateway, domain, etc). * On __CRUX__ modify "_/etc/rc.d/net_" with the rules you want (IP, gateway, domain, etc).
* On __Source Mage GNU/Linux__ add preferred interfaces to "_/etc/network/interfaces_" for example. * On __Source Mage GNU/Linux__ add preferred interfaces to "_/etc/network/interfaces_" for example.
```auto eth0 ```
auto eth0
allow-hotplug eth0 allow-hotplug eth0
iface eth0 inet dhcp iface eth0 inet dhcp
``` ```
* On the "_/etc/resolv.conf.head_" file set your preferred DNS provider (this example is from [OpenNIC](https://servers.opennicproject.org/)). * On the "_/etc/resolv.conf.head_" file set your preferred DNS provider (this example is from [OpenNIC](https://servers.opennicproject.org/)).
`nameserver 185.121.177.177` `nameserver 185.121.177.177`
@ -126,8 +131,9 @@ iface eth0 inet dhcp
### EDIT FSTAB ### EDIT FSTAB
* Change the "_/etc/fstab_" file with appropriate filesystems. * Change the "_/etc/fstab_" file with appropriate filesystems.
```\/dev/sda1 /boot <BOOTLOADER_FILESYSTEM> defaults 0 2 ```
/dev/sda2 / <ROOT_FILESYSTEM> noatime 0 1 /dev/sda1 /boot <BOOTLOADER_FILESYSTEM> defaults 0 2
/dev/sda2 / <ROOT_FILESYSTEM> noatime 0 1
``` ```
* On __CRUX__ uncomment the lines referring to "_devpts_", "_tmp_", and "_shm_" as some programs require it (Firefox), also "_USB_" and or "_cdrom_" if using those. * On __CRUX__ uncomment the lines referring to "_devpts_", "_tmp_", and "_shm_" as some programs require it (Firefox), also "_USB_" and or "_cdrom_" if using those.
* If on UEFI replace "_/boot_" with "_/boot/efi_". * If on UEFI replace "_/boot_" with "_/boot/efi_".
@ -145,8 +151,9 @@ iface eth0 inet dhcp
## KERNEL ## KERNEL
Next are simple examples of compiling the kernel, for a more in depth view see: https://github.com/mayfrost/guides/blob/master/KERNEL.md Next are simple examples of compiling the kernel, for a more in depth view see: https://github.com/mayfrost/guides/blob/master/KERNEL.md
* On __CRUX__. * On __CRUX__.
```cd /usr/src/linux-<VERSION> ```
make all modules_install install cd /usr/src/linux-<VERSION>
make all modules_install install
``` ```
* On __Source Mage GNU/Linux__ (__OPTIONAL__). * On __Source Mage GNU/Linux__ (__OPTIONAL__).
@ -161,7 +168,8 @@ __NOTE__: If you are on __Source Mage GNU/Linux__ and need UEFI refer to the boo
* If on UEFI use __elilo__ and change names to "_/etc/elilo.conf_" instead of "_/etc/lilo.conf_" and "_elilo_" instead of "_lilo_" in commands. * If on UEFI use __elilo__ and change names to "_/etc/elilo.conf_" instead of "_/etc/lilo.conf_" and "_elilo_" instead of "_lilo_" in commands.
`nano /etc/lilo.conf` `nano /etc/lilo.conf`
* Inserting "_password=\<PASSWORD>_" inside an OS stanza will protect with a password that OS, but inserting "_password=\<PASSWORD>_" just before the stanzas and outside any of them will protect with a password the bootloader itself (notice the space inside stanzas). * Inserting "_password=\<PASSWORD>_" inside an OS stanza will protect with a password that OS, but inserting "_password=\<PASSWORD>_" just before the stanzas and outside any of them will protect with a password the bootloader itself (notice the space inside stanzas).
```boot = /dev/sda ```
boot = /dev/sda
image = /boot/vmlinuz image = /boot/vmlinuz
Label = <DISTRO_NAME> Label = <DISTRO_NAME>
root = /dev/sda<PARTITION_NUMBER_OF_ROOT> root = /dev/sda<PARTITION_NUMBER_OF_ROOT>
@ -170,11 +178,12 @@ other = /dev/sda<PARTITION_NUMBER_OF_FREEDOS>
Label = FreeDOS Label = FreeDOS
other = /dev/sda<PARTITION_NUMBER_OF_WINDOWS> other = /dev/sda<PARTITION_NUMBER_OF_WINDOWS>
table = /dev/sda table = /dev/sda
Label = Windows7 Label = Windows7
``` ```
* Set boot entry. * Set boot entry.
```lilo -A /dev/sda 1 ```
lilo lilo -A /dev/sda 1
lilo
``` ```
* Prevent anyone but root of reading the config file (in case you used a password). * Prevent anyone but root of reading the config file (in case you used a password).
`chmod 600 /etc/lilo.conf` `chmod 600 /etc/lilo.conf`