os:archlinux:mjoelnir
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| os:archlinux:mjoelnir [2025/06/23 11:26] – warnaud | os:archlinux:mjoelnir [2025/06/23 15:50] (current) – warnaud | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Info ====== | ||
| + | Thinkpad T495s/ | ||
| + | ===== ISO/Network ===== | ||
| + | Download ISO https:// | ||
| + | write the ISO on a USB key\\ | ||
| + | boot\\ | ||
| + | \\ | ||
| + | Setup network\\ | ||
| + | <code bash> | ||
| + | iwctl </ | ||
| + | < | ||
| + | iwd]# device list | ||
| + | Devices | ||
| + | -------------------------------------------------------------------------------- | ||
| + | Name Address | ||
| + | -------------------------------------------------------------------------------- | ||
| + | wlan0 | ||
| + | iwd]# station wlan0 get-networks | ||
| + | | ||
| + | -------------------------------------------------------------------------------- | ||
| + | Network name Security | ||
| + | -------------------------------------------------------------------------------- | ||
| + | FuckUMeta | ||
| + | XXXXXXXXXXXXXXXX | ||
| + | iwd]# station wlan0 connect FuckUMeta --passphrase ********************** | ||
| + | iwd]# exit | ||
| + | </ | ||
| + | <code bash>ip a | ||
| + | 1: lo: < | ||
| + | link/ | ||
| + | inet 127.0.0.1/8 scope host lo | ||
| + | | ||
| + | inet6 ::1/128 scope host noprefixroute | ||
| + | | ||
| + | 2: enp3s0f0: < | ||
| + | link/ether XX: | ||
| + | altname enxf875a4853e1b | ||
| + | 4: wlan0: < | ||
| + | link/ether XX: | ||
| + | inet 192.168.1.156/ | ||
| + | | ||
| + | inet6 fdbf: | ||
| + | | ||
| + | inet6 fe80:: | ||
| + | | ||
| + | ===== Test + SSH ===== | ||
| + | network OK ?\\ | ||
| + | <code bash> ping -c3 archlinux.org</ | ||
| + | Install SSH | ||
| + | <code bash> pacman -Sy | ||
| + | pacman -S openssh | ||
| + | vim / | ||
| + | <code perl> | ||
| + | # | ||
| + | PermitRootLogin yes | ||
| + | </ | ||
| + | <code bash> | ||
| + | systemctl start sshd</ | ||
| + | \\ | ||
| + | Now we can connect from the network | ||
| + | ===== Disk partitions ===== | ||
| + | ==== List ==== | ||
| + | <code bash># gdisk / | ||
| + | GPT fdisk (gdisk) version 1.0.10 | ||
| + | |||
| + | The protective MBR's 0xEE partition is oversized! Auto-repairing. | ||
| + | |||
| + | Partition table scan: | ||
| + | MBR: protective | ||
| + | BSD: not present | ||
| + | APM: not present | ||
| + | GPT: present | ||
| + | |||
| + | Found valid GPT with protective MBR; using GPT. | ||
| + | Disk / | ||
| + | Model: KXG6AZNV256G TOSHIBA | ||
| + | Sector size (logical/ | ||
| + | Disk identifier (GUID): A49CF274-51B4-4CBF-BE13-5195151DBF6E | ||
| + | Partition table holds up to 128 entries | ||
| + | Main partition table begins at sector 2 and ends at sector 33 | ||
| + | First usable sector is 34, last usable sector is 500118158 | ||
| + | Partitions will be aligned on 2048-sector boundaries | ||
| + | Total free space is 205869677 sectors (98.2 GiB) | ||
| + | |||
| + | Number | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | The goal is to make a 16GB swap partition and the btrfs root: | ||
| + | <code bash> | ||
| + | ==== SWAP ==== | ||
| + | |||
| + | < | ||
| + | Command (? for help): n | ||
| + | Partition number (6-128, default 6): | ||
| + | First sector (34-500118158, | ||
| + | Last sector (292513792-498378751, | ||
| + | Current type is 8300 (Linux filesystem) | ||
| + | Hex code or GUID (L to show codes, Enter = 8300): 8200 | ||
| + | Changed type of partition to 'Linux swap' | ||
| + | </ | ||
| + | ==== BTRFS root ==== | ||
| + | |||
| + | < | ||
| + | Command (? for help): n | ||
| + | Partition number (7-128, default 7): | ||
| + | First sector (34-500118158, | ||
| + | Last sector (326068224-498378751, | ||
| + | Current type is 8300 (Linux filesystem) | ||
| + | Hex code or GUID (L to show codes, Enter = 8300): | ||
| + | Changed type of partition to 'Linux filesystem' | ||
| + | </ | ||
| + | ==== Save ==== | ||
| + | |||
| + | < | ||
| + | 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 / | ||
| + | The operation has completed successfully. | ||
| + | </ | ||
| + | |||
| + | ===== Mount/ | ||
| + | ==== SWAP ==== | ||
| + | <code bash> | ||
| + | swapon | ||
| + | </ | ||
| + | ==== BTRFS ==== | ||
| + | <code bash> | ||
| + | pacman -Sy btrfs-progs | ||
| + | mkfs.btrfs -L ArchRoot / | ||
| + | mount / | ||
| + | btrfs subvolume create /mnt/@ | ||
| + | btrfs subvolume create /mnt/@home | ||
| + | umount / | ||
| + | ==== Mount /boot /home / ==== | ||
| + | <code bash> | ||
| + | mount -o noatime, | ||
| + | mkdir -p / | ||
| + | mkdir / | ||
| + | mount -o noatime, | ||
| + | mount / | ||
| + | </ | ||
| + | ===== Pacstrap ===== | ||
| + | <code bash> | ||
| + | ===== FSTAB ===== | ||
| + | <code bash> | ||
| + | ===== Archlinux Machine setup ===== | ||
| + | <code bash> | ||
| + | mount --types proc / | ||
| + | mount --rbind /sys / | ||
| + | mount --rbind /dev / | ||
| + | arch-chroot /mnt /bin/bash | ||
| + | echo " | ||
| + | echo LANG=en_US.UTF-8 > / | ||
| + | vim / | ||
| + | uncomment | ||
| + | < | ||
| + | Generate locales< | ||
| + | ==== fonts/ | ||
| + | <code bash> | ||
| + | echo FONT=lat9w-16 >> / | ||
| + | ==== TimeZone ==== | ||
| + | <code bash>ln -sf / | ||
| + | ==== /etc/hosts ==== | ||
| + | <code bash>vim / | ||
| + | <code perl>#< | ||
| + | 127.0.0.1 < | ||
| + | ==== Initramfs ==== | ||
| + | <code bash> vim / | ||
| + | <code perl> | ||
| + | <code bash. mkinitcpio -P</ | ||
| + | ===== Systemdboot ===== | ||
| + | <code bash> | ||
| + | ==== Entries ==== | ||
| + | default: | ||
| + | <code bash>cat > / | ||
| + | default arch | ||
| + | timeout 5 | ||
| + | EOF</ | ||
| + | Archlinux: | ||
| + | <code bash>cat > / | ||
| + | title Arch Linux | ||
| + | linux / | ||
| + | initrd | ||
| + | initrd | ||
| + | options root=UUID=43a3c9d5-0253-4f24-af47-7c11f3f39753 rw rootflags=subvol=@, | ||
| + | EOF</ | ||
| + | Note: 43a3c9d5-0253-4f24-af47-7c11f3f39753 = UUID from `blkid / | ||
| + | Windows shit: | ||
| + | <code bash>cat > / | ||
| + | title | ||
| + | efi / | ||
| + | EOF</ | ||
| + | |||
| + | ===== Final step ===== | ||
| + | candles | ||
| + | <code bash> | ||
| + | umount -l / | ||
| + | umount / | ||
| + | umount / | ||
| + | reboot</ | ||
| + | |||
| + | |||
| + | Notes: | ||
| + | * remount btrfs partition: | ||
| + | <code bash> | ||
| + | mount -t btrfs \ | ||
| + | -o subvol=@, | ||
| + | / | ||
| + | * Wifi shit | ||
| + | <code bash>cat > / | ||
| + | network={ | ||
| + | ssid=" | ||
| + | psk=" | ||
| + | key_mgmt=WPA-PSK | ||
| + | } | ||
| + | EOF</ | ||
| + | <code bash> | ||
| + | dhcpcd wlan0</ | ||
