I want to leave it here, in order to simplify my life if I decide
to install Arch next time.
Initial assumption
Desired partition for Arch linux is /dev/mapper/vg-arch.
Preparation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mount -t iso9660 -o loop arch.iso /mnt/archiso | |
cp -a /mnt/archiso ~/customiso | |
cd some partition with enogth free space on it | |
unsquashfs -d /mnt/archiso/arch/x86_64/squashfs-root root-image.fs.sfs | |
mkdir arch | |
mount -o loop squashfs-root/root-image.fs arch | |
mount -t proc none arch/proc | |
mount -t sysfs none arch/sys | |
mount -o bind /dev arch/de v | |
mount -o bind /dev/pts arch/dev/pts | |
cp -L /etc/resolv.conf arch/etc |
Now we ready to chroot:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chroot arch bash |
Installation process in chroot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mount /dev/mapper/vg-arch /mnt | |
pacman-key --init | |
pacman-key --populate archlinux | |
pacstrap /mnt base base-devel |
Since my root is on lvm partition I need to do additional work:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add lvm2 to HOOKS in file /etc/mkinitcpio.conf : | |
HOOKS="... lvm2 ..." | |
mkinitcpio -p linux |
Add arch kernel to grub2:
So, we can now chroot in newly installed Archlinux. I was able use pacman normally only after I've disabled CheckSpace option in /etc/pacman.conf
Then I've configured system.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim /etc/grub.d/40_custom | |
menuentry 'Arch-Linux' --class gnu-linux --class gnu --class os { | |
insmod part_msdos | |
insmod ext2 | |
set root='(hd0,msdos5)' | |
search --no-floppy --fs-uuid --set=root uuid | |
linux /boot/vmlinuz-linux root=/dev/mapper/vg-arch ro | |
initrd /boot/initramfs-linux.img | |
} | |
update-grub |
When I ran grub update my ubuntu instalation also found installed arch and created entry for it in grub-config. But later I was able to load from entry created by me, but not from entry created by ubuntu.
So, we can now chroot in newly installed Archlinux. I was able use pacman normally only after I've disabled CheckSpace option in /etc/pacman.conf
Setup network:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I do not like new naming convention for interfaces | |
# So next line allow to use old one :) | |
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules | |
pacman -S ifplugd | |
cd /etc/network.d | |
ln -s examples/ethernet-dhcp | |
systemctl enable net-auto-wired.service |
Then I've configured system.
No comments:
Post a Comment