Post4VPS Forum | Free VPS Provider
Installing Ubuntu on Desktop in pre-exist partition - Printable Version

+- Post4VPS Forum | Free VPS Provider (https://post4vps.com)
+-- Forum: General Chat (https://post4vps.com/Forum-General-Chat)
+--- Forum: General (https://post4vps.com/Forum-General)
+--- Thread: Installing Ubuntu on Desktop in pre-exist partition (/Thread-Installing-Ubuntu-on-Desktop-in-pre-exist-partition)

Pages: 1 2


Installing Ubuntu on Desktop in pre-exist partition - Rehan - 04-24-2020

Hello experts,
                    I am trying to install Ubuntu on my desktop PC.I have downloaded ISO from Ubuntu official site. I have made a bootable usb drive. Now i want to install it in pre-exist C drive. A year ago i was installing it on my PC and unfortunately i lost all of my data. Installed Ubuntu in a whole Drive. I am scared of installing it. So asking here if it is possible to install Ubuntu in C drive alongside windows. is it possible to install it?

I was also trying it in a Oracle Virtual Box but unfortunately i am unable to start a session it is always giving me error.

Code:
Failed to open a session for the virtual machine Ubuntu.

The virtual machine 'Ubuntu' has terminated unexpectedly during startup with exit code 1 (0x1).  More details may be available in 'C:\Users\PCName\VirtualBox VMs\Ubuntu\Logs\VBoxHardening.log'.

Result Code: E_FAIL (0x80004005)
Component: MachineWrap
Interface: IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}



RE: Installing Ubuntu on Desktop in pre-exist partition - fChk - 04-24-2020

(04-24-2020, 09:29 AM)Rehan Wrote: Hello experts,
                    I am trying to install Ubuntu on my desktop PC.I have downloaded ISO from Ubuntu official site. I have made a bootable usb drive. Now i want to install it in pre-exist C drive. A year ago i was installing it on my PC and unfortunately i lost all of my data. Installed Ubuntu in a whole Drive. I am scared of installing it. So asking here if it is possible to install Ubuntu in C drive alongside windows. is it possible to install it?
Are you serious?!.. Of course you can't!.. Either one or the other. If you want a dual boot then you'll have to set a partition for each one of them. And given that you're not all that competent, I would suggest to get an other hard drive for Linux. This way, the chances of messing up your Windows system can be minimized. OR, install it in a VM.

(04-24-2020, 09:29 AM)Rehan Wrote: I was also trying it in a Oracle Virtual Box but unfortunately i am unable to start a session it is always giving me error.

Code:
Failed to open a session for the virtual machine Ubuntu.

The virtual machine 'Ubuntu' has terminated unexpectedly during startup with exit code 1 (0x1).  More details may be available in 'C:\Users\PCName\VirtualBox VMs\Ubuntu\Logs\VBoxHardening.log'.

Result Code: E_FAIL (0x80004005)
Component: MachineWrap
Interface: IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}
What the 'C:\Users\PCName\VirtualBox VMs\Ubuntu\Logs\VBoxHardening.log' file is saying.
Otherwise, google 'VirtualBox E_FAIL (0x80004005)' for help and make sure you're using the latest VirtualBox.

If you're on Win7, check if there is no conflict between that system and the version of VBox you're running.

Good luck!


RE: Installing Ubuntu on Desktop in pre-exist partition - youssefbasha - 04-24-2020

I dont recommend that at all, i installed Ubuntu a month ago and i discovered that they use something like another hard partition type, i couldn't install back Windows on C before removing the whole disk from partitions and create a new disk again


RE: Installing Ubuntu on Desktop in pre-exist partition - sAmI - 04-25-2020

(04-24-2020, 09:29 AM)Rehan Wrote: Hello experts,
                    I am trying to install Ubuntu on my desktop PC.I have downloaded ISO from Ubuntu official site. I have made a bootable usb drive. Now i want to install it in pre-exist C drive. A year ago i was installing it on my PC and unfortunately i lost all of my data. Installed Ubuntu in a whole Drive. I am scared of installing it. So asking here if it is possible to install Ubuntu in C drive alongside windows. is it possible to install it?
It's does not sound possible though, as he mentioned you should get a hard drive for another OS which would be more easy way to manage, Instead of creating Partitions. And about your VM Problem i ran into a similar problem have you tried enabling or disabling Virtualization in the BIOS Setting? And how are you trying to install the OS through ISO?
 i
(04-24-2020, 12:52 PM)youssefbasha Wrote: I dont recommend that at all, i installed Ubuntu a month ago and i discovered that they use something like another hard partition type, i couldn't install back Windows on C before removing the whole disk from partitions and create a new disk again

It's not with Ubuntu i guess, I think every Linux (might not be) creates a different type of partition and for installing windows you will have to convert it to a NTFS or FAT Partition i believe so it can work again.


RE: Installing Ubuntu on Desktop in pre-exist partition - Littlemaster - 04-25-2020

I have installed Ubuntu along with Windows in a single hard drive. I created a different empty partition and installed Ubuntu in it using a pen drive. I think you can install it, but some issues like slow boot up and permission errors may occur. Hard drive may get damaged(I am not sure, I got one damaged).
Yes, but it is possible, don't do it in C drive, or windows local drive, create a different empty partition.


RE: Installing Ubuntu on Desktop in pre-exist partition - Mashiro - 04-26-2020

(04-24-2020, 09:29 AM)Rehan Wrote: [...] So asking here if it is possible to install Ubuntu in C drive alongside windows. is it possible to install it? [...]

No, this is simply impossible!

Reason(s) why it is impossible:
  • Windows doesn't support OS installation of different OSs within its own partition (not talking about VMs here).
  • Linux also doesn't really support installation of itself on the drive of another OS anymore (Ubuntu kinda did in the past - like long ago).
  • Windows uses the NTFS (possibly also ReFS - being a successor to NTFS) filesystem for its partitions.
  • Linux mostly uses EXT4 or other common Linux filesystems such as XFS or Btrfs for its system partitions.
  • Installing Linux on the Windows partition would simply wipe your Windows installation and install Linux over it (vice-versa for Windows over Linux). Hence why you lost your Windows installation and all your data on it.

The following information is not a guide/tutorial. It is merely a brief list of how you would proceed to make space for Linux from an existing Windows partition and what to do in Linux to install it on that free space! Always take backups. Things can easily break if done incorrect!

What you can do however is:
  • Grab a copy of Clonezilla (or similar) and backup your whole system through a 1 by 1 original copy.
  • Resize your Windows partition and shrink it to make available free space for your Linux installation.
  • Boot from a Linux Live CD and run the installer. At the disk partition step select the option to create a custom partition layout.
  • In the custom partition layout creation process use the free disk space to create a partition that the Linux installation will use to install itself on (don't touch the Windows partitions!).
  • Finally install Linux on the Linux partition you just created.

Reference resources for a detailed guide/tutorial:
- https://help.ubuntu.com/community/WindowsDualBoot
- https://www.tecmint.com/install-ubuntu-alongside-with-windows-dual-boot/
- https://vitux.com/how-to-install-ubuntu-18-04-along-with-windows-10/

I'm merely providing links to guides/tutorials. It is up to you to use them and try what is described in them. If you didn't create a backup and things went wrong you are solely responsible!


For the sake of not going absolutely insane I would recommend against doing this if you are using Windows 10. The big Windows 10 updates (that are released twice a year) that basically reinstall Windows tend to mess up the boot record and break the boot menu. So you would no longer be able to either boot into Windows or into Linux. Fixing this is a nightmare! I have done it with partial success and just gave up after hours for trying all kinds of fixes. Fixed MBR? Grub dead. Fixed Grub? MBR dead again. Over and over the same. After that I installed Windows 10 Enterprise LTSC and later a fresh copy of Ubuntu to have a perfectly working dual boot system with two different partitions containing two different OSs.


(04-24-2020, 12:52 PM)youssefbasha Wrote: I dont recommend that at all, i installed Ubuntu a month ago and i discovered that they use something like another hard partition type, i couldn't install back Windows on C before removing the whole disk from partitions and create a new disk again

Linux uses absolutely different filesystems like EXT4, Btrfs and XFS versus NTFS (and sometimes ReFS) for Windows. Windows cannot be installed on anything different than Windows supported filesystems. Infact Windows cannot even read any other filesystems than the Windows filesystems (FAT, FAT32, exFAT, NTFS, ReFS) without additional software.

There is no such thing as "hard partition type". All you have to do is simply remove all partitions in the Windows installer and create new ones from the free disk space. Windows will format these new partitions with NTFS automatically and you can install Windows normally on them like before.


(04-25-2020, 01:50 PM)Littlemaster Wrote: Hard drive may get damaged(I am not sure, I got one damaged).

I have to stop you right here!

A OS installation cannot damage a HDD or SSD. To damage a HDD you need to cause physical damage on either one or multiple components of the HDD. A OS installation cannot do this. For a SSD to break you also need to somehow either create physical damage on one of the components or massively degrade the flash cells by absolutely excessive and enormous write operations. And I highly doubt a OS installation can cause enough flash cell writes to break a SSD (excluding cases where the flash cells have already been in a very bad state since that is already a "broken" or rather said "near death" SSD). And a full and clean OS reinstallation back to e.g. Windows will never fix a damaged HDD or SSD.

What you can do with a OS installation is that you can break the partition table, break partitions or mess up the boot record. This things will of course cause issues with any previously installed OSs. Some of this issues can be fixed others might be impossible to fix and can only be really fixed with a fresh OS reinstallation.

So please don't spread false information. Properly inform yourself before making such statements.

Very often "a HDD or SSD really breaking during OS installations" are real coincidences that simply fall short on luck and are not caused by the OS reinstallation.



Quote:Linux also doesn't really support installation of itself on the drive of another OS anymore (Ubuntu kinda did in the past - like long ago).

So I just re-checked it to make sure I'm not spreading false information.

Indeed it was so that in much older Ubuntu versions like e.g. 9.04 you could install Ubuntu inside Windows without creating any partitions or similar. This installation method was not without disadvantages as you will be able to see in the screenshot below.

Proof:
[Image: OEDxAAT.png]

[Image: ywBROYe.png]

[Image: NcOtonc.png]

[Image: yvAOaqM.png]

[Image: tijzT3S.png]

[Image: pIR5MaY.png]

[Image: Dal4WCZ.png]

[Image: gu3oC5s.png]

[Image: xGfTvra.png]


That was back in the days. That was how back in the days I actually had Ubuntu running on my computer when I more of a newbie terms of Linux and other IT things. I started with Ubuntu 6.06 back then and later Debian 5.

As you can see this is no longer possible in a lot of recent Ubuntu versions. I didn't really follow up when Ubuntu stopped providing this feature.

How does it work? Well here is a litte information about that.
- Firstly what this does is that it creates a folder called ubuntu on the C: partition (screenshot). Inside this folder it creates subfolders. One folder contains the Linux partitions as files (screenshot). The other folders contain some tools and a copy of the installation ISO (screenshot #1, screenshot #2).
- Secondly it modifies the Windows bootloader and adds an entry to boot into grub. From within grub the partition files from the C: partition will be loaded up and Ubuntu will start. At the first start it loads the copy of the ISO for the automatic OS installation (like in the proof screenshots).

That's about it. The disadvantages are performance hits as it operates from partitions inside files inside another partition instead of reading and writing files to a direct partition. And another big problem is resizing the partition. You can probably shrink it but not make it bigger because the size is bascially fixed when you select the size in the Windows installer (see proof screenshots). Hibernation is also not possible. Everything else should work. Back in the days I didn't have many issues with this method.



RE: Installing Ubuntu on Desktop in pre-exist partition - tryp4vps - 04-27-2020

Although it is not possible to install the full version of Ubuntu on C drive alongside with Windows, it is not difficult to install the Microsoft's version of Ubuntu under Windows.

You will just need to enable the "Windows Subsystem for Linux" (WSL) feature, and then download the Ubuntu installation file from:

https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6

Then you should be good to go. Smile


RE: Installing Ubuntu on Desktop in pre-exist partition - Rehan - 04-27-2020

Thanks for the brief explanation @Hidden Refuge. I got everything what i was asking about. Actually i was searching for installation of Ubuntu alongside the windows. I found a video on youtube. I wanted to confirm about it. So you answered it.

Quote:Linux uses absolutely different filesystems like EXT4, Btrfs and XFS versus NTFS (and sometimes ReFS) for Windows. Windows cannot be installed on anything different than Windows supported filesystems. Infact Windows cannot even read any other filesystems than the Windows filesystems (FAT, FAT32, exFAT, NTFS, ReFS) without additional software.

There is no such thing as "hard partition type". All you have to do is simply remove all partitions in the Windows installer and create new ones from the free disk space. Windows will format these new partitions with NTFS automatically and you can install Windows normally on them like before.

So it means if i want to install Ubuntu. I will have to wipe all my data and re-create all partitions? The fact of installing ubuntu into " C " Drive is still confusing me.

@fChk Thanks for you help about the VM issue. I have upgraded my windows to 10.Now i have decided to purchase a new hard drive after this lockdown.So i will be able to install Linux and Windows.


RE: Installing Ubuntu on Desktop in pre-exist partition - Mashiro - 04-27-2020

(04-27-2020, 02:27 PM)Rehan Wrote: So it means if i want to install Ubuntu. I will have to wipe all my data and re-create all partitions? The fact of installing ubuntu into " C " Drive is still confusing me.

No, you don't have to wipe all your data, recreate all partitions and reinstall your OSs.

You shrink your Windows C: partition to make free space for an additional partition that will be used for Linux. That's all. During the installation of Linux you select this free space to create a partition for Linux.


RE: Installing Ubuntu on Desktop in pre-exist partition - Rehan - 04-27-2020

(04-27-2020, 03:04 PM)Hidden Refuge Wrote: No, you don't have to wipe all your data, recreate all partitions and reinstall your OSs.

You shrink your Windows C: partition to make free space for an additional partition that will be used for Linux. That's all. During the installation of Linux you select this free space to create a partition for Linux.

How will i re-create my partitions? If i delete one partition to re-create, it will automatically delete all my data. Or is there any different method?