3

How can I create a linux os in ram, so it does not have to booted from the PC? I can install linux os in a USB stick, but there is no program to run it from within windows, but I can do this from a CD??

If I want it to be transportable, I cannot guarantee I will have access to the boot control, so that is a non starter.

But the "Live" editions all seem require to be booted!

5
  • 6
    Operating systems generally require to be booted, and not run by a program "from within windows". You could use VirtualBox, which is a program, but Ubuntu will still boot in a virtual machine. Dec 20, 2018 at 22:57
  • 2
    Good question with simple answer. Dec 21, 2018 at 4:35
  • 1
    Possible duplicate of Can I boot a Live USB fully to RAM, allowing me to remove the disk?
    – karel
    Dec 21, 2018 at 5:42
  • @C.S.Cameron If you understand the question, please rephrase it to be useful for other readers. I am completely unsure what OP is trying to achieve, just like mikewhatever. Does OP actually want to run a live session? A virtual machine? Or read Ubuntu files from Windows?
    – Melebius
    Dec 21, 2018 at 8:15
  • 2
    @Melebius: My understanding is that the OP wants to run Ubuntu while booted from Windows. He does not want to boot a USB stick using BIOS or UEFI "boot control" or have to change these settings, like shutting off secure boot etc. By RAM I think he means Windows RAM, without anything being written to disk. Not to run it using the toram option. Dec 21, 2018 at 8:31

3 Answers 3

4

This question is actually two questions.

  1. How can I run Ubuntu in RAM?

  2. How can I start Ubuntu without booting?

    • You cannot do that, but there is a workaround. You need not boot the computer itself, you can boot a virtual machine, and run Ubuntu as a guest operating system.

    • Install a virtual machine, for example VirtualBox, {KVM & virt-manager} or QEMU

    • Boot the virtual machine from the Ubuntu iso file. The answer by @C.S.Cameron shows an easy method to use QEMU
    • If you wish, you can create a virtual disk and install Ubuntu (in the virtual disk in the virtual machine)
    • Please notice that the virtual machine will be less powerful than the real hardware computer, so Ubuntu will struggle unless the [real hardware] computer has rather powerful CPU, GPU and enough RAM to run both the host operating system and the guest operating system (Ubuntu in the virtual machine).
5
  • 1
    There is portable Virtualbox: pendrivelinux.com/…
    – pLumo
    Dec 21, 2018 at 8:14
  • @RoVo, Yes, portable Virtualbox can be a good alternative. Portable systems can often be a good alternative. For example, I have an external box with an SSD with Ubuntu with VirtualBox with Windows :-)
    – sudodus
    Dec 21, 2018 at 8:19
  • @RoVo Is portable VirtualBox working OK nowadays? The times I have tried it long ago, it messed up my installed VBox Dec 21, 2018 at 8:38
  • no clue, I don't use Windows at all.
    – pLumo
    Dec 21, 2018 at 8:39
  • you can also run a program in windows command line called diskpart which is the windows equiv of gparted. It will allow you to transfer, although not from a live boot drive. You would need to first copy the fs / boot partition/ etc onto thumb drive & transfer from there.
    – Nate T
    Jun 8, 2021 at 5:56
2

Boot ISOs or Live USBs in Windows

MultiBootUSB, ( http://multibootusb.org/page_download/ ) will allow you to boot a Ubuntu ISO or Live USB in Windows, (or other OS) using QEMU.

MultiBootUSB-QEMU

2
  • I have tried to use portable version of Oracle;s virtualbox with no success, it comes up with "No session". The point is to try out Linux, not replace the operating system. I am prepared to accept a slow test system. But booting the USB not possible, so another method has to be found that works. Dec 21, 2018 at 23:48
  • @Stephen Adams: MultiBootUSB is a quick free install for Windows, (or Linux), As you can see from above it will run Ubuntu, (or many other Linux OS), in a window. it boots either an ISO file or a Live USB. No need to create a Virtual Machine first. I think the computer needs to have virtualization technology, which most now have. Dec 22, 2018 at 3:28
0

I wanted to get a test version of Linux (with a GUI) up and running for a friend who wanted the first experience of Linux.

But most of the "Live" versions out there want to take over the booting of what ever PC they were on.

This was beyond my friends capacity and I had no idea which computer it might be used on, so that was out of the question.

I settled on a USB version of a "Virtual Machine" called Portable Vitrualbox. Virtualbox being the VM environment created by Oracle.

This enabled me to load what I thought were very low images of Linux into the USB, along with the VM program, which Tibo had altered so everything stayed on the USB.

The only use of the Host Windows computer was its RAM and access to the Internet.

So everything would be back to normal, untouched by Linux or the Virtual Machine on removal of the USB.

One problem I encountered was that the VM software was well documented, but the Portable version was not.

If you ran it as it was installed it crashed as it had no default operating system, or the operating system was on the computer you installed it from, and was left behind when you moved it to another computer.

What you needed to do was to find some Linux ".iso" images which were small enough to load on a USB memory stick. I found three Puppy Linux, Porteus and Linux Mint (Although Linux Mint was nearly 2Gb long, larger USB sticks are available to keep up).

The other thing was when running the VM software was to install a CD-ROM on the IDE drive, along with the location of the ".iso" file you wanted to run "Live". This had to be a directory on the USB stick!

A default IDE hard drive was included in the setup of 2GB, but this was a Virtual drive, so initially it only took up 2Mb, but could expand to its maximum capacity if required. So the limit was the size of the USB stick which found was a minimum of 4Gb.

The Virtual Machine could then be "Started" by using the start button and immediately went to the CD-ROM as the virtual "Hard drive" was empty.

It then ran the "CD-ROM" ".iso" file and booted Linux, depending on which copy you had setup.

The instructions were not always clear, you had to watch out for the notes on passwords required for the system, as they wizzed past, which were always different. But if you let it go nine times out of ten it would install to a GUI desktop.

Then you could use the mouse to change the default setting, that would last this one session. I always managed to run a browser and access the Internet and managed to run Linux based Office programs, if supplied on the ".iso" file.

On exiting the VM you could leave as it was and return later to its suspended state, or you could power it down and it would loose all the settings and start a new session from the "CD-ROM".

Installing ANY Linux system on to the small virtual "Hard Drive" seems to be out of the question as it quoted tens of Gb's to install the full programs, and required many more disks than the first "iso" file supplied.

So having the "hard drive" partitioned and a swap drive added was a bit of a waste of time, as it was never used, but the VM software assured me the VM software would fail to start if it was omitted.

The advantage of the Portable version is that all the references to any software location are made "relative", so they stay within the USB drive and are not referred to by drive numbers, once setup.

So you CAN run Linux, with limits from a USB stck, but it will get hot, due to the accesses made by the software and eventually you will have to re-format the drive and re-load the software, as it leaves many damaged file headers all over the USB stick, which makes it impossible to transfer files to it.

You do NOT need a bootable USB, in fact it takes up space you could use for the "iso"s.

You DO need to format it to "FAT32" and make sure there are no dud sectors, so I would not use the "quick format" option in Windows.

You then need to load Portable-VirtualBox.exe on to your chosen USB mmory stick. After running it for the first time it will download VirtualBox from the Oracle website and install it untouched.

You then need to exit the software and load into the folders on the USB stick, the "iso"s you want to try out.

Re-run the Portable-VirtualBox.exe program and set it up as detailed above, to get a working system.

The references are: Portable-VirtualBox.exe from http://download.tuxfamily.org/lilicreator/virtualbox/5.X/

VirtualBox from Oracle (which can also be used the main hard drive of a PC, not just a USB). https://www.virtualbox.org/wiki/Download_Old_Builds_5_2. This where Tibo gets his from.

Pendrivelinux.com which has the various flavours of Linux and their installation. https://www.pendrivelinux.com/using-a-portable-virtualbox-to-run-linux-from-usb/

A very Merry Christmas to All!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .