This is a simple guide for installing Ubuntu using minimal archive. I knew it some days ago, Ubuntu provides a minimal archive / rootfs which we can use to have a minimal Ubuntu system. We will use it to get a minimal and quite usable Ubuntu distro.
We will need some requirements, like :
- A live bootable USB, I use slax, you can use whatever you want.
- An internet connection, we will use it download some packages.
- A partition for system (root, /), you can also have a swap if you need it.
- Ubuntu minimal rootfs / archive, you can download it here
https://cdimage.ubuntu.com/ubuntu-base/daily/current/
note : I use the amd64 version.
If you familiar with debootstrap or installing archlinux, it's almost basically same.
-
Booting the live bootable usb.
-
Format, mount partition.
# mkfs.ext4 /dev/sdaX # mount /dev/sdaX /mnt
note : You can format the partition with other format, I use ext4.
-
Download and unpack the minimal archive.
# cd /mnt # wget -c https://cdimage.ubuntu.com/ubuntu-base/daily/current/noble-base-amd64.tar.gz # tar -xvf noble-base-amd64.tar.gz
-
Mount some file systems and chroot.
# mount -t proc proc proc # mount -o bind /dev dev/ # mount -o bind /sys sys/ # mount -o bind /run run/ # chroot /mnt /usr/bin/bash
-
Update the repository.
# apt update # apt upgrade
-
Install some tools.
# apt install vim locales dialog isc-dhcp-client wpasupplicant iproute2
-
Configure locales and timezone.
# dpkg-reconfigure locales # dpkg-reconfigure tzdata
-
Edit fstab.
UUID=2d3b91ab-4936-4fb1-add6-b820adbd0b6c / ext4 errors=remount-ro 0 1
Note : that's just an example.
-
Install kernel, grub, dracut, systemd-sysv package.
# apt install linux-image-generic dracut grub-pc systemd-sysv
note: we need to install systemd-sysv to fix error on dracut (error installing "poweroff", "halt" and "reboot" when generating initrd).
-
Install linux-firmware (optional).
# apt install linux-firmware
-
Set root password.
# passwd
-
Generate initrd using dracut.
# dracut -f --regenerate-all
-
Install grub & update grub.
# grub-install /dev/sdX # grub-mkconfig -o /boot/grub/grub.cfg
-
Unmount some filesystems.
# umount /mnt/proc # umount /mnt/dev # umount /mnt/sys # umount /mnt/run # cd / # umount /mnt
-
Reboot.
# reboot