Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 136561

Summary: gnap_remaster produces broken cores
Product: Gentoo Hosted Projects Reporter: Rob Judd <canska>
Component: GNAPAssignee: Gentoo Network Appliance Bugs <gnap>
Status: RESOLVED OBSOLETE    
Severity: minor CC: canska, dcasimiro
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Rob Judd 2006-06-12 11:14:52 UTC
I've had the same result on two separate build machines, both fully up to date.

gnap_remaster and gnap_overlay both run without any errors, but the resulting gnap system fails during boot, as follows:

>> Activating udev
>> Making tmpfs for /newroot
>> Attempting to mount CD:- /dev/hda1
>> CD medium found on /dev/hda1
>> Determining root device...
>> Determining looptype ...
>> Copying loop file for caching...
>> Mounting squashfs filesystem
mount: Mounting /newroot/mnt/image.sfs on /newroot/mnt/livecd failed: Invalid argument
>> Copying read-write image contents to tmpfs
cp: etc: No such file or directory
cp: root: No such file or directory
cp: home: No such file or directory
cp: var: No such file or directory
>> No cdupdate.sh script found, skipping...
>> Booting (initramfs)......
chrootKernel panic - not syncing: Attempted to kill init!
: cannot execute  /bin/sh: No such file or directory

Clearly, the failure begins with the squashfs failing to mount.

Reproducing the problem should be trivial. I followed the Gnap user guide exactly, http://www.gentoo.org/proj/en/base/embedded/gnap-userguide.xml.

Create "myoverlay" directory with etc/overlay.conf and other basic files
gnap_overlay -d /dev/sda1 -r hda1 -o myoverlay/ -m -s 38400
Boot the CF card, system boots OK.

gnap_remaster -e boa -o mynewcore.tar
gnap_overlay -d /dev/sda1 -r hda1 -o myoverlay -m -g mynewcore.tar -s 38400
Boot the CF card, system hangs with kernel panic after squashfs fails to mount as shown above.
Comment 1 Rob Judd 2006-06-12 12:11:56 UTC
I think this may be related to squashfs-tools on the build machine. 

I downgraded from sys-fs/squashfs-tools-3.0 to sys-fs/squashfs-tools-2.2_p2 and ran gnap_remaster again, then gnap_overlay'd to my CF card and it booted perfectly. 

It appears that gnap is presently incompatible with squashfs-tools-3.0.
Comment 2 Thierry Carrez (RETIRED) gentoo-dev 2006-06-12 13:38:53 UTC
Reopening because I should at least block on incompatble squashfs-tools (or find a way to support both).
Comment 3 Dan Casimiro 2006-07-23 08:50:54 UTC
The root cause of this problem is the kernel version.  squashfs-3.0 requires a 2.6.16 based kernel.  See bug #126992 for more details.

I was able to boot my generated images by substituting the standard gnap kernel with  sys-kernel/hardened-sources-2.6.16-r10.  I did not revert back to the 2.2 based squashfs.
Comment 4 Thierry Carrez (RETIRED) gentoo-dev 2006-07-23 09:43:53 UTC
Thx for the analysis. So this should be autofixed when I release a version with updated portage.
Comment 5 Dan Casimiro 2006-07-30 07:09:50 UTC
(In reply to comment #4)
> Thx for the analysis. So this should be autofixed when I release a version with
> updated portage.
> 

That should fix it if you use the newer kernel.
Comment 6 Richard Scott 2006-09-27 05:00:09 UTC
I'm using a 2.6.16-hardened-r11 kernel and its all ok :-)
Comment 7 Jeremy Fall 2007-06-05 20:28:15 UTC
(In reply to comment #6)
> I'm using a 2.6.16-hardened-r11 kernel and its all ok :-)

I'm having the exact same problem running 2.6.20-hardened-r2.  (Cannot mount the squashfs on LiveCD boot)  I'm running squashfs-tools 3.1_p2, GNAP 2.0.

In addition, it wouldn't work with 2.6.16-hardened-r11.  (Same squashfs-tools version)
Comment 8 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2007-06-06 19:58:57 UTC
Working fine here with hardened-sources-2.6.20
Comment 9 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-20 23:08:55 UTC
The GNAP project has been discontinued, its removal was acknowledged by steev.

If you need to, you can contact the Gentoo Embedded project; more information about the Gentoo Embedded project can be found on the following link:

http://www.gentoo.org/proj/en/base/embedded/

This removal happens as part of project cleanup by the Gentoo Council's members.