You are not logged in.
Hello forum,
I have been following the guide on the Arch Wiki for setting up Arch Linux on a USB key.
However, when I come to boot a machine from the USB key, I get the following error:
initramfs unpacking failed: uncompression error
Failed to execute /init (error -2)
Kernel panic - not syncing: No working init found.
I have tried boot from an install disc, mounting the USB key, chroot into the key and running the classic mkinitcpio -p linux
Any suggestions would be gratefully received.
Kind Regards,
Harold Clements
Last edited by haroldjclements (2015-01-30 12:48:11)
Offline
What is the content of your /etc/mkinitcpio.conf?
Did you add the "block" hook right after the "udev" hook?
(I should note, however, that I'm typing this from an Arch installation on a USB stick and I didn't bother doing that...)
Jin, Jîyan, Azadî
Offline
Thank you for reply, my mkinitcpio.conf is as follows. As you can see the block hook right after the udev hook. This is the standard config (with all the comments removed) that is generated when creating the file-system. However, if you see anything that is a miss, please let me know...
MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev block autodetect modconf filesystems keyboard fsck"
Kind Regards,
Harold Clements
Offline
It looks the same as mine.
You could try using:
COMPRESSION="cat"
To create an uncompressed image, but I can't see why gzip compression would be a problem (I think the kernel image uses that as well).
EDIT: Which boot loader/manager are you using and what is the content of the relevant configuration file?
Last edited by Head_on_a_Stick (2015-01-30 21:13:59)
Jin, Jîyan, Azadî
Offline
Once again, thank you for helping me with this issue.
I tried adding compression="cat"; when I ran mkinticpio -p linux, one of the messages confirmed that it was creating an uncompressed ramdisk (if that is what it is called?). Unfortunately, it has not helped much. I now have the following error:
initramfs unpacking failed: junk in compression archive
To answer your second question; I am using grub2 and my config is as follows (sorry for the long config, I don't know grub2 that well) :
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d
else
search --no-floppy --fs-uuid --set=root d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod exfat
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 6783-1927
else
search --no-floppy --fs-uuid --set=root 6783-1927
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod exfat
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 6783-1927
else
search --no-floppy --fs-uuid --set=root 6783-1927
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod exfat
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 6783-1927
else
search --no-floppy --fs-uuid --set=root 6783-1927
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=d0165b1a-f4f9-45bb-97cc-28a2c0ef1b5d rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-fallback.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
Again, thanking you very much for your time.
Harold Clements
Offline
Is the USB stick old?
What type of stick is it?
What is the output of:
lsblk -f
Jin, Jîyan, Azadî
Offline
Thank you again for your time.
I have sorted it. I think my problem was that (or some unknown reason) I made the boot partition exfat. I just recreated the partitions as ext4 and hay presto, it's all working.
Thanking you once more...
Harold Clements
Offline