Problem with partition installing Ubuntu 24.04 dual boot

I’m new for Ubuntu
Last night I tried to install Ubuntu, but unfortunately I received an error during installation.
To summarize:
From Windows 7, I shrunk my D:\ partition, and the remaining free space was not listed as NTFS, but as 150 GB of “available space.”
Then, from the boot menu, I booted from the USB drive where I had my Ubuntu image made with Rufus (version 4.11 running on a Windows 10 PC).
I went to the manual configuration, setting:

  • ext4 mount / of 130 GB
  • swap of 4 GB
  • and then I saw that it had also flagged a FAT32 /boot/efi of 1 GB.

At that point, I ran the installation, but after a few minutes, it returned a load of code that I think looked like this:

Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: util.subp(cmd, data=sfdisk_script.encode(‘ascii’))
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: File “/snap/ubuntu-desktop-bootstrap/413/lib/python3.10/site-packages/curtin/util.py”, line 323, in subp
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: return _subp(*args, **kwargs)
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: File “/snap/ubuntu-desktop-bootstrap/413/lib/python3.10/site-packages/curtin/util.py”, line 172, in _subp
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: raise ProcessExecutionError(stdout=out, stderr=err,
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: curtin.util.ProcessExecutionError: Unexpected error while running command.
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Command: [‘sfdisk’, ‘–no-reread’, ‘/dev/sda’]
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Exit code: 1
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Reason: -
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Stdout: ‘’
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Stderr: ‘’
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Unexpected error while running command.
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Command: [‘sfdisk’, ‘–no-reread’, ‘/dev/sda’]
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Exit code: 1
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Reason: -
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Stdout: ‘’
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Stderr: ‘’
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]:
Feb 04 21:30:38 ubuntu subiquity_log.4328[7238]: Stderr: ‘’
Feb 04 21:30:38 ubuntu subiquity_event.4328[4328]: curtin command install
Feb 04 21:30:38 ubuntu subiquity_event.4328[4328]: executing curtin install partitioning step
Feb 04 21:30:38 ubuntu subiquity_event.4328[4328]: installing system
Feb 04 21:30:38 ubuntu subiquity_event.4328[4328]:

It seems like I can’t create and/or write to some partitions, right?
Could it be that “just” shrinking the D:\ partition with Windows 7 has left the free space empty? Should I just delete the D:\ partition? Or use some other tool to free up space?
Or try installing Ubuntu 22.04 LTS instead of 24.04 LTS, for example?
My PC is an old ASUS with an Intel Core i3 2.2 GHz, 4 GB of memory, and a 640 GB HDD, running Win7 Pro.

I found these possible causes online:
The curtin.util.ProcessExecutionError during Ubuntu installation usually indicates a failure in disk partitioning, target drive wiping, or networking, particularly with Ubuntu 24.04. Key solutions include ensuring a stable network, wiping the target drive, using a fresh ISO, and, if necessary, disconnecting from the internet during installation

Could I try removing web connections and installing the older version of Ubuntu 22.04?

Thanks everyone in advance.

Dual boot on one disk requires both systems to be installed in the same mode i.e. boot mode matching
More info here

Is Windows 7 installed in UEFI mode or Legacy mode?

Finally, Windows 7 is End of Life and should not be used to access the internet.

2 Likes

I checked and in BIOS I see “UEFI mode: enabled,” but when I enter Windows 7 and run “msinfo32” in the PC features, nothing appears. Could this mean that Windows 7 was installed in legacy mode?
In any case, I tried creating the Ubuntu ISO with both MBR and GTP using Rufus, and it always gives me the same error.
I found this on the web:

The “fdisk --no-reread /dev/sda” error occurs because the kernel cannot update the partition table while the disk is in use (e.g., mounted or having active swap). The --no-reread flag prevents sfdisk from checking if the device is busy, leading to a mismatch between the kernel’s table and the actual disk data.

  • Run partprobe or kpartx -u /dev/sda to update the kernel partition table.
  • Ensure no partitions on /dev/sda are mounted, then re-run the command.

But in this case, during the Ubuntu installation, how do I run sudo umount /dev/sda or partprobe /dev/sda ? I haven’t got a command line. Should I add these lines to some file in the autorunning Ubuntu ISO that I have on my USB drive? But where?

Could I bypass this bug by installing lighter software like Mint, or would I run into the same problem?

@silvio777 Welcome to Ubuntu Discourse :slight_smile:

Let’s start with some basics.

Can you boot the machine with a live ISO?

If yes, please choose to Try Ubuntu as the first step.

Then open a terminal and run this command:

sudo fdisk -l

Copy the output and paste it back here in your reply. Highlight the text and press </> in the composer to add code tags.

Thanks

On the understanding that we are going back to basics - here are some basics that we were familiar with during Windows 7 days.

  1. Use Windows tools to work on Windows partitions. Defrag before and after and then make sure Windows still boots.

  2. Run Ubuntu in Try/Live session and use Gparted to create partitions in the free/unallocated space - formatted as Ext4.

  3. Does Windows 7 have a boot partition? Is it a BIOS or EFI System boot partition? Boot partitions are formatted FAT (32 bit version)

  4. Install Ubuntu into the Ext4 partitions and make sure that the Grub boot files go into the boot partition. Windows and Ubuntu boot files can co-exist in the same boot partition.

In this particular case, the installer wants to create a boot partition probably because there is not a boot partition. Or, as suggested, the Live session is running in Legacy mode and there is a EFI System boot partition.

Regards

Here’s what I found on my Windows 7 PC:

When I type >cmd: bcdedit, I get \Windows\system32\winload.exe, so I believe my Windows 7 installation uses BIOS and not UEFI.
When I go to CMD and type LIST DISK, it doesn’t say * on DIN or GPT columns, so I don’t know if the disk is GPT or MBR partitioned.
Regarding the boot partition, I see that in Disk Management there’s a small 25 GB partition called Primary Partition, which should be the boot partition.
Also, in Disk Management, going to Priority/Volumes/Partition Style, I see “MBR Master Boot Record.”
In DOS, “List partition” shows:

Again, from Disk Management, I see a Disks situation where the first 25 GB partition, I assume, is the Boot partition:

When installing Ubuntu, I manually specified the partition creation as follows:

Typing “sudo fdisk -l” from the Ubuntu live terminal gives me this:

ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/loop0: 1.66 GiB, 1777532928 bytes, 3471744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop1: 523.25 MiB, 548667392 bytes, 1071616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop2: 925.91 MiB, 970883072 bytes, 1896256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop3: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop4: 73.91 MiB, 77504512 bytes, 151376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop5: 245.13 MiB, 257036288 bytes, 502024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop6: 11.13 MiB, 11673600 bytes, 22800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop7: 516.01 MiB, 541073408 bytes, 1056784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 596.17 GiB, 640135028736 bytes, 1250263728 sectors
Disk model: Hitachi HTS54756
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xaa9693fe

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 52430847 52428800 25G 1c Hidden W95 FAT32 (LBA)
/dev/sda2 * 52430848 552536063 500105216 238.5G 7 HPFS/NTFS/exFAT
/dev/sda3 552536064 1250260991 697724928 332.7G f W95 Ext'd (LBA)
/dev/sda5 552538112 943060991 390522880 186.2G 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 57.73 GiB, 61991813120 bytes, 121077760 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x159d0d6d

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 121077695 121075648 57.7G c W95 FAT32 (LBA)

Disk /dev/loop8: 91.69 MiB, 96141312 bytes, 187776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop9: 10.83 MiB, 11354112 bytes, 22176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop10: 49.29 MiB, 51687424 bytes, 100952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop11: 576 KiB, 589824 bytes, 1152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop12: 209.98 MiB, 220176384 bytes, 430032 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop13: 112.56 MiB, 118026240 bytes, 230520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop14: 304.88 MiB, 319684608 bytes, 624384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop15: 2.69 MiB, 2822144 bytes, 5512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop16: 2.69 MiB, 2818048 bytes, 5504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
ubuntu@ubuntu:~$

Therefore, Windows 7 boots in Legacy Mode.
Subsequently, you have to boot the Ubuntu USB in Legacy mode.

You booted in UEFI mode, as your screenshot shows sda4 as /boot/efi.
Dual boot (using one disk) with one OS in Legacy mode and the second OS in UEFI mode will fail.

Here’s a picture, which shows UEFI and Legacy boot options:-


Unlikely, it is 100% disponible (available i.e. empty).
It doesn’t look like a Windows 7 default partition.
Can you list the folder/files there?


By the way, to list partitions without the extraneous loop devices, you can use this command

sudo fdisk -l | sed -e '/Disk \/dev\/loop/,+5d'
1 Like

Sorry , what do you mean with “Can you list the folder/files there?”

You indicated that partition sda1 is a Boot partition.
It looked unlikely to me, therefore I wanted to double check by viewing the contents.

Do you mean I should double check here?

Yes. please check sda1.

If it is not a Boot partition and it is empty, as a I suspect, you can send me an expensive bottle of Valpolicella
:slightly_smiling_face:

If Ubuntu is to be installed in bios mode, you should have a small bios_grub partition. Here are the basic Ubuntu partitions with a bios install:

Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 25.8GB 25.8GB ext4

The bios_grub partition is small ( 1 MB) and not formatted with any file system. The bios_grub flag is set. The other partition is mounted as root (/).

In your case, if you determine sda1 is unneeded by Windows, I would delete it and create a bios_grub partiton there instead. Then try installing again.

Only if installing in BIOS mode in a GPT drive. Otherwise, with ‘msdos’ partitioning the bootloader is saved in the MBR.

1 Like

The OP’s disk label from the fdisk output

Ok , later I’ll try by doing what you suggested and if you are right I can send you a bottle of Barolo as I live in Piedmont :grin:

Is it ok this way?

Yes, looks OK to me (although I’m not very familiar with all the options within Rufus)

As your PC has Windows 7 in Legacy mode, I imagine that it is more than 10 years old?
If so, you may have more joy with a lighter flavour within the Ubuntu family?
Lubuntu 24.04 or Xubuntu 24.04?

1 Like

Yes, I suppose this PC is rather old.
But if I try to install Lubuntu would I have the same boot problems (I’m asking for) or not?

Is this your other PC?
If so, then, this is what I would do:-

  • Forget dual booting
  • Save any essential data from the Windows 7 PC
  • Use this PC as a learning device
  • Create GPT on the disk
  • Install Xubuntu 24.04 in UEFI mode

Unfortunately, the PC where I’ve created the imagine with Rufus is my office’s PC whereas the one with Windows 7 Pro is at home, so I’d like to solve the problems on windows 7 PC. This evening I try to verify what you suggested. I can’t modify my office’s PC

Ah, I understand
Therefore, you going to try dual boot in Legacy mode?

When you have booted the USB installer, open a terminal and enter:-

[ -d /sys/firmware/efi ] && echo "UEFI" || echo "Legacy"

Make sure that you have backed up your Windows 7 data.
I would also delete all the Linux partitions and let the installer use the free space.
It should only create one partition and the bootloader should install itself in the MBR.