know-how:master
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
know-how:master [2023/11/25 16:22] – [Installation] cc | know-how:master [2024/02/26 10:32] (aktuell) – cc | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ~~ODT~~ | ||
====== Anforderungen ====== | ====== Anforderungen ====== | ||
* Das " | * Das " | ||
Zeile 4: | Zeile 5: | ||
- | ====== Installation ====== | + | ====== Installation |
+ | * Achtung hier Debian 11 Scratchpad / kein UEFI sondern legacy bios | ||
+ | |||
+ | < | ||
+ | |||
+ | master setup base | ||
+ | |||
+ | |||
+ | root@rescue ~ # gdisk /dev/sda | ||
+ | GPT fdisk (gdisk) version 1.0.6 | ||
+ | |||
+ | Warning: Partition table header claims that the size of partition table | ||
+ | entries is 0 bytes, but this program | ||
+ | Adjusting accordingly, | ||
+ | Warning: Partition table header claims that the size of partition table | ||
+ | entries is 16843009 bytes, but this program | ||
+ | Adjusting accordingly, | ||
+ | Partition table scan: | ||
+ | MBR: not present | ||
+ | BSD: not present | ||
+ | APM: not present | ||
+ | GPT: not present | ||
+ | |||
+ | Creating new GPT entries in memory. | ||
+ | |||
+ | Command (? for help): ? | ||
+ | b back up GPT data to a file | ||
+ | c change a partition' | ||
+ | d delete a partition | ||
+ | i show detailed information on a partition | ||
+ | l list known partition types | ||
+ | n add a new partition | ||
+ | o create a new empty GUID partition table (GPT) | ||
+ | p print the partition table | ||
+ | q quit without saving changes | ||
+ | r recovery and transformation options (experts only) | ||
+ | s sort partitions | ||
+ | t change a partition' | ||
+ | v verify disk | ||
+ | w write table to disk and exit | ||
+ | x extra functionality (experts only) | ||
+ | ? print this menu | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (1-128, default 1): | ||
+ | First sector (34-3907029134, | ||
+ | Last sector (2048-3907029134, | ||
+ | Current type is 8300 (Linux filesystem) | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): | ||
+ | Changed type of partition to 'Linux filesystem' | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (2-128, default 2): | ||
+ | First sector (34-3907029134, | ||
+ | Last sector (309248-3907029134, | ||
+ | Current type is 8300 (Linux filesystem) | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): fd00 | ||
+ | Changed type of partition to 'Linux RAID' | ||
+ | |||
+ | Command (? for help): w | ||
+ | |||
+ | Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING | ||
+ | PARTITIONS!! | ||
+ | |||
+ | Do you want to proceed? (Y/N): y | ||
+ | OK; writing new GUID partition table (GPT) to /dev/sda. | ||
+ | The operation has completed successfully. | ||
+ | |||
+ | |||
+ | ----- | ||
+ | |||
+ | |||
+ | root@rescue ~ # gdisk /dev/sdb | ||
+ | GPT fdisk (gdisk) version 1.0.6 | ||
+ | |||
+ | Warning: Partition table header claims that the size of partition table | ||
+ | entries is 0 bytes, but this program | ||
+ | Adjusting accordingly, | ||
+ | Caution: invalid main GPT header, but valid backup; regenerating main header | ||
+ | from backup! | ||
+ | |||
+ | Warning: Invalid CRC on main header data; loaded backup partition table. | ||
+ | Warning! One or more CRCs don't match. You should repair the disk! | ||
+ | Main header: ERROR | ||
+ | Backup header: OK | ||
+ | Main partition table: OK | ||
+ | Backup partition table: OK | ||
+ | |||
+ | Partition table scan: | ||
+ | MBR: not present | ||
+ | BSD: not present | ||
+ | APM: not present | ||
+ | GPT: damaged | ||
+ | |||
+ | Found invalid MBR and corrupt GPT. What do you want to do? (Using the | ||
+ | GPT MAY permit recovery of GPT data.) | ||
+ | 1 - Use current GPT | ||
+ | 2 - Create blank GPT | ||
+ | |||
+ | Your answer: 2 | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (1-128, default 1): | ||
+ | First sector (34-3907029134, | ||
+ | Last sector (2048-3907029134, | ||
+ | Current type is 8300 (Linux filesystem) | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): | ||
+ | Changed type of partition to 'Linux filesystem' | ||
+ | |||
+ | Command (? for help): n | ||
+ | Partition number (2-128, default 2): | ||
+ | First sector (34-3907029134, | ||
+ | Last sector (309248-3907029134, | ||
+ | Current type is 8300 (Linux filesystem) | ||
+ | Hex code or GUID (L to show codes, Enter = 8300): fd00 | ||
+ | Changed type of partition to 'Linux RAID' | ||
+ | |||
+ | Command (? for help): w | ||
+ | |||
+ | Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING | ||
+ | PARTITIONS!! | ||
+ | |||
+ | Do you want to proceed? (Y/N): y | ||
+ | OK; writing new GUID partition table (GPT) to /dev/sdb. | ||
+ | The operation has completed successfully | ||
+ | |||
+ | ---- | ||
+ | |||
+ | create RAID1 | ||
+ | |||
+ | # mdadm --create /dev/md0 --level=raid1 --raid-devices=2 /dev/sda2 /dev/sdb2 | ||
+ | --- | ||
+ | |||
+ | create physical volume device for lvm | ||
+ | |||
+ | root@rescue ~ # pvcreate /dev/md0 | ||
+ | Physical volume "/ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | create volume group | ||
+ | root@rescue ~ # vgcreate master /dev/md0 | ||
+ | Volume group " | ||
+ | |||
+ | ---- | ||
+ | |||
+ | create logical volume for root filesystem | ||
+ | |||
+ | root@rescue ~ # man lvcreate | ||
+ | root@rescue ~ # lvcreate -L 35G -n root master | ||
+ | Logical volume " | ||
+ | |||
+ | --- | ||
+ | |||
+ | create ext4 filesystem for root Filesystem | ||
+ | |||
+ | root@rescue ~ # mkfs.ext4 / | ||
+ | mke2fs 1.46.2 (28-Feb-2021) | ||
+ | Creating filesystem with 9175040 4k blocks and 2293760 inodes | ||
+ | Filesystem UUID: 100ea202-f3c5-4f02-8b0a-d59596af5f00 | ||
+ | Superblock backups stored on blocks: | ||
+ | 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, | ||
+ | 4096000, 7962624 | ||
+ | |||
+ | Allocating group tables: done | ||
+ | Writing inode tables: done | ||
+ | Creating journal (65536 blocks): done | ||
+ | Writing superblocks and filesystem accounting information: | ||
+ | |||
+ | -- | ||
+ | |||
+ | |||
+ | mount ext4 filesystem on /mnt/tmp/ | ||
+ | root@rescue ~ # mkdir /mnt/tmp | ||
+ | root@rescue ~ # mount / | ||
+ | |||
+ | ---- | ||
+ | |||
+ | deboostrap a current debian system | ||
+ | |||
+ | root@rescue /mnt/tmp # debootstrap bullseye ./ http:// | ||
+ | |||
+ | ---- | ||
+ | chroot into new environment | ||
+ | |||
+ | root@rescue /mnt/tmp # mount -t proc none proc/ | ||
+ | root@rescue /mnt/tmp # mount -t sysfs none sys | ||
+ | root@rescue /mnt/tmp # mount -o bind /dev dev/ | ||
+ | root@rescue /mnt/tmp # chroot ./ /bin/bash | ||
+ | |||
+ | --- | ||
+ | install necessary packages mdadm / lvm2 for system to work | ||
+ | |||
+ | root@rescue:/# | ||
+ | |||
+ | --- | ||
+ | |||
+ | erlaube temporär Root Login mit Passwort und setze ordentliches Passwort >20 Zeichen | ||
+ | |||
+ | root@rescue:/# | ||
+ | root@rescue:/# | ||
+ | New password: | ||
+ | Retype new password: | ||
+ | passwd: password updated successfully | ||
+ | root@rescue:/# | ||
+ | PermitRootLogin yes | ||
+ | |||
+ | ---- | ||
+ | --- | ||
+ | |||
+ | grub2 installieren zum booten der maschine | ||
+ | |||
+ | root@rescue:/# | ||
+ | root@master:/# | ||
+ | Installing for i386-pc platform. | ||
+ | grub-install: | ||
+ | grub-install: | ||
+ | |||
+ | |||
+ | --- | ||
+ | |||
+ | sda1 anpassen mach ma bios boot partition draus - ef02 | ||
+ | |||
+ | |||
+ | root@rescue /mnt/tmp # gdisk /dev/sdb | ||
+ | GPT fdisk (gdisk) version 1.0.6 | ||
+ | |||
+ | Partition table scan: | ||
+ | MBR: protective | ||
+ | BSD: not present | ||
+ | APM: not present | ||
+ | GPT: present | ||
+ | |||
+ | Found valid GPT with protective MBR; using GPT. | ||
+ | |||
+ | Command (? for help): ? | ||
+ | b back up GPT data to a file | ||
+ | c change a partition' | ||
+ | d delete a partition | ||
+ | i show detailed information on a partition | ||
+ | l list known partition types | ||
+ | n add a new partition | ||
+ | o create a new empty GUID partition table (GPT) | ||
+ | p print the partition table | ||
+ | q quit without saving changes | ||
+ | r recovery and transformation options (experts only) | ||
+ | s sort partitions | ||
+ | t change a partition' | ||
+ | v verify disk | ||
+ | w write table to disk and exit | ||
+ | x extra functionality (experts only) | ||
+ | ? print this menu | ||
+ | |||
+ | Command (? for help): t | ||
+ | Partition number (1-2): 1 | ||
+ | Current type is EF01 (MBR partition scheme) | ||
+ | Hex code or GUID (L to show codes, Enter = EF01): ef02 | ||
+ | Changed type of partition to 'BIOS boot partition' | ||
+ | |||
+ | Command (? for help): w | ||
+ | |||
+ | Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING | ||
+ | PARTITIONS!! | ||
+ | |||
+ | Do you want to proceed? (Y/N): y | ||
+ | OK; writing new GUID partition table (GPT) to /dev/sdb. | ||
+ | Warning: The kernel is still using the old partition table. | ||
+ | The new table will be used at the next reboot or after you | ||
+ | run partprobe(8) or kpartx(8) | ||
+ | The operation has completed successfully | ||
+ | |||
+ | ... | ||
+ | |||
+ | so muss es aussehen wenn von mbr / bios legacy gebootet wird | ||
+ | |||
+ | root@rescue /mnt/tmp # chroot ./ /bin/bash | ||
+ | root@master:/# | ||
+ | Installing for i386-pc platform. | ||
+ | Installation finished. No error reported. | ||
+ | root@master:/# | ||
+ | Installing for i386-pc platform. | ||
+ | Installation finished. No error reported | ||
+ | |||
+ | --- | ||
+ | |||
+ | raid1 infos vom hostsystem ins chroot | ||
+ | |||
+ | root@master:/# | ||
+ | |||
+ | --- | ||
+ | |||
+ | Kernel Installation | ||
+ | |||
+ | apt-get install linux-image-amd64 | ||
+ | |||
+ | |||
+ | --- | ||
+ | |||
+ | Netzwerk konfigurieren damit die MAschine auch korrekte IP Infos bekommt beim booten e.g. | ||
+ | |||
+ | / | ||
+ | .. | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | ... | ||
+ | update-grub2 | ||
+ | ... | ||
+ | |||
+ | -- | ||
+ | |||
+ | Warning wegen fehlender Firmware sources (in dem Fall realtek Netzwerkkarte) anpassen non-free hinzufügen | ||
+ | |||
+ | root@master: | ||
+ | deb http:// | ||
+ | deb http:// | ||
+ | deb http:// | ||
+ | |||
+ | root@master: | ||
+ | |||
+ | |||
+ | root@master: | ||
+ | |||
+ | --- | ||
+ | |||
+ | root@master:/# | ||
+ | # interfaces(5) file used by ifup(8) and ifdown(8) | ||
+ | # Include files from / | ||
+ | source / | ||
+ | |||
+ | |||
+ | auto lo | ||
+ | iface lo inet loopback | ||
+ | |||
+ | auto eth0 | ||
+ | iface eth0 inet static | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | ----- | ||
+ | |||
+ | fstab für root partition konfigurieren | ||
+ | |||
+ | root@master:/# | ||
+ | # UNCONFIGURED FSTAB FOR BASE SYSTEM | ||
+ | |||
+ | LABEL=ROOT_FS / | ||
+ | |||
+ | --- | ||
+ | |||
+ | check ob ich bereits booten kann | ||
+ | |||
+ | root@master /mnt # cat / | ||
+ | Personalities : [raid1] | ||
+ | md0 : active raid1 sdb2[1] sda2[0] | ||
+ | 1953227840 blocks super 1.2 [2/2] [UU] | ||
+ | [=====> | ||
+ | bitmap: 11/15 pages [44KB], 65536KB chunk | ||
+ | |||
+ | unused devices: < | ||
+ | |||
+ | reboot | ||
+ | -- | ||
+ | |||
+ | ja geht :) | ||
+ | |||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Installation von USB Stick (dvd iso) | ||
* Die folgende Installation wurde mit 2x M.2 Crucial 500GB (https:// | * Die folgende Installation wurde mit 2x M.2 Crucial 500GB (https:// | ||
* Basissystem: | * Basissystem: |
know-how/master.1700925740.txt.gz · Zuletzt geändert: 2023/11/25 16:22 von cc