Squashfs error - not possible to boot live usb

What have you tried: reboot but it will not boot

What is the error: squashfs error - failed to read block …

What device is this on: usb flash device SP MS60 256GB

I have kali usb with encrypted persistance many months and I used it without problem, update, upgrade, install, etc, in my new asus laptop, but yesterday while using Kali suddenly I lost taskbar and then desktop and then I got black screen.
when I tried to restart I got black screen with squashfs error not possible to read some block. so, I thought hard disk inside of flash usb is dead and I tried to plugin it in old laptop I have, when I used usb ubuntu 18, I could not come inside of broken usb kali, it is not possible to mount encrypted persistance, but when I started ubutnu 18 from hard disk in old laptop, I succeeded to come inside of encrypted usb kali and copy all important files to hdd of old laptop. so, I made backup of my files in the case usb kali can not be repaired and I must buy new one.

does anybody knows what should I do and what kind of error is squashfs?

I think when I installed live usb kali linux, it created squashfs and later persistance partition to be able to keep and update and change files. it means if squashfs is dead, I must reinstall live usb partition 4GB of usb kali and I don’t know if persistance partition 220GB will be deleted, gone, or I will save persistance partition with many files? in theory I could use ubuntu old laptop to use terminal and follow tutorial from kali how to install live usb kali, but I don’t know if it will delete my persistance partition 220GB?
I have 114GB files in this partition kali home-user folder but as I said, I made copy of it to my old laptop HDD. if I don’t repair usb flash device I will not loose my files 114GB.


update fsck from ubuntu terminal:
sudo e2fsck -b 32768 /dev/sdb1
e2fsck 1.44.1 (24-Mar-2018)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768

/dev/sdb1 contains a iso9660 file system labelled ‘Kali Live’

/dev/sdb3 contains a crypto_LUKS file system

have you tried repairing the USB flashdrive ??
on ubuntu, go to apps - type disks - select your flashdrive
click the gear icon and select both “check filesystem” & “repair filesystem” let both finish and retry booting your kali live usb flash drive.

1 Like

answer: kali live partition 1 can not be checked and repaired in gnome disks but I tried now persistance partition because it is possible to click check and repair but it was written I must reinstall e2fsck it is too old version. after installing 1.47 version, gnome disks told me partition 3 luks should be repaired but when I tried I got error code 1. when I tried from terminal, e2fsck gives error, it doesnt have command for crypt_luks.

I tried also to download kali iso and to re-image kali with DD command., partition 1 kali live, but when I tried it in laptop again the same thing - I lost desktop and I got black screen and squashfs error again.
it is 4:30 oclock in the morning, I will try again partition 3 luks persistance when I wake up,
this is command I used for partition 1:
sudo dd if=/home/dell/Desktop/kali-linux.iso of=/dev/sdb1 bs=4M status=progress conv=fdatasync

you might want to try a different flash drive just
to be on the safe side in case you have a defective / failing drive.

also read - A Squashfs error in Kali Linux often indicates an issue with the read-only compressed filesystem used during live boot or installation. This error can manifest in various ways, but common scenarios include failures to read data from the USB drive, errors during shutdown, or problems during installation.

Common Causes and Solutions:

A failing or corrupted USB drive is a frequent culprit. Try using a different USB drive, or verify the integrity of the download and the image writing process.

Ensure the ISO image is correctly written to the USB drive using a tool like Rufus. Verify the integrity of the downloaded image using checksums.

When booting from a live USB, timing can be critical. If the USB drive is removed too early or too late during shutdown, it can trigger Squashfs errors.

Sometimes, older or less compatible hardware can lead to Squashfs errors. Try updating your BIOS or using a different USB port (USB 2.0 instead of 3.0).

If you’re using a persistent storage partition on your USB drive, there might be issues with how it’s mounted or accessed during boot. If you are having persistent storage problems, try booting into the live session and running the installer again.

If you encounter a GRUB Rescue prompt after installation, it might be related to incorrect partition settings. You can try to fix it by determining the correct partition and setting the root using GRUB commands.

Troubleshooting Steps:

  1. Verify the USB Drive: Check the integrity of the USB drive and the written image.
  2. Try Different USB Ports: Switch between USB 2.0 and 3.0 ports.
  3. Recreate the Bootable USB: Rewrite the Kali Linux ISO image to a new USB drive.
  4. Check BIOS Settings: Ensure Secure Boot is disabled and try switching between UEFI and CSM modes.
  5. Run fsck: If you can boot into a live session, try running fsck on the relevant partitions to check for errors.
  6. Reinstall Kali Linux: If other solutions fail, reinstalling Kali Linux might be necessary.

@october262, thank you very much for detailed answer, it will be useful for the future when somebody get similar problem.
well, I concluded it is failed usb flash device, there was no problem at installation, I use this usb device many months and there was no problem, when i installed live and persistence I followed commands from kali tutorial and there was no problem. I tried also all usb ports on laptop, 2x usb 2.0 and 1x 3.0

This is for newbies who can get the same problem: solution is to make new linux baby, to buy new usb flash device, when you use usb device long time and it is written many times, it gets damaged and even if you reinstall/reimage Kali it can get problem again because it is already damaged. I ordered one usb device today for 35 euro, 1000MB/s reading speed and 900MB/s writing speed, kingston max 256GB. such usb cost more than 70 euro.

Here is what i tried before decision to make funeral for present SP MS 60 250GB usb flash kali linux:

So, first error before loosing desktop and getting black screen, I saw beside bluetooth icon:
/usr/share/kali-themes/xfce4-panel-genmon-vpnip.sh: input/output error
but it is not about one bad sh script, this shows that error is happening because of bad usb flash device.

Fixing the Black Screen
This is typically caused by graphics driver conflicts. During boot:
At the GRUB menu, select “Live system” and press e to edit boot parameters
In the linux line, add nouveau.modeset=0 before splash (for NVIDIA GPUs) or nomodeset (generic solution). For example:
… quiet nouveau.modeset=0 splash noeject …
Press Ctrl+X or F10 to boot
This disables problematic graphics drivers and should resolve the black screen.

re-image kali live usb partition /dev/sdb1 with old laptop ubuntu 18 (user dell), after Kali iso download…

sudo fdisk -l # or sudo lsblk -f
The first partition (sdb1) is iso9660 on USB, which is a read-only filesystem, so I cannot directly write to it. To replace the SquashFS file on that partition, I need to re-create the USB with the Kali ISO.
This command will overwrite only the first partition sdb1=ISO9660, leaving sdb2=FAT32 and sdb3=luks untouched.

sudo dd if=/home/dell/Desktop/kali-linux.iso of=/dev/sdb1 bs=4M status=progress conv=fdatasync

if you don’t have linux outside of usb flash, if you think you can do it in windows 11 for example, you will see that win11 can see only fat32 sdb2 boot partition, you will not see sdb2 ext4 and sdb3 luks encrypted partitions and you can not use rufus or balenaEtcher to recreate kali usb flash device = /dev/sdb1.

of course, after every try, I tried to reboot kali usb flash device and it failed… again I had problem with loosing dekstop…

checking second boot partition /dev/sdb2 fat32:

sudo lsblk -f
sudo fsck.vfat -n /dev/sdb2 # Check without repairing
if there is error, you can use repair command: sudo fsck.vfat -a /dev/sdb2
Then I tried to repair partition sdb3 (luks encrypted):

sudo fdisk -l
sudo cryptsetup luksOpen /dev/sdb3 my_usb2 # to open partition protected by password
sudo umount /dev/mapper/my_usb2 # e2fsck will not work with mounted partition
sudo e2fsck -b 32768 /dev/mapper/my_usb2

persistence was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
…persistence: ***** FILE SYSTEM WAS MODIFIED *****
persistence: 702812/14958592 files (1.1% non-contiguous), 41340202/59809838 blocks

sudo fdisk -l
sudo e2fsck -ycfv /dev/mapper/my_usb2 # this is very slow, 17% after 30 minutes
-y Assume “yes” to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
…checking for bad blocks (read only test)…
persistence: Updating bad block inode.
ext2fs_update_bb_inode: Ext2 file too big while updating bad block inode
persistence: ***** FILE SYSTEM WAS MODIFIED *****

rebooot aaand … after 2 minutes I lost desktop again and when i restarted laptop bios doesn’t see usb flash device any more, I tried 3 different usb ports but bios think this usb flash device should get funeral and new linux baby should be plugged in in usb port…

this error (Ext2 file too big while updating bad block inode) is saying that there are so many bad blocks that it can not be placed in ext4 partition or something like that, so, I had two choices: re-imaging whole usb again from zero with kali iso and risking that damaged usb fail again in the future or second choice: buy new usb device with enough storage and minimum 100MB/s writing speed. Kali must be updated every several weeks and if you have slow writing speed, you will wait 30 minutes to update Kali.

So, I made a choice, my laptop has one c-type usb port + USB port 3.0 with 10GB speed and I can buy new usb flash device and I found good one kingston 900MB/s writing speed 256GB…