Score:0

Can't boot from flash drive with custom .img

al flag

I recently tried using this answer to create a custom .img of my system. I created a fresh Ubuntu Install in a new partition, set everything up, installed all the bloat I need for some stuff and then switched to main my Main Partition to flash an .img of the partition using the default disk manager and Create Partition Image.

It all worked and I now have the .img. I named it accordingly:

(It is 16gb in size)

Then I tried using dd to flash it to a SanDisk 32 Gb USB Stick (150MB Read Speed):

sudo dd bs=4M if=BloatBuntu.img of=/dev/sdd conv=fsync status=progress

That all went fine. I now had the Stick with the stuff on it:

Then I shut off my laptop, pressed down the F12 key as hard as I could and there it was. The glorious Boot Menu. I selected my USB stick thinking everything would go fine and I'd have a nice Live USB everything usable and cool and amazing and rainbow. Instead I got launched right back into the boot menu. Then I tried again - same thing.

So I booted back into my main partition and tried to use this thing in the default disk manager to flash it again. I assumed I'd just messed up the command or something (I'm quite new to Linux, maybe 1 Week). Then I waited for a long period of time and It finished!

Excited I boot into the menu. It said that the Disk isn't bootable and that I should "insert a bootable floppy disk".
Then, a thought came to my mind "Maybe this 32GB San Disk USB Stick is just broken". So I flashed it to a 64 GB San Disk Ultra Extreme SD Card that was much faster. I tried again and again. Nothing ever worked.

When I tried an Ubuntu ISO, which I downloaded via Torrrent to not put strain on their mirrors, it all worked and booted fine.

Now I come here, does anybody have an idea why my USB wont boot? What can be done to help it?

ru flag
the Ubuntu iso is different as it loads an EFI / MBR partition in it and is compatible that way. Cloning directly from a disk image to a USB does *not* set up the boot partition records or the EFI partition necessary to boot a USB stick. You might be missing components for the disk to work such as a bootloader being set up. (It's not typical that you go from a disk .img to a full USB that is 'bootable' the same way as a standard ISO would be)
C.S.Cameron avatar
cn flag
@User1986: The guide that you almost followed uses disk images not partition images. If you look at the first picture on that guide you will see the cursor hovering above the words "Create Disk Image".
Score:2
cn flag

Boot from Flash Drive with Custom .img

The guide that you linked to uses disk images not partition images.

If you look at the first picture on that guide you will see the cursor is hovering above the words "Create Disk Image".

This is a link to the recommended method to create your source drive:

How to Create a Full Install of Ubuntu 22.04 to USB Device Step by Step

And here is a link that adds more details to the previous answer:

https://askubuntu.com/a/1300542/43926

Score:0
jp flag

You can try with the Ubuntu Server distributed as a compressed image file. When extracted to a drive, it is an installed system that can boot PC computers both in UEFI mode and BIOS mode. You can find more details about it at this link to the Ubuntu Forums.

This system boots into text mode alias command line when extracted and cloned to any drive that is big enough for the extracted image, also a USB pendrive or USB SSD.

As long as it is supported (until April 2027), you may prefer the Jammy version, alias 22.04.x LTS, found via

http://cdimage.ubuntu.com/ubuntu-server/jammy/daily-preinstalled/current/

I assume that you want a graphical desktop environment, and when booted into the server, you can run the following command

sudo apt install ubuntu-desktop

to get standard Ubuntu Desktop, and similar commands to get the Ubuntu family flavours, for example

sudo apt install lubuntu-desktop

to get Lubuntu. Reboot to get into the desired desktop environment.

I sit in a Tesla and translated this thread with Ai:

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.