mirror of
https://github.com/mayfrost/guides.git
synced 2024-11-28 02:11:46 +00:00
Update Initiation.md
This commit is contained in:
parent
a2eaac930e
commit
d2e5cd9845
230
Initiation.md
230
Initiation.md
@ -23,38 +23,38 @@ 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`
|
||||||
|
|
||||||
* Make root filesystem according to your personal preference
|
* Make root filesystem according to your personal preference
|
||||||
`mkfs.<ROOT_FILESYSTEM> /dev/sda2
|
`mkfs.<ROOT_FILESYSTEM> /dev/sda2`
|
||||||
mkdir /mnt/drive
|
`mkdir /mnt/drive`
|
||||||
mount /dev/sda2 /mnt/drive`
|
`mount /dev/sda2 /mnt/drive`
|
||||||
* Make boot filesystem according to supported bootloader or just "_mkfs.vfat_" if on UEFI
|
* Make boot filesystem according to supported bootloader or just "_mkfs.vfat_" if on UEFI
|
||||||
`mkfs.<BOOTLOADER_FILESYSTEM> /dev/sda1`
|
`mkfs.<BOOTLOADER_FILESYSTEM> /dev/sda1`
|
||||||
* If on BIOS make directory and mount
|
* If on BIOS make directory and mount
|
||||||
`mkdir /mnt/drive/boot
|
`mkdir /mnt/drive/boot`
|
||||||
mount /dev/sda1 /mnt/drive/boot`
|
`mount /dev/sda1 /mnt/drive/boot`
|
||||||
* If on UEFI make directory and mount
|
* If on UEFI make directory and mount
|
||||||
`mkdir -p /mnt/drive/boot/efi
|
`mkdir -p /mnt/drive/boot/efi`
|
||||||
mount /dev/sda1 /mnt/drive/boot/efi
|
`mount /dev/sda1 /mnt/drive/boot/efi`
|
||||||
cd /mnt/drive
|
`cd /mnt/drive`
|
||||||
mount --bind /dev /mnt/drive/dev
|
`mount --bind /dev /mnt/drive/dev`
|
||||||
mount --bind /sys /mnt/drive/sys
|
`mount --bind /sys /mnt/drive/sys`
|
||||||
mount -t proc none /mnt/drive/proc
|
`mount -t proc none /mnt/drive/proc`
|
||||||
mount -t devpts none /mnt/drive/dev/pts`
|
`mount -t devpts none /mnt/drive/dev/pts`
|
||||||
|
|
||||||
## SETUP
|
## SETUP
|
||||||
* On __CRUX__ run "_setup_", and if on UEFI select on setup 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 select on setup 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 __Source Mage GNU/Linux__ get the tarball
|
* On __Source Mage GNU/Linux__ get the tarball
|
||||||
`cd /mnt/drive
|
`cd /mnt/drive`
|
||||||
wget -c "http://download.sourcemage.org/image/official/smgl-stable-<version>-basesystem-x86_64.<compression>"
|
`wget -c "http://download.sourcemage.org/image/official/smgl-stable-<version>-basesystem-x86_64.<compression>"`
|
||||||
tar xvf smgl-stable-<version>-basesystem-x86_64.<compression>`
|
`tar xvf smgl-stable-<version>-basesystem-x86_64.<compression>`
|
||||||
|
|
||||||
### Chroot
|
### Chroot
|
||||||
* Chroot specifying Bash in case live media has another shell
|
* Chroot specifying Bash in case live media has another shell
|
||||||
@ -65,17 +65,17 @@ tar xvf smgl-stable-<version>-basesystem-x86_64.<compression>`
|
|||||||
### Change the network interfaces
|
### Change the 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)
|
* On the "_/etc/resolv.conf.head_" file set your preferred DNS provider (this example is from OpenNIC)
|
||||||
`nameserver 193.41.79.236`
|
`nameserver 193.41.79.236`
|
||||||
* Or copy "_/etc/resolv.conf_" to "_/mnt/etc/resolv.conf_" __BEFORE__ chrooting
|
* Or copy "_/etc/resolv.conf_" to "_/mnt/etc/resolv.conf_" __BEFORE__ chrooting
|
||||||
|
|
||||||
### 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/sda1 /boot <BOOTLOADER_FILESYSTEM> defaults 0 2`
|
||||||
/dev/sda2 / <ROOT_FILESYSTEM> noatime 0 1`
|
`/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_"
|
||||||
|
|
||||||
@ -95,12 +95,12 @@ iface eth0 inet dhcp`
|
|||||||
* Include device drivers you need, build the rest as modules.
|
* Include device drivers you need, build the rest as modules.
|
||||||
|
|
||||||
* On __CRUX__
|
* On __CRUX__
|
||||||
`cd /usr/src/linux-<VERSION>
|
`cd /usr/src/linux-<VERSION>`
|
||||||
make menuconfig
|
`make menuconfig`
|
||||||
make all
|
`make all`
|
||||||
make modules_install
|
`make modules_install`
|
||||||
cp arch/x86/boot/bzImage /boot/vmlinuz
|
`cp arch/x86/boot/bzImage /boot/vmlinuz`
|
||||||
cp System.map /boot`
|
`cp System.map /boot`
|
||||||
|
|
||||||
* On __Source Mage GNU/Linux__ (__OPTIONAL__)
|
* On __Source Mage GNU/Linux__ (__OPTIONAL__)
|
||||||
`cast -r linux`
|
`cast -r linux`
|
||||||
@ -121,107 +121,107 @@ cp System.map /boot`
|
|||||||
* 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_DISTRO>
|
` root = /dev/sda<PARTITION_NUMBER_OF_DISTRO>`
|
||||||
other = /dev/sda<PARTITION_NUMBER_OF_FREEDOS>
|
`other = /dev/sda<PARTITION_NUMBER_OF_FREEDOS>`
|
||||||
table = /dev/sda
|
` table = /dev/sda`
|
||||||
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`
|
||||||
`lilo -A /dev/sda 1
|
`lilo -A /dev/sda 1`
|
||||||
lilo`
|
`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`
|
||||||
|
|
||||||
### SYSLINUX
|
### SYSLINUX
|
||||||
* If on BIOS make directory and copy files accordingly
|
* If on BIOS make directory and copy files accordingly
|
||||||
`mkdir -p /boot/syslinux
|
`mkdir -p /boot/syslinux`
|
||||||
cp /usr/lib/syslinux/bios/*.c32 /boot/syslinux/`
|
`cp /usr/lib/syslinux/bios/*.c32 /boot/syslinux/`
|
||||||
* If on UEFI make directory and copy files accordingly
|
* If on UEFI make directory and copy files accordingly
|
||||||
`mkdir -p /boot/efi/EFI/syslinux
|
`mkdir -p /boot/efi/EFI/syslinux`
|
||||||
cp -r /usr/lib/syslinux/efi64/* /boot/efi/EFI/syslinux/`
|
`cp -r /usr/lib/syslinux/efi64/* /boot/efi/EFI/syslinux/`
|
||||||
* If on BIOS setup boot entry
|
* If on BIOS setup boot entry
|
||||||
`umount /dev/sda1
|
`umount /dev/sda1`
|
||||||
syslinux --directory syslinux --install /dev/sda1
|
`syslinux --directory syslinux --install /dev/sda1`
|
||||||
mount /dev/sda1 /boot`
|
`mount /dev/sda1 /boot`
|
||||||
* If on UEFI setup boot entry using "_efibootmgr_"
|
* If on UEFI setup boot entry using "_efibootmgr_"
|
||||||
`umount /dev/sda1
|
`umount /dev/sda1`
|
||||||
efibootmgr -c -d /dev/sda -p 1 -l /boot/efi/EFI/syslinux/syslinux.efi -L Syslinux
|
`efibootmgr -c -d /dev/sda -p 1 -l /boot/efi/EFI/syslinux/syslinux.efi -L Syslinux`
|
||||||
mount /dev/sda1 /boot/efi`
|
`mount /dev/sda1 /boot/efi`
|
||||||
* Edit "_/boot/syslinux/syslinux.cfg_" if on BIOS or "_/boot/efi/EFI/syslinux/syslinux.cfg_" if on UEFI
|
* Edit "_/boot/syslinux/syslinux.cfg_" if on BIOS or "_/boot/efi/EFI/syslinux/syslinux.cfg_" if on UEFI
|
||||||
* "_splash.png_" is the splash screen image located in "_/boot/syslinux/_" if on BIOS or "_/boot/efi/EFI/syslinux/_" if on UEFI
|
* "_splash.png_" is the splash screen image located in "_/boot/syslinux/_" if on BIOS or "_/boot/efi/EFI/syslinux/_" if on UEFI
|
||||||
`PROMPT 1
|
`PROMPT 1`
|
||||||
TIMEOUT 50
|
`TIMEOUT 50`
|
||||||
MENU BACKGROUND splash.png
|
`MENU BACKGROUND splash.png`
|
||||||
DEFAULT <DISTRO_NAME>
|
`DEFAULT <DISTRO_NAME>`
|
||||||
LABEL <DISTRO_NAME>
|
`LABEL <DISTRO_NAME>`
|
||||||
MENU LABEL <DISTRO_NAME>
|
` MENU LABEL <DISTRO_NAME>`
|
||||||
LINUX /boot/vmlinuz
|
` LINUX /boot/vmlinuz`
|
||||||
INITRD /boot/initramfs.img
|
` INITRD /boot/initramfs.img`
|
||||||
LABEL FreeDOS
|
`LABEL FreeDOS`
|
||||||
MENU LABEL FreeDOS
|
` MENU LABEL FreeDOS`
|
||||||
KERNEL chain.c32
|
` KERNEL chain.c32`
|
||||||
APPEND sda <PARTITION_NUMBER_OF_FREEDOS>
|
` APPEND sda <PARTITION_NUMBER_OF_FREEDOS>`
|
||||||
LABEL Windows7
|
`LABEL Windows7`
|
||||||
MENU LABEL Windows7
|
` MENU LABEL Windows7`
|
||||||
KERNEL chain.c32
|
` KERNEL chain.c32`
|
||||||
APPEND sda <PARTITION_NUMBER_OF_WINDOWS>`
|
` APPEND sda <PARTITION_NUMBER_OF_WINDOWS>`
|
||||||
|
|
||||||
### GRUB Legacy
|
### GRUB Legacy
|
||||||
* If on BIOS setup boot entry (boot partition must be mounted)
|
* If on BIOS setup boot entry (boot partition must be mounted)
|
||||||
`mount /dev/sda1 /boot
|
`mount /dev/sda1 /boot`
|
||||||
grub-install /dev/sda`
|
`grub-install /dev/sda`
|
||||||
* If on UEFI setup boot entry (boot partition must be mounted)
|
* If on UEFI setup boot entry (boot partition must be mounted)
|
||||||
`mount /dev/sda1 /boot/efi
|
`mount /dev/sda1 /boot/efi`
|
||||||
grub-install /boot/efi`
|
grub-install /boot/efi`
|
||||||
* Edit configuration file "_/boot/grub/menu.lst_"
|
* Edit configuration file "_/boot/grub/menu.lst_"
|
||||||
`default=0
|
`default=0`
|
||||||
timeout=10
|
`timeout=10`
|
||||||
splashimage=(hd0,0)/grub/splash.xpm.gz
|
`splashimage=(hd0,0)/grub/splash.xpm.gz`
|
||||||
#hiddenmenu
|
`#hiddenmenu`
|
||||||
title <DISTRO_NAME> (<KERNEL_VERSION>)
|
`title <DISTRO_NAME> (<KERNEL_VERSION>)`
|
||||||
root (hd0,<PARTITION_NUMBER_OF_DISTRO>)
|
` root (hd0,<PARTITION_NUMBER_OF_DISTRO>)`
|
||||||
kernel /vmlinuz-<KERNEL_VERSION> ro root=/dev/sda5 rhgb quiet
|
` kernel /vmlinuz-<KERNEL_VERSION> ro root=/dev/sda5 rhgb quiet`
|
||||||
initrd /initramfs-<KERNEL_VERSION>.img
|
` initrd /initramfs-<KERNEL_VERSION>.img`
|
||||||
title <DISTRO_NAME_alternative_kernel> (<ANOTHER_KERNEL_VERSION>)
|
`title <DISTRO_NAME_alternative_kernel> (<ANOTHER_KERNEL_VERSION>)`
|
||||||
root (hd0,<PARTITION_NUMBER_OF_DISTRO>)
|
` root (hd0,<PARTITION_NUMBER_OF_DISTRO>)`
|
||||||
kernel /vmlinuz-<ANOTHER_KERNEL_VERSION> ro root=/dev/sda5 rhgb quiet
|
` kernel /vmlinuz-<ANOTHER_KERNEL_VERSION> ro root=/dev/sda5 rhgb quiet`
|
||||||
initrd /initramfs-<ANOTHER_KERNEL_VERSION>.img
|
` initrd /initramfs-<ANOTHER_KERNEL_VERSION>.img`
|
||||||
title FreeDOS
|
`title FreeDOS`
|
||||||
root (hd0,<PARTITION_NUMBER_OF_FREEDOS>)
|
` root (hd0,<PARTITION_NUMBER_OF_FREEDOS>)`
|
||||||
kernel /memdisk
|
` kernel /memdisk`
|
||||||
initrd (hd0,<PARTITION_NUMBER_OF_FREEDOS>)/fdboot.img
|
` initrd (hd0,<PARTITION_NUMBER_OF_FREEDOS>)/fdboot.img`
|
||||||
title Windows 7
|
`title Windows 7`
|
||||||
root (hd0,<PARTITION_NUMBER_OF_WINDOWS>)
|
` root (hd0,<PARTITION_NUMBER_OF_WINDOWS>)`
|
||||||
chainloader /EFI/Microsoft/Boot/bootmgfw.efi`
|
` chainloader /EFI/Microsoft/Boot/bootmgfw.efi`
|
||||||
|
|
||||||
### GRUB 2
|
### GRUB 2
|
||||||
* If on BIOS setup boot entry (boot partition must be mounted)
|
* If on BIOS setup boot entry (boot partition must be mounted)
|
||||||
`mount /dev/sda1 /boot
|
`mount /dev/sda1 /boot`
|
||||||
grub-install /dev/sda`
|
grub-install /dev/sda`
|
||||||
* If on UEFI setup boot entry (boot partition must be mounted)
|
* If on UEFI setup boot entry (boot partition must be mounted)
|
||||||
`mount /dev/sda1 /boot/efi
|
`mount /dev/sda1 /boot/efi`
|
||||||
grub-install /boot/efi`
|
`grub-install /boot/efi`
|
||||||
* If Grub does not detect your OS run "os-prober" followed by "update-grub"
|
* If Grub does not detect your OS run "os-prober" followed by "update-grub"
|
||||||
* Or add the OS manually to the Grub config file "_/etc/grub.d/40_custom_"
|
* Or add the OS manually to the Grub config file "_/etc/grub.d/40_custom_"
|
||||||
`menuentry "FreeDOS" {
|
`menuentry "FreeDOS" {`
|
||||||
set root='(hd0,msdos2)'
|
`set root='(hd0,msdos2)'`
|
||||||
linux16 /memdisk
|
`linux16 /memdisk`
|
||||||
initrd16 /fdboot.img
|
`initrd16 /fdboot.img`
|
||||||
chainloader +1
|
`chainloader +1`
|
||||||
}
|
`}`
|
||||||
menuentry "Windows 7" {
|
`menuentry "Windows 7" {`
|
||||||
insmod part_msdos
|
`insmod part_msdos`
|
||||||
insmod ntfs
|
`insmod ntfs`
|
||||||
insmod search_fs_uuid
|
`insmod search_fs_uuid`
|
||||||
insmod ntldr
|
`insmod ntldr`
|
||||||
search --fs-uuid --no-floppy --set=root 3482FBC382FB879E
|
`search --fs-uuid --no-floppy --set=root 3482FBC382FB879E`
|
||||||
chainloader +1
|
`chainloader +1`
|
||||||
ntldr /bootmgr
|
`ntldr /bootmgr`
|
||||||
}`
|
`}`
|
||||||
* Update config file
|
* Update config file
|
||||||
`grub-mkconfig -o /boot/grub/grub.cfg`
|
`grub-mkconfig -o /boot/grub/grub.cfg`
|
||||||
|
|
||||||
@ -230,7 +230,6 @@ ntldr /bootmgr
|
|||||||
`exit`
|
`exit`
|
||||||
* Shutdown the machine
|
* Shutdown the machine
|
||||||
`shutdown -h now`
|
`shutdown -h now`
|
||||||
|
|
||||||
And done.
|
And done.
|
||||||
|
|
||||||
|
|
||||||
@ -238,13 +237,13 @@ And done.
|
|||||||
|
|
||||||
### ENABLE CONTRIB
|
### ENABLE CONTRIB
|
||||||
* Enable contrib for ports
|
* Enable contrib for ports
|
||||||
`cd /etc/ports
|
`cd /etc/ports`
|
||||||
mv contrib.rsync.inactive contrib.rsync`
|
`mv contrib.rsync.inactive contrib.rsync`
|
||||||
* Enable contrib for prt-get
|
* Enable contrib for prt-get
|
||||||
`nano /etc/prt-get.conf`
|
`nano /etc/prt-get.conf`
|
||||||
* Uncomment line "_prtdir /usr/ports/contrib_"
|
* Uncomment line "_prtdir /usr/ports/contrib_"
|
||||||
|
|
||||||
### ADD EXTERNAL REPOS
|
### ADD EXTERNAL REPOS ON CRUX
|
||||||
`cd /etc/ports/`
|
`cd /etc/ports/`
|
||||||
* download httpup/rsync file and pub file
|
* download httpup/rsync file and pub file
|
||||||
`wget -c <URL>`
|
`wget -c <URL>`
|
||||||
@ -254,7 +253,6 @@ mv contrib.rsync.inactive contrib.rsync`
|
|||||||
* Populate repo
|
* Populate repo
|
||||||
`ports -u <REPO>`
|
`ports -u <REPO>`
|
||||||
|
|
||||||
|
|
||||||
* Enable pre-/post-install scripts in "_/etc/prt-get.conf_" (usually safe to run repeatedly, usually used to rebuild caches and add system users when installing certain software)
|
* Enable pre-/post-install scripts in "_/etc/prt-get.conf_" (usually safe to run repeatedly, usually used to rebuild caches and add system users when installing certain software)
|
||||||
`nano /etc/prt-get.conf`
|
`nano /etc/prt-get.conf`
|
||||||
* uncomment line "_runscripts yes_"
|
* uncomment line "_runscripts yes_"
|
||||||
|
Loading…
Reference in New Issue
Block a user