Ubuntu – Why does the freshly created on Windows bootable ubuntu USB stick not boot

bootsystem-installationusb

Feeling very frustrated after much effort failing to get a freshly (created on Windows) bootable ubuntu USB stick to boot. I hope you can help. I am new to ubuntu. I did install it once a long time ago on a USB stick on an old machine and had no problem that time. Then I did not use it. Now I am trying years later, to install ubuntu on a USB stick for the second time. At this early stage in my experience I prefer to have ubuntu installed on USB stick rather than disk.

This is a brand new (to me) Acer Aspire 3 laptop. I follow the procedure laid out in https://ubuntu.com/tutorials/create-a-usb-stick-on-windows. Downloaded file ubuntu-20.04.2.0-desktop-amd64.iso and rufus version 3.13.1730.

Tried all the permutations I could see of the settings rufus offered to make a bootable USB. There was no suggestion of error during that process. Each attempt appeared to have built a healthy USB with a meaningful population of files, etc. I could see this when I explored the USB file folders in Windows. When I restart the pc to boot from USB, it hangs somewhere during the loading process. The pattern of failure is the same in each case. Here is the scenario…

For each option set with (or without) secure boot disabled,
with USB drive as #1 in order for boot device,
with a freshly created bootable USB stick in USB 3.0 drive,
I click to Restart (or power on)

[I numbered the steps here to show sequence]

Screen says …
[1] "restarting" (if I clicked Restart)
[2] black screen
[3] "acer" logo
[4] black screen
[5] "GNU GRUB version 2.04" (and a menu of GRUB startup options)
[6] black screen
[7] "acer" logo and "ubuntu" logo
[8] ubuntu says "checking disks" (I let the disk check complete)
[9] ubuntu says "no errors found"
[10] the ubuntu spinner icon spins for about 43 seconds and then stops spinning
[11] (we seem to be hung at this point)
[12] while the spinner was active, the cpu fan was working (suggesting something was happening)
[13] a couple seconds after the spinner stopped, the cpu fan also stopped
[14] the screen is not black, it still has the frozen spinner icon
[15] wait a LONG time, just in case it comes to life, but it does not
[16] we are hung, get no response to Ctrl-C or Ctrl-Alt-Del or any other key
[17] only option now is to power off, remove USB stick, power on
[18] normal Windows restart

I looked at the options on the GNU Grub start menu. "c" and "e" seem to show some stuff that I could try, if only I knew what the parameter names mean. Is there something like a trace or debug option to give more info while the spinner is spinning? That would be great, but probably asking too much. At the Grub> prompt I can hit Esc to jump back to the menu and move forward to hang as before, or I can type exit and the screen will clear. What happens next depends… if I have secure boot enabled i will see a fancy logo with "Security Boot Fail" and if I recall correctly I can then use Ctrl-Alt-Del to go for another restart. When secure boot is disabled, Grub>exit takes me to a normal windows boot from disk.

These are the option sets I tried in Rufus to create the bootable USB:

  1. "MBR", "BIOS or UEFI", "FAT32"
  2. "GPT", "UEFI (non CSM)", "FAT32"
  3. "GPT", "UEFI (non CSM)", "NTFS"
    These were written as ISO file or as DD image.
    Exact same result every time.

With set 3. "GPT", "UEFI (non CSM)", "NTFS" rufus warned "you must disable secure boot". None of the other permutations said that. I disabled secure boot in UEFI firmware settings but it made no difference.

Help please?

20210415 adding text

I found hitting ESC when the load is in progress brings up a trace display. Reproduced below are the last lines displayed. The very last line "systemd-rfkill.service" is tantalizing, but probably just the name of the last service on a list. The penultimate line is also interesting "… Invalid ACP audio mode : 2". But again, likely benign from my point of view. I wonder about "Repeat this process for the rest of the CDs in your set", because I have no CDs and only the one set of files on the USB. Still I don't see the answer to my problem here. Do you?

passwd: password expiry information changed.
dbus-daemon[977]: [session uid=999 pid=977] Activating service name='org.gtk.vfs.Daemon' requested by ":1.0" (uid= blah)
dbus-daemon[977]: [session uid=999 pid=977] Successfully activated service 'org.gtk.vfs.Daemon'
dbus-daemon[977]: [session uid=999 pid=977] Activating service name='org.gtk.vfs.Metadata' requested by ":1.0" (uid= blah)
fuse: device not found, try 'modprobe fuse' first
dbus-daemon[977]: [session uid=999 pid=977] Successfully activated service 'org.gtk.vfs.Metadata'
A connection to the bus can't be made
Using CD-ROM mount point /cdrom/
Identifying… [((UID))]
Scanning disc for index files…
Found 2 package indexes, 0 source indexes, 0 translation indexes and 1 signatures
Found label 'Ubuntu 20.04.2.0 LTS Focal Fossa – Release amd64 (20210209.1)'
This disc is called:
((label))
Copying package lists…gpgv: Signature made Tue Feb 9 19:06:19 2021 UTC
gpgv: using RSA key ((number))
gpgv: Good signature from "Ubuntu CD Image Automatic Signing Key (2012) cdimage@ubuntu.com"
Reading Package Indexes… Done
Writing new source list
Source list entries for this disc are:
deb cdrom:[((label))]/ focal main restricted
Repeat this process for the rest of the CDs in your set.
-.mount
cdrom.mount
rofs.mount
dev-hugepages.mount
dev-mqueue.mount
sys-kernel-debug.mount
((list of services goes on, until…))
systemd-udevd.service
systemd-backlight@backlist:amdgpu_b10.service
[ 46.770037] snd_pci_acp3x 0000:05:00.5: Invalid ACP audio mode : 2
systemd-rfkill.service
((that was the last line))

Best Answer

I am very happy to report I have a solution. First, to get detailed trace logging info I edited Grub settings (using the 'e' option) and deleted "quiet" from the list of kernel parameters on the "linux" line.

quiet

The more verbose log had enough detail to point to what was happening. The boot was freezing after the log showed dmeventd detecting "LVM2 mirrors, snapshot etc." "Wait for Complete Device Initialization"

Turns out other people had basically the same problem with the same disk hardware as mine, which is 512GB WD SSD. They posted details last year. Short version ... (I am paraphrasing here) with the default Grub boot settings, the loader was not waiting long enough to get response from the disk. Then after a number of retries it stopped.

Solution was to edit Grub settings (again using the 'e' option) and add this new parameter to the kernel parameters list on the "linux" line:

nvme_core.default_ps_max_latency_us=5500

With this change, my liveUSB works nicely. Mind, the scope of my problem and this solution is limited to liveUSB "Try ubuntu" option. Of course I have to apply the fix each time I boot, which is not a big problem. I have not installed ubuntu on disk yet. When I do I will have to edit a file somewhere to make the solution permanent.

Acknowledging contributors on these two posts for the solution. Thank you so much!!

https://www.linux.org/threads/freeze-at-a-start-job-is-running-for-monitoring-of-lvm2-mirrors-snapshots-etc.31411/

https://community.wd.com/t/linux-support-for-wd-black-nvme-2018/225446/17

Related Question