This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
docs:man:installing_pld_linux_based_on_rescue_cd [2008-09-20 16:27] grizz |
docs:man:installing_pld_linux_based_on_rescue_cd [2019-01-21 20:15] arekm [Kernel installation] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | /* pragma: section-numbers 2 */ | ||
Line 5: | Line 6: | ||
===== TOC ===== | ===== TOC ===== | ||
- | [[#Requirements|#Requirements]] | + | /* UndefinedMacro: TableOfContents(None) */ |
+ | ===== Requirements ===== | ||
+ | Download RescueCD from : [[docs:rescuecd|Rescue CD]]. PLD rescue new is preferred. | ||
- | ===== Requirements ===== | + | ===== Partition disk ===== |
- | Download RescueCD from : [[http://rescuecd.pld-linux.org/|http://rescuecd.pld-linux.org/]] You need at least a i486 machine with 40MB RAM to run PLD RescueCD. | + | Use for example ''cfdisk'' to partition your destination disk. Usually root partition (/) and swap is enough. |
+ | \\ :!: Write something more here :!: | ||
+ | |||
+ | |||
+ | ===== Filesystem ===== | ||
+ | Initiate swap space: | ||
+ | <file># mkswap /dev/sda1 | ||
+ | </file> | ||
+ | |||
+ | Make filesystem (ex. ext4): | ||
+ | <file># mkfs.ext4 /dev/sda2 | ||
+ | </file> | ||
+ | |||
+ | We need to create mountpoint and mount partition into it: | ||
+ | <file># mkdir /pld | ||
+ | # mount /dev/sda2 /pld | ||
+ | </file> | ||
+ | |||
+ | If more partitions are going to be used (like you want to have separate /boot or /home) then these need to be mounted now, too. | ||
+ | ===== Network configuration of RescueCD ===== | ||
+ | |||
+ | RescueCD and installed PLD system will use the same way of configuring network. | ||
+ | |||
+ | By default both try to use DHCP to automatically configure network interface during a boot process. | ||
+ | If that works for you you don't need to do anything. | ||
+ | |||
+ | If manual configuration is required then configure networking using files below. | ||
+ | |||
+ | ==== eth0 interface configuration: /etc/sysconfig/interfaces/ifcfg-eth0 ==== | ||
+ | |||
+ | Assume you want 192.168.0.2 with /24 network (CIRD notation is preferred) | ||
+ | |||
+ | <file>DEVICE=eth0 | ||
+ | IPADDR=192.168.0.2/24 | ||
+ | ONBOOT=yes | ||
+ | BOOTPROTO=none | ||
+ | </file> | ||
+ | |||
+ | ==== Default gateway and default gateway interface configuration: /etc/sysconfig/network ==== | ||
+ | |||
+ | enable networking, ipv4 networking, set default gateway and interface which should be used to reach geteway: | ||
+ | |||
+ | <file> | ||
+ | NETWORKING=yes | ||
+ | IPV4_NETWORKING=yes | ||
+ | GATEWAY=192.168.0.254 | ||
+ | GATEWAYDEV=eth0 | ||
+ | </file> | ||
+ | |||
+ | ==== DNS resolver IP addresses configuration: /etc/resolv.conf ==== | ||
+ | |||
+ | Add default nameservers: | ||
+ | |||
+ | <file>nameserver 1.1.1.1 | ||
+ | nameserver 8.8.8.8</file> | ||
+ | |||
+ | === Reload network === | ||
+ | |||
+ | <file># service network restart</file> | ||
+ | |||
+ | |||
+ | ===== Poldek's configuration ===== | ||
+ | In file **/etc/poldek/repos.d/pld.conf** We need to set **_arch = ** to chosen architecture ex. | ||
+ | |||
+ | |||
+ | |||
+ | <file>_arch = x86_64 | ||
+ | </file> | ||
+ | |||
+ | |||
+ | ===== Packages installation ===== | ||
+ | |||
+ | All packages are installed using **poldek** tool (it is a package manager for PLD). | ||
+ | |||
+ | <file># rpm --root /pld --initdb | ||
+ | # poldek --root /pld | ||
+ | |||
+ | poldek> install LIST OF PACKAGES REQUIRED FOR RUNNING SYSTEM | ||
+ | </file> | ||
+ | |||
+ | Packages which make sense to be installed: | ||
+ | |||
+ | <file>udev pwdutils dhcpcd poldek vim geninitrd grub2 e2fsprogs tzdata glibc-localedb-all</file> | ||
+ | |||
+ | If **xfs** filesystem was chosen then please install: | ||
+ | |||
+ | <file>xfsprogs</file> | ||
+ | |||
+ | |||
+ | \\ :!: Write something more here :!: | ||
+ | |||
+ | |||
+ | |||
+ | ===== Kernel installation ===== | ||
+ | |||
+ | |||
+ | ==== Prepare to install kernel ==== | ||
+ | |||
+ | Before installing kernel you need to mount kernel proc, sys and dev filesystems inside of chroot: | ||
+ | |||
+ | <file># mount -o bind /proc /pld/proc | ||
+ | # mount -o bind /sys /pld/sys | ||
+ | # mount -o bind /dev /pld/dev | ||
+ | </file> | ||
+ | |||
+ | You need to tell initrd generator which hardware driver is needed to access your rootfs filesystem | ||
+ | by setting scsi_hostadapter alias in **/etc/modprobe,d/modprobe.conf** (or any other file in that directory) | ||
+ | |||
+ | <file>alias scsi_hostadapter ahci</file> | ||
+ | |||
+ | **lspci -k** command run on rescuecd can help you to find a correct driver: | ||
+ | |||
+ | <file> | ||
+ | 00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) | ||
+ | Kernel driver in use: ata_piix | ||
+ | Kernel modules: ata_piix, pata_acpi, ata_generic | ||
+ | </file> | ||
+ | |||
+ | Note **Kernel driver in use: ata_piix** (alias scsi_hostadapter ata_piix) | ||
+ | |||
+ | While at it, on actual installed PLD system (not needed on rescuecd), you can do the same for network card driver: | ||
+ | |||
+ | <file>alias netdev-eth0 e1000e</file> | ||
+ | |||
+ | (again **lspci -k** will help to choose correct one) | ||
+ | |||
+ | |||
+ | Configure **/pld/etc/fstab** ex.: | ||
+ | |||
+ | <file>/dev/sda1 swap swap defaults 0 0 | ||
+ | /dev/sda2 / ext4 defaults 0 0 | ||
+ | </file> | ||
+ | |||
+ | \\ :!: Write something more here :!: | ||
+ | |||
+ | |||
+ | |||
+ | ==== Kernel installation ==== | ||
+ | |||
+ | |||
+ | <file># poldek --root /pld -i kernel</file> | ||
+ | |||
+ | or | ||
+ | |||
+ | <file>#poldek --root /pld -i kernel-some-specific-version</file> | ||
+ | |||
+ | You can also install multiple different kernels. | ||
+ | |||
+ | By default kernel installation also generates initrd based on mounted /proc, /sys, /dev files and configured fstab, modprobe.conf and few others configuration files. generated initrd (which by default is initramfs cpio image) is saved in /boot. | ||
+ | |||
+ | If something fails or you want to regenerate initrd manually you can do it using: | ||
+ | |||
+ | <file>/sbin/geninitrd -v -f /boot/initd-XXX-Y.gz XXX-Y</file> | ||
+ | |||
+ | command. Real example: | ||
+ | |||
+ | <file>/sbin/geninitrd -v -f /boot/initd-4.20.3-1.gz 4.20.3-1</file> | ||
+ | |||
+ | //-v// option causes geninitrd to write additional information, so you can see if proper kernel modules are being installed into initrd. | ||
+ | |||
+ | |||
+ | PLD supports systemd and non-systemd installations. In case of systemd installation you need to install package | ||
+ | |||
+ | <file>systemd</file> | ||
+ | |||
+ | package and setup default boot kernel cmdline option in grub/lilo. Add | ||
+ | |||
+ | <file>init=/bin/systemd systemd.unit=graphical.target</file> | ||
+ | |||
+ | |||
+ | If booting with new initrd fails you can use **debuginitrd** and **debuginitrd=sh** boot kernel cmdline options to debug the problem. | ||
+ | ===== Bootloader ===== | ||
+ | |||
+ | ==== grub2 ==== | ||
+ | |||
+ | Install grub2 on boot sector of disk: | ||
+ | |||
+ | <file>grub-install /dev/sda</file> | ||
+ | |||
+ | Generate configuration file for grub2: | ||
+ | |||
+ | <file>update-grub</file> | ||
+ | |||
+ | Resulting file is saved as **/boot/grub/grub.cfg**. Setting custom options for grub2 can be done in **/etc/sysconfig/grub** (then regenerate **grub.cfg** with **update-grub** command). | ||
+ | |||
+ | |||
+ | ==== lilo (deprecated) ==== | ||
+ | Edit **/pld/etc/lilo.conf** | ||
+ | |||
+ | <file>boot=/dev/sda | ||
+ | read-only | ||
+ | lba32 | ||
+ | prompt | ||
+ | timeout=100 | ||
+ | |||
+ | image=/boot/vmlinuz | ||
+ | label=pld | ||
+ | root=/dev/sda2 | ||
+ | initrd=/boot/initrd | ||
+ | </file> | ||
+ | And execute: | ||
+ | |||
+ | <file># chroot /pld /sbin/lilo | ||
+ | </file> | ||
+ | |||
+ | ==== Advanced configuration ==== | ||
+ | Advanced lilo and grub configuration is described here: [[:Docs:man:Bootloader|../Bootloader]] | ||
+ | |||
+ | |||
+ | |||
+ | ===== udev ===== | ||
+ | \\ :!: Write something more here :!: | ||
+ | |||
+ | |||
+ | |||
+ | ===== User accounts ===== | ||
+ | |||
+ | By default **root** account doesn't have any password set and by default that will prevent you from logging in. Setup root password | ||
+ | |||
+ | <file>chroot /pld && passwd</file> | ||
+ | |||
+ | \\ :!: Write something more here :!: | ||
+ | |||
+ | ===== Finishing ===== | ||
+ | |||
+ | If manual network configuration was required for RescueCD then most liikely you need to repeat that [[docs:man:installing_pld_linux_based_on_rescue_cd#network_configuration_of_rescuecd|step]] on installed PLD system, too. | ||
+ | |||
+ | Last step is umount all filesystems: | ||
+ | |||
+ | <file>umount -R /pld</file> | ||
+ | |||
+ | and reboot: | ||
+ | |||
+ | <file>reboot</file>. | ||
+ | |||
+ | |||
+ | If you find errors on this page or want to add anything to installation procedure please write to us at feedback / pld-linux.org. | ||
+ | |||
+ | \\ :!: Write something more here :!: | ||
[[:Docs:man| TOC]] | [[:Docs:man| TOC]] | ||
+ | |||
+ | |||
+ | [[:CategoryUpdateNeeded|CategoryUpdateNeeded]] | ||