Score:0

Messed up the boot... how do I create partitions now?

ug flag

I'm currently using Ubuntu 20.4.1 and I need to create partitions in the disk. I didn't create any during the installation. I used Gparted but it doesn't seem to be working as the disk needs to be unmounted before resizing and I can't unmount the disk as there is only one partition (which is being used now). So how do I create partitions now??

This is the image when I tried to unmount:

unmount

And this is when I try to use Gparted. The slider doesn't move and if I put numbers in the 'free space following(mib)' option and press enter, it just resets to zero:

gparted partition size management

in flag
There are many words in your question, but not a lot of information. Can you [edit] the post to include: (1) what OSes (if any) are currently on the computer (2) which version of Ubuntu you are working with (3) what your overall goal is. This will make it much easier for someone to offer guidance
Score:2
cn flag

As you indicate in your question, your one partition that was automatically created during installation is in use. You cannot change a partition that is in use.

To change the partitioning on this drive, you will need to work from a live session, i.e., a session started from an installation DVD or USB. More advanced users can do this at the terminal from a recovery prompt.

Score:0
in flag
BBQ

There is a great Live ISO called Boot-Repair-Disk. It has Gparted and other useful tools precompiled, so you can manage your disks and partitions. The Boot-Repar tool will help you to rebuild the boot record and the /boot. It supports EFI too.

  • A. (in case of Physical PC) Make a Boot-Repair Live USB media with dd in Linux or Rufus in Windows;
  • B. (in case of Virtual machine) just attach the Boot-Repair-Disk ISO to your VM;
  1. boot with Boot-Repair Live USB (or Boot-Repair-Disk ISO for VM); ignore the Boot-Repair tool wizard at this step, you might need it later;
  2. use Gparted to resize the partitions (and create new ones /home, /var, ...);
  3. mount your current root partition and the partitions you've created to e.g.:
mkdir /tmp/myroot
mkdir /tmp/mynewhome
mkdir /tmp/mynewYYY
mount /dev/nvme0n1p2 /tmp/myroot
mount /dev/nvme0n1p3 /tmp/mynewhome
mount /dev/nvme0n1pX /tmp/mynewYYY
  1. use blkid to find out the UUIDs of the partitions you've created (/home, /var ...);
  2. modify the /tmp/myroot/etc/fstab: use the UUIDs from the Step 4 to create the necessary records;
  3. move the files;
mv /tmp/myroot/home/* /tmp/mynewhome/
mv /tmp/myroot/YYY/* /tmp/mynewYYY/
  1. reboot and see if your main OS boots properly, your data is accessible, the programs work fine.

If the OS boots properly, but you data is invisible, or programs can't access their databases, make sure that fstab is properly configured and all the new partitions are mounted (start with lsblk).

If the OS doesn't boot (if you've messed with /boot), start the PC with the Boot-Repair-Disk once again and use Boot-Repair tool wizard (How To) to rebuild /boot (and MBR boot record if necessary).

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.