Score:1

Install Linux from Linux without a USB or a CD-DVD

sb flag

I switched from Windows to Linux (Ubuntu) a few months ago and decided that it'd be a good idea to delete my Windows partition, which I did using the Disks application on Ubuntu.

However during the transition I made the Linux partition only 80 GB big and now I am stuck with 399 GBs of space just laying around.

I don't have a USB or a CD/DVD and I was wondering if I can install Linux from Linux or if there is a way to make use of the free space and save my files there.

I noticed that there is a related post here but as far as I understand this is a Windows only tutorial.

Here is what my Disks application looks like and I have a UEFI system.

Thanks in advance.

ru flag
The title of your question is confusing, are you trying to *reinstall* Linux from within your Linux system? Or have you considered just adjusting your Linux partition size from within the system? You can live expand the system using `gparted` to edit the partition table and resize the partition (though if that doesn't work we'll have to walk through it on the command line)
Giorgos - Marios Patelis avatar
sb flag
@ThomasWard both of these will work for me. I've already downloaded the Ubunty-20.04 iso so I can create a second bigger Linux partition but resizing seems way easier at least on paper. I installed gparted a few days ago but when I right click -> Resize/Move my currect partition all signs are [grayed out](https://imgur.com/1GaFjj7)
ru flag
Yikes, okay, so that's not going to work that way, I didn't see your *Linux* partition is at the end of the disk. Let me search for a solution, we may have to have you download the ISO and then boot to it from RAM and then use gparted to move and then resize the partition. (Rather than a full install)
Giorgos - Marios Patelis avatar
sb flag
@ThomasWard Someone on Reddit suggested this : Go into gparted (install it from the software center if needed). Format the 399gb as ext4. Open the Disks utility, and look to see either the drive name (/dev/sd_) or the UUID of the partition. Add an entry to /etc/fstab to mount the new partition at boot. I would suggest mounting it as /home. Copy your home folder (/home/<your_name>) and all its contents to the new partition and then restart. Make sure the new partition is mounted as home, and then you can delete your old home folder from the 81gb partition. Would this work for me?
user535733 avatar
cn flag
You are asking for something that will have a challenging solution. You will need to edit config files, understand a bit about how partitions work, understand a bit about the boot process, know how to use a text editor properly, and how to use sudo properly. If you're not ready for those tasks, then borrow a friend's USB drive for an afternoon. The Ubuntu installer is designed to be used with a USB *because that's the safe and easy way*. However, if you're ready to try a new challenge and learn, almost everything you need is already in the link you posted in your Question.
Score:2
cn flag

Booting ISO from GRUB Menu

The method on this page should work for booting an Ubuntu ISO from the GRUB bootloader 20.04 booting .iso from GRUB menu No need for a USB here.

To reiterate:

  • Add the following menuentry to /etc/grub.d/40_custom:

    menuentry "isoname ISO" {
      set root=(hdX,Y)
      set isofile="/[path]/[isoname].iso"
          loopback loop $isofile
          linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram --
          initrd (loop)/casper/initrd
    }
    

Where (hdX,Y) is the disk and partition the ISO is on, [path] is the path to the folder the ISO file is in, and [isoname] is the name of the ISO

  • In Terminal run:

    sudo update-grub
    
  • Reboot and select Ubuntu from the grub menu. Install as usual.

  • Please let us know how this works for you.

Score:0
in flag

I asked and answered my own question like this here. How to modify partitions without a live USB/CD

That Q/A is focussed on using GParted to resize a root partition, something you cannot do when the partition is mounted and the system on it is running. If you follow this you can resize your existing installation to use the whole disk.

The same principles apply if you want to boot a live iso that would allow the installation of some other distro.

The simplest way to make use of your unallocated space though is to use GParted in your existing installation and create a new partition and mount that somewhere convenient like /home/youruser/files. Then you can use it for file storage. Alternatively you could move your entire home directory there. There are plenty of guides on here about how to do that.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.