2

This is what I have and what I want to achieve:

 Current Partition Setup   Current State         Desired State  

 /dev/sda1   /BIOS
 /dev/sda2   /             Ubuntu18.04           Ubuntu18.04 I
 /dev/sda3   empty         none                  Ubuntu18.04 II 

In want to install Ubuntu 18.04 II from my running installation Ubuntu 18.04. I.

  • I have an ISO install file.

What else do I need and how do I do it?

There is a similar question, Is there a program to install Ubuntu from a Linux system? It uses debootstrap and targets minimal Ubuntu systems and text only installs. Its a very complex setup. I am looking for sth saving the time and effort to reboot.

The key point of my question is that I do not want to shut down or reboot my computer.

I want to boot into /dev/sda1 and start an application/a script/single commands or whatever. After that Ubuntu18.04 II should be installed in /dev/sda3. And I am still in my running install on /dev/sda1.

CatMan
  • 1,399
  • 1
    I would say that just installing ubiquity and run it you will be able to do what you need. But I can test now. – schrodingerscatcuriosity Dec 13 '19 at 15:02
  • @guillermo chamorro Interesting idea. However, apt says in the package description that its meant as Live-CD installer and "Installing this package on a normal system is unlikely to be useful" (quote) – CatMan Dec 13 '19 at 17:11
  • I know this is not what you ask, but maybe the idea interest you: create a partition or a file for persistence and add a boot entry for the ISO with the proper configuration. The next reboot you will have a running system, and you don't need to install anything. – schrodingerscatcuriosity Dec 13 '19 at 19:51
  • Yes, there is a description in the Ubuntu help site. I just saw that @K7AAY added a link in an answer. Its a good and very helpful information. – CatMan Dec 13 '19 at 20:16
  • @karel, this link is about booting into a hard drive copy of the install CD. Its basically the same as what K7AAY linked. So sorry, no its not the answer. – CatMan Dec 13 '19 at 20:20

2 Answers2

1

Since you have already instaled one partition, you can use the same bootable media to install on the other partition.

Plug in your bootable Ubuntu USB, restart the PC and boot the Live CD. Once the Live CD is booted up, start the installation. The installation screen will start.

  1. Select the keyboard layout
  2. On the next screen, the installation will prompt you to install additional drivers, codecs etc.
  3. Formating partitions and dual boot setup This is a very important screen. On this screen, we need to choose how Ubuntu will install. Select the first option which says Install Ubuntu alongside Ubuntu.
  4. Now click continue, on this screen, you need to set up partitions and hard disk space. First, you need to select the drive on which we are installing Ubuntu. On this screen, there will be a graphic representation of our Ubuntu OS and Ubuntu installation and how much space they have or will get after we finish setting up the partitions.
  5. After you finished setting the partitions, click continue and you will get a prompt with a popup and it will ask us to confirm the changes.
  6. Next step is to set up the user account and computer name.
  7. After you set up the user account, the installation will start and it will take some time.
  8. Once the installation is finished, you’ll get a prompt again and it will ask to restart the PC. Remove the bootable USB and restart the PC.
Tejas Lotlikar
  • 2,945
  • 5
  • 17
  • 26
  • 3
    OP stressed "from my running installation". – schrodingerscatcuriosity Dec 13 '19 at 14:32
  • 1
    OP also seems to have presented an XY problem. This is a valid solution and the best way to accomplish the desired outcome. Maybe OP can make another edit to specify why they are unable to reboot the system - as there may be another problem hidden here. – Nmath Dec 13 '19 at 22:55
  • 1
    @Nmath. Sorry but can you explain what is a XY problem? There is no hidden other problem. The use case is regulary installing may partitions with different Ubuntu versions on hot plug HDDs. That can be done parallel to do other useful work. Technically I can not see why its required to do this from a live system. Where is the installer a different program from say gparted? Obvioulsy some options would not make sense, e.g. doing a full disk install on the HDD I am running from. Hope this info helps. – CatMan Jan 15 '20 at 14:37
1

https://help.ubuntu.com/community/Installation/FromLinux specifies "You may run the Ubuntu Desktop installer directly from your hard drive..." in its third paragraph. It specifies exactly what steps to perform in which order.

You may also wish to consider creating a swap partition, and telling each Ubuntu version to use it in lieu of a swap file; erase it at shutdown and reboot. That way, you would use less space for swap, as opposed to a swap file occupying space in /sda2 and /sda3.

K7AAY
  • 17,202
  • Thanks both good feedback. The main point to install from a running system is not solved, though. – CatMan Dec 13 '19 at 20:18