I used grub2 to boot the Ubuntu ISO file from my hard disk (without burning it to a DVD or a flash drive), but I don't want to install Ubuntu to a partition on my hard disk; instead I want to install it to a disk image (.img)file.
So, I created an .img file (using dd) and then I mounted the .img file through multiple ways:
Using
kpartx(which mounts to/dev/mapperdevices).Using
losetup(which mounts to/dev/loopXdevices).
But when I run the Ubuntu installer (ubuquity) the installer doesn't seem to recognize the loop device as a hard disk, so I only get /dev/sdXX device and can't see loop devices!
Now, I didn't try to mount the image using the mount command, but I'm sure it will show the same issue, because as far as I know that losetup uses mount to mount the files.
So I have two questions:
Is there a way to make ubiquity detect "loop devices" as hard disks?
Can I mount
.imgfiles to/dev/sdXXdevices (instead of the normal/dev/loopX)?