Author Topic: <SOLVED it's not a bug> Is this a mylivecd bug ?  (Read 2280 times)

Offline smileeb

  • Hero Member
  • *****
  • Posts: 2235
    • smileesplace
Re: Is this a mylivecd bug ?
« Reply #15 on: September 18, 2011, 10:39:23 AM »
When you find a successful command, could you please post it.
I would like to try it on my computer.

I get this error    Argument "" isn't numeric in division (/) at /usr/sbin/mylivecd line 278.     
                       [  0.00% 00:00:00/00:00:00]Error - Unable to open file
smilees.iso

Illegal division by zero at /usr/sbin/mylivecd line 296.

df gives me this    df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             144G   18G  119G  13% /

uname gives me this       2.6.38.8-pclos1.bfs


Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Is this a mylivecd bug ?
« Reply #16 on: September 18, 2011, 10:44:55 AM »
When you find a successful command, could you please post it.
I would like to try it on my computer.

I get this error    Argument "" isn't numeric in division (/) at /usr/sbin/mylivecd line 278.     
                       [  0.00% 00:00:00/00:00:00]Error - Unable to open file
smilees.iso

Illegal division by zero at /usr/sbin/mylivecd line 296.

df gives me this    df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             144G   18G  119G  13% /

uname gives me this       2.6.38.8-pclos1.bfs

Your issue is quite common and known, because your target iso.image most likely exceed the maximum size of 4 GB,
very probably you should solve your issue using:

Quote
mylivecd --nodir ^/home/ some-name.iso

... and later backup your /home separately.

AS

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Is this a mylivecd bug ?
« Reply #17 on: September 18, 2011, 01:53:25 PM »
UPDATE:

there was two filesystem that needed to be excluded from backup: /u and /vbox,
rerun the command:
Quote
mylivecd --gzip --verbose --noclean --nodir ^/u/ --nodir ^/vbox/ /tmp/as.iso

at 78.94% the process apparently stopped progressing ... the percentage remain at 78.94%, the /tmp/mylivecd.NNNN/livecd/livecd.sqfs continue to grow over the expected size (should have been ~ 4000 MByte) it's already a 4.5 GB
looking at process, particularly mksquashfs PID = 21736 and lsof | grep 21736:
Quote
.....
mksquashf 21736 21743       root  mem       REG        8,5      117727     524979 /lib/i686/libpthread-2.13.so
mksquashf 21736 21743       root  mem       REG        8,5       75636     525092 /lib/libz.so.1.2.3
mksquashf 21736 21743       root  mem       REG        8,5      197760     525223 /lib/liblzma.so.5.0.3
mksquashf 21736 21743       root    0u      CHR      136,1         0t0          4 /dev/pts/1
mksquashf 21736 21743       root    1w     FIFO        0,8         0t0    1467272 pipe
mksquashf 21736 21743       root    2w     FIFO        0,8         0t0    1467272 pipe
mksquashf 21736 21743       root    3u      REG        8,6  4756054635     179317 /tmp/mylivecd.21505/livecd/livecd.sqfs
mksquashf 21736 21743       root    4r      REG       8,10 11139112960         20 /vbox/KDE-LIGHT.vdi

isn't that mksquafs is trying to include /vbox/KDE-LIGHT.vdi (which is a 11 GB virtual disk) into the livecd.sqfs ?


BTW, I tried also, with similar results:
Quote
mylivecd --gzip --nodir ^/u/ --nodir ^/vbox/ /tmp/as.iso
mylivecd --gzip  --nodir ^/vbox/ --nodir ^/u/ /tmp/as.iso
mylivecd --gzip  --nodir ^/u/,^/vbox/ /tmp/as.iso

Differently from what initially suspected the issue seems more related to big files (all files in /vbox are big) instead of the large amount of files in /u ...

grep vbox /tmp/mylivecd.NNNN/exclude.list:
Quote
# grep vbox /tmp/mylivecd.21505/excludes.list
/vbox/lost+found
#

shouldn't that /vbox/KDE_LIGHT.vdi and all other image files should have been in exclude.list ?

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10612
  • MLUs Forever!
Re: Is this a mylivecd bug ?
« Reply #18 on: September 18, 2011, 02:49:33 PM »
AS,
        Is the problem possibly caused by using more than one "--nodir" option in the command line.

Have you tried using the command option once and separating the directories with a comma?

--nodir ^/u/,^/vbox/

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 pinoc

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2837
    • other projects...
Re: Is this a mylivecd bug ?
« Reply #19 on: September 18, 2011, 02:58:00 PM »
AS,
        Is the problem possibly caused by using more than one "--nodir" option in the command line.

Have you tried using the command option once and separating the directories with a comma?

--nodir ^/u/,^/vbox/

regards

yes, I second that. Run mylivecd --help and check the description of --nodir as well as the example given at the end. That should get you going.
regards,
-p.

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Is this a mylivecd bug ?
« Reply #20 on: September 18, 2011, 03:01:05 PM »
AS,
        Is the problem possibly caused by using more than one "--nodir" option in the command line.

Have you tried using the command option once and separating the directories with a comma?

--nodir ^/u/,^/vbox/

regards

yes, as reported under "BTW" in previous post, still unsuccessful  ;)

I'm thinking that anyway any file larger than 4GB should be excluded because can't fit in an ISO image (ISO specs doesn't allow file larger than 4 GB ...  apparently they are tentatively included in livecd.sqfs ... even if explicitly excluded with --nodir ...
I will try to replicate this behavior in a different filesystem (root partition + one partition with a 5 Gb file)

AS

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Is this a mylivecd bug ?
« Reply #21 on: September 18, 2011, 03:29:33 PM »
Issue replicated using a different filesystem:
Quote
# mylivecd --gzip --verbose --noclean --nodir ^/b9/ /tmp/as.iso
mylivecd, version 0.9.4, http://pclinuxos.com/
Copyright (C) 2010, Texstar <texstar at gmail.com>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

WARNING: The temporary directory '/tmp/mylivecd.6399' will not be removed at exit, please do so manually
Disabling Services not needed on the LiveCD

running: /sbin/chkconfig --list
running: /sbin/chkconfig --list
running: /sbin/chkconfig --list
running: /sbin/chkconfig --list
running: /sbin/chkconfig --list


Creating initrd:                                   [100.00% 00:00:05/00:00:05]
Setting filesystem parameters:                     [100.00% 00:00:15/00:00:25]
Creating compressed image:                         [  0.00% 00:00:00/00:00:00]
[                                                                            ]


process is locked from 2/3 minutes ago ...

Quote
....
mksquashf  6626  6633       root  mem       REG        8,5      75636     525092 /lib/libz.so.1.2.3
mksquashf  6626  6633       root  mem       REG        8,5     197760     525223 /lib/liblzma.so.5.0.3
mksquashf  6626  6633       root    0u      CHR      136,1        0t0          4 /dev/pts/1
mksquashf  6626  6633       root    1w     FIFO        0,8        0t0    1677606 pipe
mksquashf  6626  6633       root    2w     FIFO        0,8        0t0    1677606 pipe
mksquashf  6626  6633       root    3u      REG        8,6  230499708      90132 /tmp/mylivecd.6399/livecd/livecd.sqfs
mksquashf  6626  6633       root    4r      REG       8,25 4973519872         12 /b9/opensuse10.3.vdi


ls -l /b9
Quote
# ls -l /b9
total 4856976
drwx------ 2 root root      16384 Aug  8 22:35 lost+found/
-rw------- 1 root root 4973519872 Sep 18 23:23 opensuse10.3.vdi


grep "/b9" /tmp/mylivecd.NNNN/excludes.list
Quote
# grep "/b9" /tmp/mylivecd.6399/excludes.list
/b9/lost+found
#



EDIT: the process completed with the usual error because of size > 4 GB:
Quote
ls: cannot access /tmp/as.iso: No such file or directory
Argument "" isn't numeric in division (/) at /usr/sbin/mylivecd line 244.

Created '/tmp/as.iso' (0,000 bytes) in 00:22:50


but because of --noclean options the files are still there, we can look into:

Quote
# mount /tmp/mylivecd.6399/livecd/livecd.sqfs /mnt
mount: warning: /mnt seems to be mounted read-only.
# ls -l /mnt/b9/
total 4856953
-rw------- 1 root root 4973519872 Sep 18 23:23 opensuse10.3.vdi
#


see ? It was included.
« Last Edit: September 18, 2011, 03:53:04 PM by as »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Is this a mylivecd bug ?
« Reply #22 on: September 18, 2011, 04:13:47 PM »
As,
.vdi files are stored in a hidden directory in your /home. Exclude that directory.     

Smileeb,
Your problem:
Quote
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             144G   18G  119G  13% /
     

Even at highest compression, 18GB can not be shrunk to 4GB, the size limit for a liveDVD.     

Just18,
A partition is not a directory, so --nodir is not an option to use. Unmounting is the correct way to go.     

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Is this a mylivecd bug ?
« Reply #23 on: September 18, 2011, 04:32:23 PM »
As,
.vdi files are stored in a hidden directory in your /home. Exclude that directory.    

in my case .vdi files are stored in a different partition i.e. /vbox

Quote

Just18,
A partition is not a directory, so --nodir is not an option to use. Unmounting is the correct way to go.    

Disagree here. A partition is the container for a filesystem, the filesystem in turn is mounted on a mountpoint which is a directory, btw mylivecd has no knowledge about partitions at all, it see only a filesystem whether this is a composed starting from a single or from multiple partitions.

Therefore the issue described here doesn't depend from the fact that there is a underlying filesystem, the same would happen if /vbox or /b9 in my latest example would be directories under '/' filesystem.
« Last Edit: September 18, 2011, 04:39:21 PM by as »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Is this a mylivecd bug ?
« Reply #24 on: September 18, 2011, 04:37:22 PM »
Exactly! That is why partitions should be unmounted.     

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10612
  • MLUs Forever!
Re: Is this a mylivecd bug ?
« Reply #25 on: September 18, 2011, 04:44:32 PM »
Exactly! That is why partitions should be unmounted.    

I have in the past, without error, left a partition mounted and excluded everything in it.

This is sometimes necessary due to a lack of space for the working files on a root partition that is near full.

It has been common practice for me .....  in fact I have not remastered in the last three or four years that I recall, without doing this.

edit
        found the reason for my 'weird' behaviour so rest deleted

« Last Edit: September 18, 2011, 04:49:39 PM by Just18 »
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: Is this a mylivecd bug ?
« Reply #26 on: September 18, 2011, 05:08:25 PM »
Exactly! That is why partitions should be unmounted.    

I think there is a misunderstanding:
I have posted at beginning that I successfully made a livecd.iso unmounting filesystems, that's clear, nothing to discuss, therefore I was wondering if using --nodir option was or not equivalent to unmounting the filesystem(s). Theoretically should be, in my view at least.

Later, going deeper into the details, it appears that some big files are not excluded as supposed.

Additionally, if I copy my 5 Gb file under a directory say /test inside the '/' filesystem, and then I try the following command:
Quote
mylivecd --gzip --nodir ^/test/ /tmp/as.iso

the above command will fail, even if the "--nodir ^/test/" option was used, because it's trying to include the 5 Gb file.

Now, I'have taken a look mylivecd and have discovered that the error is in the trailing slash following the directory name inside the option: "--nodir /vbox/".

if instead of the above command, I specify the following, without the trailing slash:
Quote
mylivecd --gzip --nodir ^/test /tmp/as.iso

the directory /test and it's content is correctly excluded from the live image.
The reason is that mylivecd perform a test about the option arguments, searching for a directory ( find /dir -type d ):
/test result of type directory
instead:
/test/ will not result as type directory

Now, why I've used the trainling slash ? because I have a partition name /u and when I was using:
mylivecd --gzip --nodir ^/u /tmp/as.iso
what happens was that also all files in /usr were been excluded; the program (mylivecd) search for a pattern where the filename begin with /u ...

and yes this is stated in mylivecd help page:

Quote
  --nodir <ex1>[,][...]           Excludes directories from the final image.
                                   Patterns passed to this option (as with the
                                   --nofile option) should be valid in a grep(1)
                                   search, e.g. --nodir=^/home/jaco,^/root/.mcop
                                   will exclude both the /home/jaco and
                                   /root/.mcop directories from the final
                                   LiveCD.

because of this help page, mylivecd behave as described in documentation, therefore it's not a bug.
I'm going to mark the thread as SOLVED.

Thank you.

AS
« Last Edit: September 18, 2011, 05:14:18 PM by as »