Results 1 to 5 of 5

Thread: How to install Ubuntu completely manually?

  1. #1
    Join Date
    Jul 2008

    How to install Ubuntu completely manually?

    Is anyone aware of a guide or tutorial that explains how to install Ubuntu completely manually? (In other words: from the command line without the use of any opaque "installer" programs.)

    I'm looking for something along the lines of the Arch Linux Installation guide:

    My goal is to boot a live Ubuntu environment (possibly the Desktop .iso) and then, from the command line, manually perform an installation of Ubuntu.

    I would expect such a guide to contain (at least) the following steps:

    1) partition disks
    2) format partitions
    3) mount partitions
    4) install system files (possibly via debootstrap)
    5) chroot into the new installation
    6) install any additional needed packages
    7) install a kernel
    8) configure, build and install the init ram disk
    9) install a boot loader

    I know how to do 1-5.

    I expect 6-7 to be pretty straightforward.

    It is really 8 (building initrd) that I am curious about. I anticipate using an unencrypted /boot partition, plus a LUKS encrypted root btrfs partition.

    9 is probably fairly straightforward.

    Step 8 is usually handled by one of Ubuntu's installers (desktop, live-server, server, or net boot). But due to some specific technical constraints, I would like more transparency and control, so I am considering trying a fully manual installation.

    Before I try to discover how to do a manual installation via experimentation, I figured I would ask to see if anyone know of any existing guides or documentation that would be helpful.

    Thank you.
    Last edited by mpb_; 1 Week Ago at 12:49 AM. Reason: I posted a link to a script that solves the issue.

  2. #2
    Join Date
    Aug 2011
    51.8° N 5.8° E
    Xubuntu 19.10 Eoan Ermine

    Re: How to install Ubuntu completely manually?

    Step 4 also includes configuring those system files, in particular your software sources, /etc/fstab, /etc/default/grub, files like that. There you can also choose settings for initramfs-tools.

    Step 7 is included in step 6. The kernel is installed from a package from the repositories, just like everything else.

    Step 8 is included in step 7. Whenever a new kernel is installed, the init ram disk has to be rebuild and installed. This happens regularly with kernel upgrades, so the necessary commands are included in the installation scripts of the kernel package.

    Also, don't forget to set up user accounts. Maybe on Arch it's standard to create only a root account during installation and user accounts later, but on Ubuntu it's standard to keep the root account locked and create an admin user account during installation.

  3. #3
    Join Date
    Jul 2008

    Re: How to install Ubuntu completely manually?

    Okay, so I did the following:

    1) Booted the Desktop .iso.
    2) Created a LUKS-encrypted ext4 root partition and a separate /boot partition.
    3) Ran debootstrap
    4) chrooted in ran apt-get install linux-image-generic

    Step #4 installed grub.

    I then rebooted. Grub boots. Grub can boot the kernel and the initrd.

    However, the initrd cannot find my encrypted root partition by its UUID. I suspect this is because the initrd does not know that the root partition is inside a LUKS encrypted partition.

    Does anyone know which configuration file(s) I need to edit so that the initrd gets built with the ability to cryptsetup luksOpen my encrypted LUKS partition?

    Thank you.

  4. #4
    Join Date
    Jul 2008

    Re: How to install Ubuntu completely manually?

    I remembered that in the past I have seen a package called cryptsetup-initramfs.
    This package contains a file:

    The above file appears to contain the relevant instructions.

  5. #5
    Join Date
    Jul 2008

    Re: How to install Ubuntu completely manually?

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts