2019年9月15日日曜日

Install Arch linux on Razer Blade Stealth

boot loader

The boot loader is responsible for loading the kernel and initial ramdisk before initiating the boot process.

Image boot

Boot from arch installation image

Set Kernel Mode nomodeset

Since screen blackout could happen without this.
https://bbs.archlinux.org/viewtopic.php?id=244609

To avoid black screen, nomodeset has to be set.
https://wiki.archlinux.org/index.php/Systemd-boot#Kernel_parameters_editor_with_password_protection

Hot to set nomodeset
https://wiki.archlinux.org/index.php/kernel_mode_setting#Disabling_modesetting

Partition disk

check current partition

gdisk -l /dev/nvme0n1

partition swap disk
we allocate 8GB for swap

gdisk /dev/nvme0n1

format swap

mkswap /dev/nvme0n1p6
swapon /dev/nvme0n1p6

check swap is on

free -m

format /

gdisk /dev/nvme0n1

allocate rest of disk for linux system

format disk

mkfs.ext4 -L "Arch Linux" /dev/nvme0n1p7

since last time I got black screen after mounted partition and in the middle of installation process, I format disk again

mount the disk

 mount /dev/nvme0n1p7 /mnt

Setup network

Wireless network setup

  • show network cards
    • ip link
  • setup netctl config
    • ls /etc/netctl
    • cp /etc/netctl/examples/wireless-wpa /etc/netctl
    • Edit copied config
    • netctl start wireless-wpa
    • check network is connected
      • ping -c 3 google.com

Install arch linux base

pacstrap /mnt base

mount efi partition

mkdir /mnt/boot/efi
mount /dev/nvme0n1p2 /mnt/boot/efi

generate fstab

# genfstab -U /mnt >> /mnt/etc/fstab

chroot

arch-chroot /mnt

change password

passwd root

set timezone

set locale

set network

hostname: y4suyuki-razer-arch

127.0.0.1 localhost
::1 localhost
127.0.0.1 y4suyuki-razer-arch.localdomain y4suyuki-razer-arch

https://wiki.archlinux.org/index.php/Network_configuration

install bootloader

install grub

install intel-ucode

pacman -Syu intel-ucode
pacman -Syu grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=boot/efi --bootloader-id=GRUBb
grub-mkconfig -o /boot/grub/grub.cfg

reboot

After Installation

network

Man! I forgot to install wpa_supplicant so I can use wifi with netctl

swapon /dev/nvme0n1p6
mount /dev/nvme0n1p7 /mnt
mount /dev/nvme0n1p2 /mnt/boot/efi
arch-chroot /mnt
pacman -Syu wpa_supplicant
umount -R /mnt
reboot

Now, I can use wifi with netctl

Desktop Environtment

Display Manager

I choose LightDM

pacman -Syu lightdm lightdm-gtk-greeter
systemctl enable lightdm

LightDM failed on start. I don’t know why.
Switch to gdm

pacman -Syu gdm
systemctl enable gdm

Desktop Environment

pacman -Syu xfce4

General recommendation

Written with StackEdit.

2018年5月6日日曜日

Arch Linux Laptop Full System Upgrade

pacman -Syu complained removing fontsproto for dependency issue. Here's what I did. pacman -S xorg xorg-apps because these are whose requiring fontproto. Then update system with answering no to replacing packages. After system update again with answering yes to replacing packages.

2018年1月21日日曜日

Arch Linux Wifi Setup

Setting up wifi on Arch Linux Laptop

archlinux wiki reference

Setting up Manually

  • Show network interface
    • iw dev
  • Show network interface status
    • iw dev $interface link
  • Activate interface (if necessary)
    • ip link set $interface up
    • ip link show $interface check it’s up
  • Discover access points (if you don’t know the SSID)
    • iw dev $interface scan | less
  • Connect to an AP
    • use wpa_suppicant

Connect to AP with wpa_supplicant

  • Configure settings with wpa_passphrase
    • wpa_passphrase MYSSID passphrase > /etc/wpa_supplicant/my_config.conf
  • Connect
    • wpa_supplicant -B -i interface -c /etc/wpa_supplicant/my_config.conf
    • dhcpcd interface
      start dhcp to get ip address (if wpa_supplicant run successful dhcp may work automatically and interface card obtain ip address)

Caution

If you already setup wpa_supplicant as startup service or run several times you can see several process running by ps aux | grep wpa_supplicant. In this situation wpa_supplicant command will not work correctly. Kill all wpa_supplicant process by killall wpa_supplicant before configuration.

Setting up Startup Service

  • systemctl enable wpa_supplicant@interface.service
  • systemctl enable dhcpcd@interface

Actually this set up didn’t work for me at first.
It seems I set up before using automatic setting with netctl. I can see right now by systemctl and netctl-auto@interface.service and dhcpcd@interface.service are there. It seems that two different network service running is the cause of problem.

So I disable it by systemctl disable netctl-auto@interface.

Then after rebooted, it’s working now!
Phew…

Written with StackEdit.

2017年7月15日土曜日

Arch Linux Laptop (Lenovo Thinkpad X250) Monitor Brightness

for xfce4 fn+F5 and fn+F6 work fine but for i3 it didn’t work.

if trying to change backlight brightness by xbacklight -inc 10 then get error message

No outputs have backlight property

so added /etc/X11/xorg.conf

Section "Device"
    Identifier "Card0"
    Driver "intel"
    Option "Backlight" "intel_backlight"
EndSection

But it failed starting Xserver because system coudn’t load intel package. The system couldn’t load intel because it doesn’t have intel driver and using modesetting.

And according to arch wiki, xbacklight command will not work with modesetting.

Now I decided to replace xorg-xbacklight to acpilight.
acpilight is AUR package and its backward compatible xbacklight replacement.

Installed it from AUR and copy 90-backlight.rules to /etc/udev/rules.d/

Now xbacklight work fine!

Written with StackEdit.

2017年7月13日木曜日

new laptop (lenovo Thinkpad X250) Windows 10 Arch Linux Dual Boot

I bought new laptop lenovo ThinkPad X250 installed Windows 10 professional edition.
It was second hand laptop I found in sofmap Kobe.
It has Intel core i5, 8GB RAM, 500GB HDD and price was 66000 Yen (roughly $600).
I didn’t need it immediately but its spec and price was appealing to me so I bought it.

Here is record of installing arch linux on this machine.

machine

Lenovo Thinkpad X250

Referenced YouTube video

I know official Arch Linux website strongly insists that we should follow official installation guide especially if you are a newbie and discourage to just follow random YouTube installation video. I totally agree about that. I totally agree about that. I referenced this YouTube video but I also read official installation guide too and understand what’s going on in each steps in video since I had installed arch linux several times.

https://www.youtube.com/watch?v=METZCp_JCec&index=4&list=LL03LrP6XqyadZqZ_ruB3bjg

Installation process was almost same as shown in referenced YouTube video. The process was really smooth because I had done before and better understand the installation process than I was complete newbie.

The major difference from previous my installation was it’s dual boot system with windows 10. So I need to create free partition for new arch linux on windows system and I don’t need to create efi boot partition because it’s already there.

After Installation Packages

  • grub
  • efibootmgr
  • intel-ucode
  • xfce4
  • dialog
  • lightdm, lightdm-gtk-greeter
  • xorg
  • iw
  • wpa_supplicant
  • os-proper
  • firefox
  • Emacs
  • Terminator
  • git
  • sudo
  • wpa_actiond
  • i3, dmenu
  • rxvt-unicode, rxvt-unicode-terminfo

TODOs

  • Configure sound
  • Configure finger print
  • Configure monitor brightness

2016年10月22日土曜日

crash during system upgrade

I tried to fix crash at last full system update.
Firstly I verified and reinstalled modules at the system update. I found linux-firmware and linux have problem and reinstalled both. After reinstall, linux-firmware seems to be fixed but linux has still errors. As I noticed other module seems to have problems, I think my system is not clean. Anyway, the first problem missing nvidia firmware is cleared so I reboot system. First thing is remove nvidia package and use nouveau as driver.

log

  • make new archiso archlinux-2016.10.01-dual.iso
  • arch-chroot
  • switch to nouveau
    • install nouveau and mesa-libgl pacman -S --needed xf86-video-nouveau mesa-libgl
    • remove nvidia pacman -R nvidia
    • also remove nvidia-utils pacman -R nvidia-utils
    • added nouveau in /etc/mkinitcpio.conf
    • regenerage initramfs mkinitcpio -p linux
  • reboot
    it seems nouveau driver loaded successfully and login screen show up but it’s same as nvidia driver case, it freeze and I can do nothing other than force shutdown.

So verify and reinstall last upgraded packages didn’t solve problem.
Next I should try is this
https://wiki.archlinux.org/index.php/pacman#pacman_crashes_during_an_upgrade

The procedures

  1. Boot using Arch installation media. Preferably use a recent media so that the pacman version match / is newer than the system.
  2. Mount the system’s root filesystem mount /dev/sdx /mnt as root, and check the mount has sufficient space with df -h
  3. If the system uses default database and directory locations, you can now update the system’s pacman database and upgrade it via
    pacman --root /mnt --cachedir=/mnt/var/pacman/pkg -Syyu
    as root.
  4. After the upgrade, one way to double-check for not upgraded but still broken packages: find /mnt/usr/lib -size 0
  5. Followed by reinstall of any still broken package via
    pacman --root /mnt --cachedir=/mnt/var/pacman/pkg -S package

Tried this but not solved I think.
The problem is my system missing some system files. How to find those files and owner of those packages?
this post hinted me. Just pacman -Qkk verify all packages.

output log
/home/y4suyuki/log/pacman_crash_all.txt
http://sprunge.us/MVTj

rm conflict files empty not owned by any packages and reinstall.

corrupt log

warning: java-runtime-common: /usr/lib/jvm/default (Symlink path mismatch)
warning: java-runtime-common: /usr/lib/jvm/default (Modification time mismatch)
warning: java-runtime-common: /usr/lib/jvm/default-runtime (Symlink path mismatch)
warning: java-runtime-common: /usr/lib/jvm/default-runtime (Modification time mismatch)error: error while reading file /var/lib/pacman/local/man-pages-4.08-1/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/openssh-7.3p1-2/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/python2-pyparsing-2.1.10-1/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/python2-setuptools-1:28.3.0-1/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/ristretto-0.8.1-1/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/sudo-1.8.18-1/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/systemd-sysvcompat-231-4/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/texinfo-6.3-1/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/xf86-input-evdev-2.10.4-1/mtree: Unrecognized archive format
error: error while reading file /var/lib/pacman/local/xfce4-notifyd-0.3.3-1/mtree: Unrecognized archive format

reinstalled

  • lvm2 /etc/lvm/lvmlocal.conf.pacnew
  • pacman-mirror /etc/pacman.d/mirrorlist.pacnew
  • man-pages
  • sudo /etc/sudoers.pacnew
  • systemd-sysvcompat
  • xf86-input-evdev
  • openssh /etc/ssh/ssh_config.pacnew /etc/ssh/sshd_config.pacnew
  • texinfo
  • xfce4-notifyd
  • python2-setuptools
  • python2-pyparsing
  • ristretto

After reinstalled these packages and rebooted then … it worked!

Written with StackEdit.