I've added some context here. This should makes things easier to follow.
"Initrd unpack failure.."
For a while now, when booting a Mint machine, I've noticed a fleeting "Initrd unpack failure.." error message when booting. I initially thought little of it.
Early last year I revamped my network media server with a newer, more powerful motherboard. When testing the hardware, I found that the USB controllers would freeze when copying large files from an external USB drive. Investigations lead to editing the system's '/etc/initramfs-tools/initramfs.conf' and changing the 'COMPRESS' setting from 'lz4' to 'gzip' and regenerating the 'initrd'. This fixed the "Initrd unpack failure.." error message and the USB controller problem.
I now make this change on every Mint machine that I see.
Live flashdrive lockup:
I've recently tried to assist someone on a thread here who could not install Mint onto a new USB 3 based laptop. The Mint live flash drive wouldn't boot.
When testing other machines here, I found a laptop that would lock up when attempting to boot from a Cinnamon live flashdrive.
Initial experiments involved extracting the Iso 'initrd' and recompressing with 'gzip'. This gave a "fix".. but I wasn't totally happy with it as this meant removing some early load Intel & AMD microcode. I then looked more closely at the flashdrive boot and modified it to work on a bootable fat32 partition that is placed onto a flashdrive.
What should have been a simple file & directory copy procedure turned into something else.. as problems were found that seem to involve some sort of interaction between some flashdrive controller firmwares and a simple copy process onto a non-standard flashdrive partition. A working Iso extraction & copy process was evolved that allowed the creation of a bootable flashdrive. The laptop now boots successfully from this flashdrive.
As a result of work undertaken in viewtopic.php?f=46&t=347457&e=1&view=unread#unread
Here is a workaround for those machines that 'lockup' when trying to boot a stock Mint Live flashdrive.
This bug only seems to affect a small number of machines with specific Bios firmware.
It seems a good idea to post this here.. as it might be useful to others.
This involves manually extracting the Mint Iso and placing the contents directly onto a fat32 formatted flashdrive.
This has the advantage in that the flashdrive is now writable.
** Post 41 extract: **.
In my recent downtime, I've been looking at how the Iso's initialise everything. To cut a "long story short" I've found a workaround that allows the stock 'initrd.lz' to be used. I found this just after I'd nearly finished regenerating the Iso 'initrd.img' files **properly**.
I've decided to stay "stock", as far as possible, as some folk might be concerned about the otherwise missing Intel & AMD microcode.
You have to use a slightly modified 'grub.cfg' and copy the Iso contents to the flashdrive in a specific way. The use of GUI tools **can** break things.. so don't waste your time.
If anyone doubts this, then I invite them to try..
I've even had problems when using basic CLI commands. In a couple of cases, after copying across, 'gparted' showed the fat32 partition as a RO ISO9660 one!
The following method works with all of the Mint 20.1 Iso's and with the various makes of flashdrive that I've tried.
Please follow these instructions **exactly**..
When the flashdrive has booted, I would recommend that you use 'gparted' to create your partitions. When installing, choose "something else" at the disks section.
On reboot, after the installation has finished, edit '/etc/initramfs-tools/initramfs.conf'
Change the entry 'COMPRESS=lz4' to 'COMPRESS=gzip' and save the file.
Now update the system.. This will install a newer kernel which will create new 'initrd.img' files for any existing and subsequent kernels. These will use 'gzip' for the 'initrd' compression.
Create a text file containing the following:
Code: Select all
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Start Linux Mint 20.1 64-bit" --class linuxmint {
set gfxpayload=keep
linux /casper/vmlinuz file=/usb/preseed/linuxmint.seed boot=casper iso-scan/filename=${iso_path} quiet splash --
initrd /casper/initrd.lz
}
menuentry "Start Linux Mint 20.1 64-bit (compatibility mode)" {
linux /casper/vmlinuz file=/usb/preseed/linuxmint.seed boot=casper iso-scan/filename=${iso_path} noapic noacpi nosplash irqpoll nomodeset --
initrd /casper/initrd.lz
}
menuentry "OEM install (for manufacturers)" {
set gfxpayload=keep
linux /casper/vmlinuz file=/usb/preseed/linuxmint.seed oem-config/enable=true only-ubiquity boot=casper iso-scan/filename=${iso_path} quiet splash --
initrd /casper/initrd.lz
}
menuentry "Check the integrity of the medium" {
linux /casper/vmlinuz boot=casper integrity-check iso-scan/filename=${iso_path} quiet splash --
initrd /casper/initrd.lz
}
Insert your flashdrive.
Using gparted. Select your flashdrive. ***Make a note of how your device is identified.***
I'll use 'sdc' here.
'Device', 'Create Partition Table..'. Select 'msdos'.
Create a fat32 partition (edit. Use the full capacity here.). Now set the 'boot' and 'esp' flags.
Quit 'gparted'.
Open a terminal
Code: Select all
sudo su
mount /dev/sdc1 /mnt {mount the flashdrive partition to '/mnt'}
mc {run Midnight Commander}.
Just press 'Skip' (or 'Skip All'). Fat32 does not support file or directory ownership.
LHS - 'Tab' to the left hand pane.
RHS - 'Tab' to the right hand pane.
LHS. Browse to the Iso. Press 'Enter' twice to mount it.
RHS. Browse to '/mnt'.
LHS. Cursor down to the first directory.
Press 'F5' to copy the directory. Cursor down and repeat with each directory and remaining files.
Open another terminal.
Code: Select all
sync
From the first terminal:
LHS Browse to the location of your new 'grub.cfg'.
RHS Browse to '/mnt/boot/grub'. Press 'Enter' to access the directory.
LHS With your 'grub.cfg' selected, press 'F5' to copy & overwrite the existing file.
Quit 'Midnight Commander'
Code: Select all
umount /mnt
With the single laptop here that won't boot with the stock Cinnamon Iso, I've found some file corruption occurs within the Initrd ramdisk during the kernel first stage load. This is not totally consistent.. I'm **guessing** that there is some sort of bad UEFI firmware interaction that is causing memory corruption until the kernel has fully taken control.
This does not occur if I use a newer kernel (the Iso uses 5.4.0-58).
The use of a fat32 partition on a **flashdrive** causes the kernel to use a slightly different memory map (The 'grub.cfg' passes a 'USB' stanza to the kernel here, not a 'CD' one.. which still works with an HDD device.).
I've looked at other machines that have mostly similar hardware.. These don't exhibit any early memory corruption at all. Ummm..
I've reported the problem.. It is being looked at. The original Ubuntu 20.04 Iso (I don't mean the .1 or .2 release) does not exhibit this problem.
Bodge99