Author Topic: [Resolved - PC Problem] Mounting of Livecd.sqfs File  (Read 2671 times)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
[Resolved - PC Problem] Mounting of Livecd.sqfs File
« on: August 28, 2011, 10:20:54 AM »
First the question:

Is there a file size limitation or any other reason why a livecd.sqfs file, larger than ~4GB, fails to mount when PCLOS is being booted as a LiveUSB?

*********

Background:
                    The ISO container has a file size limitation of ~4GB for any file it contains. This thread is not concerned with that limitation, as far as I am aware.

mksquashfs command is capable, it seems, of producing a file up to a very large size (2^64). Of course the file cannot be included in an ISO if it exceeds the file size limit of ISO.

But, it can be used on a USB device of suitable size, in the same manner as described for manually creating a LiveUSB device.
The PCLinuxOS-liveUSB creator uses similar method to extract files present in an ISO and arranges the device as in the manual method.

So, there being no immediate limitation on livecd.sqfs file size, or on the media it is used on, I created several livecd.sqfs files of 5.6GB and 11.2GB each in size, and attempted to boot the system as a liveUSB device.

The OS boots, seeks and finds the .sqfs file ..........  but then fails to mount it.

Following is the Debug output as best I can recall it ......  my comments in Blue

Quote
DBG: Devices to check  ....    <======== Lists all partitions on the PC

DBG: I am after bootfrom. The loopmount is:

Searching for the loop image
               /dev/sr0              <========  No media present so no action
               /dev/sr1              <========  No media present so no action
               /dev/sr2              <========  No media present so no action
               /dev/sda1            <========  Finds first searchable media for loop image

DBG: mounted /dev/sda1     <========  Mounts media and searches for loop image

               /dev/sda2           <========  Fails to find loop image   on /dev/sda1 so moves to /dev/sda2

DBG: mounted /dev/sda2      <========  Mounts /dev/sda2 to search for loop image

                          [OK]         <========  Found loop image

Mounting loop image on /initrd/loopfs:

mount:  mounting /dev/loop0 on initrd/loopfs
Failed:  Invalid argument

          [DONE]

Error: Unable to mount loop filesystem

commands were:

losetup /dev/loop0 initrd/cdrom/livecd.sqfs

mount -r -t squashfs /dev/loop0 initrd/loopfs

Most likely cause is bad burn or bad download .....  <======= etc

Dropping you to a limited shell


The livecd.sqfs files were created by mylivecd. I choose to not have it delete the files and so was able to use them.
It failed of course to produce an ISO because of the file size limit of the ISO.

Nonetheless the isolinux directory and the livecd.sqfs file were available for use on the USB flash stick ......  a 16GB stick I often use for testing such as this.

To check if the .sqfs file was good, I loopmounted it in my installed PCLOS without any problems.
I even used the same commands used when booting to see if there was anything I could find there.
No problems mounting and accessing the content.

I think that about covers the relevant info, and leads back to the question ....

what might be causing the failure to mount the livecd.sqfs file?

***

Presently I am wondering if there is something else with a file size limit that I do not know about .....

regards

Note:  I may update this first post as required.
« Last Edit: August 31, 2011, 02:34:24 AM by Just19 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline hasmak

  • Full Member
  • ***
  • Posts: 53
Re: Mounting of Livecd.sqfs File
« Reply #1 on: August 29, 2011, 08:30:39 AM »
Just19
Hi
This is s wild and far fetched idea but it may have some merit
When you boot the .sqfs from your pclos installation, the system probably uses your swap partition or swap file, can you figure a way to create a swap partition or file for the USB boot to use?
Cheers
PCLOS 2011 LXDE

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
Re: Mounting of Livecd.sqfs File
« Reply #2 on: August 29, 2011, 10:21:09 AM »
Just19
Hi
This is s wild and far fetched idea but it may have some merit
When you boot the .sqfs from your pclos installation, the system probably uses your swap partition or swap file, can you figure a way to create a swap partition or file for the USB boot to use?
Cheers

It is not booted ......  it is mounted in the filesystem without error.
It fails to mount in the live environment. ;)
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Mounting of Livecd.sqfs File
« Reply #3 on: August 29, 2011, 07:23:44 PM »
Hi, this is a message error (mount: mounting /dev/loop0 on initrd/loopfs Failed: Invalid argument) that you can find on the web elsewhere in diverse circumstances. Have you tried to use the --gzip option of mylivecd, to make an iso (larger but) easier to "unfold" ?

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline hasmak

  • Full Member
  • ***
  • Posts: 53
Re: Mounting of Livecd.sqfs File
« Reply #4 on: August 29, 2011, 11:47:03 PM »

It is not booted ......  it is mounted in the filesystem without error.
It fails to mount in the live environment. ;)

Do you have the same kernel booting the USB as the installed System?
Also I think Melodie is right, try --gzip
As far as I can tell from looking around, this error occurs when it either looses the contact to the cd/dvd/USB drive, or can't read the medium, or the data on the medium is corrupted.
I think we can safely rule out option 1 as the media is found and option 3 as you can mount it in your installed system; this leaves option 2, the mounting failed because it can not read the media; this could be because there is a compression issue, or if the squashfs version used to make the file is different from the one reading it.
It seems that older kernels have a problem with the default MyLiveCd compression
You might also want to have a look at this
http://osdir.com/ml/linux.mandrake.livecd.user/2004-12/msg00028.html

Cheers
« Last Edit: August 30, 2011, 12:50:01 AM by hasmak »
PCLOS 2011 LXDE

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
Re: Mounting of Livecd.sqfs File
« Reply #5 on: August 30, 2011, 01:09:35 AM »
Hi, this is a message error (mount: mounting /dev/loop0 on initrd/loopfs Failed: Invalid argument) that you can find on the web elsewhere in diverse circumstances. Have you tried to use the --gzip option of mylivecd, to make an iso (larger but) easier to "unfold" ?




Yes, the gzip option was used to produce the files.

Quote
Do you have the same kernel booting the USB as the installed System?

Yes the squashfs file is a remaster of my installed OS.

Quote
the mounting failed because it can not read the media;

It can read it to find the loop image.
It can read it to boot smaller squashfs files.
The error says it is an invalid argument (in the command to mount) and not an error of failing to find the loop image.

The media is read; the .sqfs file is found on the media; the mount command is invoked; the mount command fails with error "invalid argument".

The only difference, known to me, between the successful mounting and the failed mounting, is the file size.

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
Re: Mounting of Livecd.sqfs File
« Reply #6 on: August 31, 2011, 02:33:54 AM »
Having been told this works on his machine, by AS, I fired up a different PC, with a P4 CPU, and booted from the USB stick that has been failing on my main machine ......

Success!

No problems !

Booted into the KDE desktop.

Runs a little slow on it but that is all I noticed so far ......  have only spect five minutes with it!


So it seems that my problem is the PC and not the OS or any part of it.

I have some more tests to run now that I know it is machine based.

Thanks for all the suggestions and interest taken in this.

Now I know that I can create a humungous file set and put them on a USB and run it live from there.

regards. :D

EDIT:
            Before I get beaten up for not testing on another PC  :D .....  this PC has an AMD CPU and is running the .a64 kernel, and is the only machine I have that uses that kernel.
    Seems the kernel works perfectly on my P4   ;D  ;D   .....  I thought using it there might introduce some extra problems and confuse things .....  appears not ....  and the only confused one was me ....
« Last Edit: August 31, 2011, 02:47:04 AM by Just19 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline hasmak

  • Full Member
  • ***
  • Posts: 53
Re: Mounting of Livecd.sqfs File
« Reply #7 on: August 31, 2011, 02:52:42 AM »
Having been told this works on his machine, by AS, I fired up a different PC, with a P4 CPU, and booted from the USB stick that has been failing on my main machine ......

Success!

No problems !


At Last  :D great work
Let us know how the testing goes
Cheers
PCLOS 2011 LXDE

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
Re: [Resolved - PC Problem] Mounting of Livecd.sqfs File
« Reply #8 on: August 31, 2011, 03:04:08 AM »
Brief summary ....

On line at boot.
Pidgin works ...  including Bonjour .... messaging across LAN
Kopete fine ....  video cam OK
Midori on line
Firefox fails ....  cannot write some Gnome accellator file or such ...  not too worried about that
User with LXDE desktop fires up very fast .....  everything tried works quickly
Desktop effects on KDE all OK

Seems no problems worth mentioning.

This .sqfs file is 5.6GB in size

regards
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: [Resolved - PC Problem] Mounting of Livecd.sqfs File
« Reply #9 on: August 31, 2011, 05:07:17 AM »
Brief summary ....

On line at boot.
Pidgin works ...  including Bonjour .... messaging across LAN
Kopete fine ....  video cam OK
Midori on line
Firefox fails ....  cannot write some Gnome accellator file or such ...  not too worried about that
User with LXDE desktop fires up very fast .....  everything tried works quickly
Desktop effects on KDE all OK

Seems no problems worth mentioning.

This .sqfs file is 5.6GB in size

regards

Hi,

Have you considered activating the zram kernel module, to gain ram capabilities ?

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: [Resolved - PC Problem] Mounting of Livecd.sqfs File
« Reply #10 on: August 31, 2011, 05:10:24 AM »
About the failing machine ... I would watch around kernel version / modules / filesystems related packages (mount, losetup, ...) ...
....intriguing issue,  :D

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
Re: [Resolved - PC Problem] Mounting of Livecd.sqfs File
« Reply #11 on: August 31, 2011, 06:30:59 AM »
Brief summary ....

On line at boot.
Pidgin works ...  including Bonjour .... messaging across LAN
Kopete fine ....  video cam OK
Midori on line
Firefox fails ....  cannot write some Gnome accellator file or such ...  not too worried about that
User with LXDE desktop fires up very fast .....  everything tried works quickly
Desktop effects on KDE all OK

Seems no problems worth mentioning.

This .sqfs file is 5.6GB in size

regards

Hi,

Have you considered activating the zram kernel module, to gain ram capabilities ?



Nope, never considered it ......  liveUSB is so fast I never felt the need.
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
Re: [Resolved - PC Problem] Mounting of Livecd.sqfs File
« Reply #12 on: August 31, 2011, 06:34:16 AM »
About the failing machine ... I would watch around kernel version / modules / filesystems related packages (mount, losetup, ...) ...
....intriguing issue,  :D

The real intriguing part is that the .sqfs file is created on the same machine on which it fails to mount when run live.

I might try a standard .bfs kernel when I get a chance to see if it makes any difference, although I doubt it.
Up to 4GB .sqfs files mount ok ....

So, yes, seems a little weird  :D

regards.
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: [Resolved - PC Problem] Mounting of Livecd.sqfs File
« Reply #13 on: August 31, 2011, 07:42:48 AM »
About the failing machine ... I would watch around kernel version / modules / filesystems related packages (mount, losetup, ...) ...
....intriguing issue,  :D

The real intriguing part is that the .sqfs file is created on the same machine on which it fails to mount when run live.

I might try a standard .bfs kernel when I get a chance to see if it makes any difference, although I doubt it.
Up to 4GB .sqfs files mount ok ....

So, yes, seems a little weird  :D

regards.

... even more intriguing is that the .sqfs file, actually can be manually mounted with success ...  :D

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10599
  • MLUs Forever!
Re: [Resolved - PC Problem] Mounting of Livecd.sqfs File
« Reply #14 on: August 31, 2011, 11:08:17 AM »
I am only using this AMD PC as my regular machine for a few months ...  maybe it is time to change  :D

I can do without such behaviour making a fool of me.  ;D
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT