Official Ubuntu Server compressed image boots in UEFI and BIOS mode
News about Ubuntu Server compressed image: In Kinetic Kudu, to be released as 22.10, and newer releases Ubuntu Server is distributed as a compressed image, a compressed cloned image file. When extracted to a drive, it is an installed system that can boot PC computers both in UEFI mode and BIOS mode. This is great, because it makes it very easy to make portable servers as well as desktops with Ubuntu Desktop, Ubuntu community flavours (by installing the meta-package ubuntu-desktop or lubuntu-desktop ...). |
Get the Ubuntu Server compressed image (of the current developing version) via
http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/pending/
When downloaded (and checked with sha256sum) you can flash it to an internal or external drive with mkusb-dus
dus kinetic-preinstalled-server-amd64.img.xz dus lunar-preinstalled-server-amd64.img.xz ...
Get the Jammy version, 22.04.x LTS, via
http://cdimage.ubuntu.com/ubuntu-server/jammy/daily-preinstalled/current/
When downloaded (and checked with sha256sum) you can flash it to an internal or external drive with mkusb-dus
dus jammy-preinstalled-server-amd64.img.xz
Get the Noble version, 24.04.x LTS, via
http://cdimage.ubuntu.com/ubuntu-server/noble/daily-preinstalled/current/
When downloaded (and checked with sha256sum) you can flash it to an internal or external drive with mkusb-dus
dus noble-preinstalled-server-amd64.img.xz
When you have installed one of these systems from a compressed image file, and you reboot, you log in with the following user and password:
user: ubuntu
password: ubuntu (and you are prompted to change it directly after the first login)
end of news about Ubuntu Server compressed image |
Preparation
It might help to prepare by reading the following link
https://help.ubuntu.com/community/Installation/FromUSBStick
The following link gives more background information about partitioning
https://help.ubuntu.com/community/DiskSpace
Original attempt
Not stable enough to survive certain updates
I expected that it could be installed into a USB pendrive as a good alternative to a persistent live system, possible to update and upgrade without limits. But unfortunately a current update involving a new kernel and updating grub will make it fail to boot. So this system is not stable enough to survive certain updates. It is good only as an illustration of a method to make a bootable drive in UEFI as well as BIOS mode.
Stable alternatives
If you want a stable portable system, that boots in UEFI mode as well as BIOS/CSM mode, and in 64-bit as well as 32-bit computers, you can try One pendrive for all PC (Intel/AMD) computers. If you want a pendrive with a live and an installed system, you can try A new and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode.
Detailed instructions
Stable alternative 1
There are links to instructions how to make an installed system (typically in a USB pendrive) that works with UEFI and BIOS, and is small enough to work in an undersized 16 GB pendrive. This system is created from Ubuntu 16.04 LTS 'Xenial' amd64 ('gamma' because it is beyond beta), and was simplified compared to the previous methods to make a stable installed system for UEFI and BIOS mode.
See this link to the sub-page: /stable-alternative |
This link shows the post in an Ubuntu Forums tutorial, where the method was published:
with a description how to make it 'from scratch' plus a link to uploaded compressed image files plus a small script to fix the GPT after cloning.
Stable alternative 2
The following link describes a new alternative with Lubuntu 18.04.1 LTS
- live
- persistent live
- installed system
See this link to the sub-page: /stable-alternative-18.04.1
Installation from a compressed image file
There is an easy way for you to get an installed Ubuntu system, that boots both in UEFI and BIOS mode, and you can use it in several cases. However,
- if you want to learn how to do it, or
- if you want to be sure of the content (and don't rely on me), or
- if you want hibernation, or
- if you want an encrypted disk (LVM with LUKS encryption),
then you must do it yourself. (In the encrypted disk case, you must create the passphrase yourself during the installation.)
Compressed image file
It is straight-forward to install from a compressed image file using mkusb or mkusb-nox. Some tools may not work with compressed images of such large files. I tried in Lubuntu Xenial 32-bit daily to restore disk image with gnome-disks alias Disks, but it considered the size to be 3.5 GB, when it was 12 GB, so the image was truncated, Bug #1571255
After this cloning operation you should run gpt-fix in order to match the gpt data to the current drive size.
Description of the short-cut to make an installed system (typically in a USB pendrive) that works with UEFI and BIOS from a compressed image file:
Download source 1
Download the following compressed image files from
https://phillw.net/isos/linux-tools/uefi-n-bios
where you also find a gpg-signed file with md5sums, md5sum.txt.asc.
Remember to check with md5sum, that the download of the compressed image file was successful.
dd_lubuntu-18.04.1-desktop-amd64-persistent-n-installed_15GB.img.xz persistent-live & installed for 16 GB pendrives |
dd_unb_ubuntu-20.04_15GB_2020-06-26.img.xz Ubuntu 20.04 LTS installed for drive size >= 16 GB; See also GrowIt.pdf |
dd_unb_ubuntu-20.04_15GB_2020-09-06.img.xz Ubuntu 20.04 LTS installed, works also with secure boot using a fix for the boothole bug; Drive size >= 16 GB; No proposed repository so slower and more stable updates. |
dd_unb_ubuntu-20.04_15GB_2020-09-07_with-proposed.img.xz Ubuntu 20.04 LTS installed, works also with secure boot using a fix for the boothole bug; Drive size >= 16 GB; See also GrowIt.pdf |
Download source 2
Download the following compressed image files from
dd_Ubuntu_16.04.1_2017-01-17_UEFI-n-BIOS-12GB.img.xz version for solid state and hard disk drives |
dd_dus-lxde_16.04-UEFI-n-BIOS_2017-05-07_intel-4-pendrive-7.8GB.img.xz light-weight desktop version with mkusb-dus |
dd_text_16.04-UEFI-n-BIOS_2017-05-07_intel-4-pendrive-7.8GB.img.xz mini system with a text user interface |
dd_lubuntu-18.04.1-desktop-amd64-persistent-n-installed_15GB.img.xz persistent-live & installed for 16 GB pendrives |
md5sums:
bac77b006baccb3d21923e3753f17641 dd_Ubuntu_16.04.1_2017-01-17_UEFI-n-BIOS-12GB.img.xz c28619e78910e3c1f1e499a0af20598b dd_dus-lxde_16.04-UEFI-n-BIOS_2017-05-07_intel-4-pendrive-7.8GB.img.xz df970651be45d985c8c9579eed84719f dd_text_16.04-UEFI-n-BIOS_2017-05-07_intel-4-pendrive-7.8GB.img.xz a22b641ac2708df917452a14930994be dd_lubuntu-18.04.1-desktop-amd64-persistent-n-installed_15GB.img.xz 7475bb74f56ccb74b5377f82f476a0dd dd_unb_ubuntu-20.04_15GB_2020-06-26.img.xz 89b3cd5206a1ce0e6b569cf276e04d7f dd_unb_ubuntu-20.04_15GB_2020-09-06.img.xz ac00ae810b120d7b7dfca4d995593fbf dd_unb_ubuntu-20.04_15GB_2020-09-07_with-proposed.img.xz
Screenshot of 'Ubuntu 20.04 LTS - installed'
User and password
user: guru |
password: changeme |
in Linux
The target drive will be overwritten. Double-check which is the target drive, the drive you want to install into!
Use mkusb to install the system from the compressed image file.
See https://help.ubuntu.com/community/mkusb
gpt_fix in mkusb
The GUID partition table, GPT, is fixed automatically, if you use mkusb 10.6.6 or a newer version to install from these compressed image files. The functions gpt_zap and gpt_fix are built into mkusb.
If you use other tools, you need gpt-fix or to fix the GPT manually with gdisk. If this does not work, you probably need a bigger target drive (big enough to store all the partitions in the original source drive).
in Windows
Rufus
- We assume that you have downloaded a compressed image file according to the instructions above.
Check that you have the current version of Rufus.
Check that you have a tool that can extract the content from the compressed image file, and that can cooperate with Rufus, for example 7-zip.
- Run Rufus, and it can manage the whole process of extraction and cloning from the compressed image file to a USB pendrive.
When you try to boot from the operating system in the target drive, there might be problems due to different size of the original drive size and the target drive size. This can be fixed in Ubuntu (and other Linux distros) by gdisk and often also by gpt-fix or gparted, if the target drive is big enough to store all the partitions in the original source drive. Otherwise you need a bigger target drive.
Stepwise instructions
Check the download and clone the image in Windows according to the following page
Win32DiskImager/compressed-image_2_USB-or-SD
or according to this summary:
Download the following help programs
https://sourceforge.net/projects/win32diskimager
First check that the download was successful with md5summer according to the file md5sums.txt.asc.
Next extract the image file with 7-zip (It is also possible with winzip)
from dd_Ubuntu_16.04-gamma-UEFI-n-BIOS-4-pendrive-12GB.img.xz
to dd_Ubuntu_16.04-gamma-UEFI-n-BIOS-4-pendrive-12GB.img
The target drive will be overwritten. Double-check which is the target drive, the drive you want to install into!
Then write the extracted image file (without the ending gz) with win32diskimager
Win32diskimager looks for img files.
gpt-fix
After this cloning operation you should run gpt-fix in order to match the gpt data to the current drive size (unless you are using mkusb version 10.6.6 or newer versions of mkusb).
See more details at /stable-alternative#gpt-fix
Final system tweaks
Decrease wear for a pendrive
Add the mount option noatime in /etc/fstab
# / was on /dev/sdb3 during installation UUID=4c518694-d97c-4910-bb7b-eeb6a6b73874 / ext4 noatime,errors=remount-ro 0 1
Do not copy this line. Use your own data, only add noatime,
Turn off journaling
sudo tune2fs -O ^has_journal /dev/sdxy
where x is the drive letter and y is the partition number of the root partition, for example /dev/sda3.
Maybe remove swap
It is also possible to remove the swap partition and the swap entry in /etc/fstab in order to avoid wear due to swapping.
Move swap and grow root partitions
Move the swap partition and grow the root partition to use the whole drive. See this link
https://phillw.net/isos/linux-tools/uefi-n-bios/GrowIt.pdf
Alternate link: GrowIt.pdf
Login and password
When you have installed these systems from a compressed image file, and you reboot, you log in with the following user and password
user: guru |
password: changeme |
It is a good idea to change the password.
Links
If you want a stable portable system, that boots in UEFI mode as well as BIOS/CSM mode, and in 64-bit as well as 32-bit computers, you can try One pendrive for all PC (Intel/AMD) computers. If you want a pendrive with a live and an installed system, you can try A new and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode
It might be a good idea to try various systems and methods before deciding what to install. Try Ubuntu (Kubuntu, Lubuntu, Xubuntu, ...) before installing it
The following links contain general information