Workaround: SQUASHFS errors while installing LMDE from USB
Posted: Fri Jun 08, 2012 12:31 pm
Last night, after a 12 hour tinkering marathon, I finally managed to install LMDE 201204 on my ThinkPad X220 (i5-2520M). Lacking a DVD-Drive (and with my 1GB USB stick being too small for the LMDE ISO) I decided to use one of my microSD cards in combination with a USB-Adapter. I used Ubuntu's ImageWriter to copy the ISO to the card and it took a few copies until the md5 consistency checks finally validated.
The problem:
Booting the live system worked perfectly. The installation went smooth - until the last few percent (some kernel module files were copied) where it suddenly halted. dmesg revealed the infamous SQASHFS errors:
Memtest86+ showed no RAM-issues. I even tried several different microSD Cards - all with no success. So I took a closer look at the installer (/usr/lib/live-installer/installer.py). What it basically does is create two mountpoints
To determine which files had not been copied yet, I diff'ed the two directories, which again led to many SQUASHFS errors. I unmounted /source/ and did a md5sum on filesystem.squashfs which promptly failed, although it had validated correctly right before the installation.
Conclusion:
Although /live/image/casper/filesystem.squashfs is mounted with the readonly option, the mounting and/or reading of the volume somehow modifies the file, which leads to a corrupted filesystem. Maybe this is a strange recursion- and/or permission-related bug in squashfs which occurs when a mounted filesystem.squashfs tries to mount itself again and thus somehow gains write access. Or my microSD-USB adapter is crap. Oh well...
The workaround:
After verifying that shows no errors, simply copy /live/image/casper/filesystem.squashfs to another medium. I put it into my already mounted /target/tmp/. Finally, you have to tell the installer where to find the filesystem.squashfs image by pointing LIVE_MEDIA_SOURCE in /etc/live-installer/install.conf to the new location. Here's my install.conf:
I'm glad I pulled through all the hassle. Everything feels so solid and responsive now. As a former Debian user it's quite like coming home.
Greetings from Bavaria
j-a
The problem:
Booting the live system worked perfectly. The installation went smooth - until the last few percent (some kernel module files were copied) where it suddenly halted. dmesg revealed the infamous SQASHFS errors:
Code: Select all
[ 779.679780] SQUASHFS error: xz_dec_run error, data probably corrupt
[ 779.679786] SQUASHFS error: squashfs_read_data failed to read block 0x255ca67
[ 779.679790] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679793] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679798] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679800] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679804] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679806] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679809] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679811] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679815] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679817] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679820] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679822] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679827] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679829] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679832] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679834] SQUASHFS error: Unable to read page, block 255ca67, size 712c
[ 779.679838] SQUASHFS error: Unable to read fragment cache entry [255ca67]
[ 779.679840] SQUASHFS error: Unable to read page, block 255ca67, size 712c
- /source/, where /live/image/casper/filesystem.squashfs ist mounted, and
- /target/, where the freshly formatted root partition of the new system is mounted
To determine which files had not been copied yet, I diff'ed the two directories, which again led to many SQUASHFS errors. I unmounted /source/ and did a md5sum on filesystem.squashfs which promptly failed, although it had validated correctly right before the installation.
Conclusion:
Although /live/image/casper/filesystem.squashfs is mounted with the readonly option, the mounting and/or reading of the volume somehow modifies the file, which leads to a corrupted filesystem. Maybe this is a strange recursion- and/or permission-related bug in squashfs which occurs when a mounted filesystem.squashfs tries to mount itself again and thus somehow gains write access. Or my microSD-USB adapter is crap. Oh well...
The workaround:
After verifying that
Code: Select all
cd /live/image/ && md5sum --check md5sum.txt;
Code: Select all
# Defines the distribution name and version..
[distribution]
DISTRIBUTION_NAME=Linux Mint Debian Edition
DISTRIBUTION_VERSION=1.0
# Installation specific paths etc.
[install]
#LIVE_MEDIA_SOURCE = /live/image/casper/filesystem.squashfs
LIVE_MEDIA_SOURCE = /target/tmp/filesystem.squashfs
LIVE_MEDIA_TYPE = squashfs
LIVE_USER_NAME = mint
Greetings from Bavaria
j-a