site  contact  subhomenews

Installing Linux on Asus Zenbook S 13

January 17, 2025 — BarryK

I posted recently about purchasing the Zenbook:

Running Windows (Windows 11 Home), I used its partition manager to shrink the C: drive partition from circa-850GB to 128GB. Also turned off "fast startup" and disabled BitLocker partition encryption. All of these operations were done within Windows, by reference to some YouTube videos.

Booted Manjaro from USB-stick (to which the ISO had been written), and ran Gparted to create partitions in the empty space of the drive. A 64MB vfat esp boot partition, and three ext4 partititons (62GB, 62GB, last one to fill remaining space). The good thing was that Gparted was already builtin.

Whenever I use one of the mainstream Linux distributions, I become very frustrated; Manjaro is no exception. I should have made notes of the frustrations as encountered.

I ran "sudo thunar" in a terminal, as was surprised how many error messages. Things were missing, such as the 'gvfs' package. I wanted to mount the newly-created partitions, but no way could I find how to do it. Not via any GUI anyway; I resorted to doing it in a terminal, then could access them in Thunar.

Went ahead and installed Manjaro in one of the new ext4 partitions. It was taking awhile, so I went outside to water the garden. Came back in, and found the screen had locked, and it wanted a password to unlock. The default user is "manjaro" and from online docs the default password is "manjaro" -- but it just said "incorrect password". So I unlocked as the root user, and low-and-behold, it accepted "manjaro" password. However, the install had aborted.

Examining the ext4 partition, however, it looks like everything has installed.

Is it just me? Why are there so many hassles with using a mainstream distro, when one should be expecting very streamlined and refined experience? Anyway, moving on...

I booted EasyOS from USB-stick, and able to get low-resolution 800x600 vesa desktop. Workable, ok to use.

Installed Limine into the new vfat esp partition, and created an entry for Manjaro. Used this as reference:

...however, there was no 'initramfs-6.12-x86_64-fallback.img' in /boot folder. I had to bootup Manjaro from USB-stick again and create it:

> sudo mkinitcpio -P

Was then able to boot the Zenbook with Limine, to installed Manjaro.

Also installed EasyOS, into another ext4 partition. Which of course is super-easy, just copy 'vmlinuz', 'initrd' and 'easy.sfs'. Then create an entry in 'limine.cfg'

With Easy, still only have low-resolution vesa, also no sound.

Next up, examined the configuration of the kernel in EasyOS versus in Manjaro. I did this by running "lsmod" in both, then determining what extra modules Manjaro loads. I then worked backwards and determined what "CONFIG_*" settings need to be enabled. This website helped greatly:

https://www.kernelconfig.io/index.html

Then created a script that modified my kernel ".config" file:

#!/bin/sh
MODS='8250_dw|CONFIG_SERIAL_8250_DW
ac97_bus|CONFIG_AC97_BUS
acpi_tad|CONFIG_ACPI_TAD
...etc...
x_tables|CONFIG_NETFILTER_XTABLES'

cp -a -f DOTconfig DOTconfigNEW
echo -n '' > changes.log
sync

for aM in $MODS
do
[ -z "$aM" ] && continue
echo -n '.'
aC="${aM/*|/}"
if [ -z "$aC" ];then continue; fi
grep -q -F "${aC}=" DOTconfig
if [ $? -eq 0 ];then continue; fi
grep -q -F "${aC} " DOTconfig
if [ $? -eq 0 ];then
echo -n " ${aC} "
echo "modify ${aC}" >> changes.log
sed -i -e "s%^# ${aC} .*%${aC}=m%" DOTconfigNEW
continue
fi
echo -n " append ${aC} "
echo "append ${aC}" >> changes.log
echo "${aC}=m" >> DOTconfigNEW
done
echo
sync

It is possible to determine the CONFIG_* from module-name from the kernel source. I found this online:

 aC="$(find linux-6.12.9  -name "Makefile" -exec grep " += ${aM}.o" {} \; | grep -o 'CONFIG_[^)]*')"

...where $aM is the module-name. However, it only works sometimes.

The script is crude, as some modules require prerequisites that might not be enabled. Anyway, I used the generated "DOTconfigNEW" as the new '.config' and kernel 6.12.9 is compiling right now.   

Tags: easy