Author Topic: The 'remastered' mkremaster script: more options, and some error checking too!  (Read 25699 times)

henrik

  • Guest
Re: My 'remastered' mkremaster script
« Reply #15 on: August 20, 2008, 08:04:34 PM »
Well, doing another copy/paste solved a lot! But as it gets to creating the remaster.iso file, it just stops.
Sorry for hijacking the thread with my silly problems. If you want me to go away, I will!

thanks for all the input above

[root@localhost henrik]# mkremaster2
+ TITLE='PCLOSLive remaster-on-the-fly'
+ '[' -f /usr/bin/kdialog ']'
+ DIALOG=kdialog
+ '[' 0 '!=' 0 ']'
+ '[' '!' -e /usr/bin/zenity ']'
+ '[' -d /union ']'
+ echo 'Running in installed mode...'
Running in installed mode...
+ ROOT=/
+ zenity --title 'PCLOSLive remaster-on-the-fly' --question --text 'You'\''re about to create a remaster livecd/harddrive.\n
* A compressed image of the running system will be created on a chosen partition.\n
* Requirements: min. 2 GB free space on the chosen partition.\n
* A Windows FAT filesystem can'\''t be used.'
/root/.gtkrc-2.0:56: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:57: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:58: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: Invalid symbolic color 'fg_color'
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: error: invalid identifier `fg_color', expected valid identifier
+ '[' 0 == 1 ']'
+ kdialog --title PCLOSLive remaster-on-the-fly --yesno 'Would you like to provide some advanced options?'
kbuildsycoca running...
+ '[' 1 == 0 ']'
+ '[' / == / ']'
++ df -h --exclude-type=vfat --exclude-type=ntfs
++ grep 'hd\|sd\|map'
++ zenity --list '--title=PCLOSLive remaster-on-the-fly' '--text=Select a partition for the temporary files.' --width=450 --height=200 --column=Partition
/root/.gtkrc-2.0:56: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:57: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:58: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: Invalid symbolic color 'fg_color'
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: error: invalid identifier `fg_color', expected valid identifier
+ TMPDEV='/dev/sda1             224G   72G  141G  34% /'
+ '[' 0 == 1 ']'
++ echo '/dev/sda1             224G   72G  141G  34% /'
++ cut -d% -f2
++ sed -e 's/^[ \t]*//'
+ TMPPART=/
+ '[' -d //tmp ']'
+ TMPDIR=//tmp
++ echo '//tmpmklivecd.*'
+ testmklivecd='//tmpmklivecd.*'
+ rm -rf '//tmpmklivecd.*'
++ zenity '--title=PCLOSLive remaster-on-the-fly' --file-selection --save --filename=//remaster.iso
/root/.gtkrc-2.0:56: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:57: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:58: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: Invalid symbolic color 'fg_color'
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: error: invalid identifier `fg_color', expected valid identifier
+ ISOFILE=/remaster.iso
+ '[' 0 == 1 ']'
+ '[' -e /initrd/loopfs/etc/rc.d/init.d/halt ']'
+ echo 'Running mklivecd to create the remaster...'
Running mklivecd to create the remaster...
+ '[' -e /usr/bin/konsole ']'
+ konsole -T 'Creating your personal remaster...' --nomenubar --notabbar -e mklivecd --root=/ --tmp=//tmp -- -- /remaster.iso
+ '[' -e /tmp/halt.bak ']'
+ '[' -f /remaster.iso ']'
+ zenity '--title=PCLOSLive remaster-on-the-fly' --error '--text=Something went wrong! :-(\nCheck your options and try again.'
/root/.gtkrc-2.0:56: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:57: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/root/.gtkrc-2.0:58: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: Invalid symbolic color 'fg_color'
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:42: error: invalid identifier `fg_color', expected valid identifier
+ exit 1

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: My 'remastered' mkremaster script
« Reply #16 on: August 21, 2008, 02:48:00 PM »
It looks like the script completed successfully, and called mklivecd using the following command / options:
Code: [Select]
mklivecd --root=/ --tmp=//tmp -- -- /remaster.iso
I'm not sure why (I'm on a windows machine at work, so I cannot test right now), but it looks like you have a double  forward slash at the beginning of the URL for your temp directory. Try running that command without the extra forward slash and see if it works:
Code: [Select]
mklivecd --root=/ --tmp=/tmp --/remaster.iso
..if this solves your problem, then the problem is with my script miswriting the mklivecd options; if not, you are having problems with mklivecd which is outside the realm of this script (there have been alot of problems with some newer versions of mklivecd in combination with squashfs and certain kernels...  I'm not really very knowledgeable about how to fix this, but have seen quite a few forum posts on the topic)
« Last Edit: August 21, 2008, 02:51:21 PM by travisn000 »

henrik

  • Guest
Re: My 'remastered' mkremaster script
« Reply #17 on: August 21, 2008, 06:16:50 PM »
mklivecd --root=/ --tmp=/tmp -- /remaster.iso worked,
so did
mklivecd --root=/ --tmp=//tmp -- /remaster.iso

Difference to the first one is the double "--"
Is that my mistake or is that the script?

thanks
Henrik

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: My 'remastered' mkremaster script
« Reply #18 on: August 21, 2008, 07:54:53 PM »
the double "--" should not effect anything (it is an empty option - I took it out of the second one just to clean it up); I was more concerned about the double "//" in your temp directory... 

Did you try the first command I posted (the output of the script, with the double "//" and "-- --")?
Code: [Select]
mklivecd --root=/ --tmp=//tmp -- -- /remaster.iso
...
For future reference, (if you have the problem again) you can always try using the mklivecd command with its generated options from this script.. look throught the last few lines of your most recently posted output and you will see the mklivecd command that is generated.  ;D  (..maybe an option to output that line to a text file before executing should be added!? )

Offline frazelle09

  • Hero Member
  • *****
  • Posts: 1476
  • Open my what?
    • Fundacion Anisa, A.C.
Re: My 'remastered' mkremaster script
« Reply #19 on: April 02, 2009, 10:51:06 PM »
Travis -- a couple of things.  First i can't access the page where the updated script is located. 

http://hack.mypclinuxos.com/index.php?action=dlattach;topic=949.0;attach=269

Secondly, is there any "Menu" way to exclude more directories and files?  i'm just trying to include as much of my /home/frazelle09 directory as possible, but i need to exclude things like Music, LindasArchives and Photos and the pclinux2009.1.iso which is on my Desktop.

Any BTW, wow!  thanks for trying to improve this script!

Have a great evening!  :)
"The earth is one country and mankind its citizens."
Baha'u'llah
"La tierra es un solo pais y la humanidad sus ciudadanos."


Offline Ɗα√ϵς§

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5524
  • PCLinuxOS: A revolution in personal computing
Re: My 'remastered' mkremaster script
« Reply #20 on: April 03, 2009, 05:32:34 AM »
I have /home on a separate partition.

If I am doing a remaster, I delete all user accounts (you don't have to delete the actual data) then use the control centre to unmount /home. This means that /home is now on the main partition. I create a "guest" user, and change the root password to "root". Now I do the remaster. Then I can restore the root password, remount the /home partition, and restore all the users. You should ensure that you force all users to have the same UID number as before. You can see what it was before you deleted them in the first place. UID numbers will be allocated from 501, it's easiest to just restore the users in order.
PCLinuxOS has no wealthy sponsors and can only survive with your donations! Don't wait it might be too late.

Running PCLOS on Athlon II/250 with 2Gb Ram using ASUS M2N68-AM Plus Mobo with Nvidia GF7600GT graphics, and Samsung NC10 Netbook

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: My 'remastered' mkremaster script
« Reply #21 on: April 03, 2009, 11:17:01 AM »
Travis -- a couple of things.  First i can't access the page where the updated script is located. 

..I've attached my current mkremaster2 script to the bottom of this post.. the old hack site is gone. 


Secondly, is there any "Menu" way to exclude more directories and files?  i'm just trying to include as much of my /home/frazelle09 directory as possible, but i need to exclude things like Music, LindasArchives and Photos and the pclinux2009.1.iso which is on my Desktop.

If you select the advanced mode when using the mkremaster2 script, there is a menu to exclude some common directories and files..

BUT.. ..if you decide to exclude a different set of directories or files than what is available in the prompts, make sure to click Cancel on the respective prompts and instead, create your own excludes lists when given the option to add additional custom mkliveCD options..  the key to this is that you CAN NOT use the both methods at the same time as I think one will overwrite the other!

The prompt boxes should give hints as to the options to use.. here is the relevant info from mklivecd --help (notice that full paths start with ^, each item is separated with a comma [,], and you may need to escape spaces with a forward slash[\].. not sure about that last one though):
Code: [Select]
.
   --nofile <ex1>[,][...]          Excludes files from the final image. (Also
                                   see the --nodir option for a full
                                   description)
   --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.


Any BTW, wow!  thanks for trying to improve this script!

Have a great evening!  :)

..I'm still working on it as inspiration strikes; if you have any suggestions for it, post them here!  (..on my short list is support for multiple kernels, and choosing compression type..  when time & priorities allow)
 ;D

[attachment deleted by admin]

Offline frazelle09

  • Hero Member
  • *****
  • Posts: 1476
  • Open my what?
    • Fundacion Anisa, A.C.
Re: My 'remastered' mkremaster script
« Reply #22 on: April 03, 2009, 03:43:41 PM »
Thanks, Travis!  i'll try out the new script as soon as i can. 

About the only suggestion i would have is some sort of indicator/counter to let the user know how large the final iso will be.

Have a great afternoon and thanks again for posting! :)
"The earth is one country and mankind its citizens."
Baha'u'llah
"La tierra es un solo pais y la humanidad sus ciudadanos."


Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: My 'remastered' mkremaster script
« Reply #23 on: June 21, 2009, 07:49:10 PM »
By request, the latest update (Feb 09) is attached to the first post..

The main new feature is that upon successful remaster, it will now offer to create a custom remaster script that saves all selected options.  ..no more selecting the same options over and over every time you make a new remaster!

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12519
Re: My 'remastered' mkremaster script
« Reply #24 on: June 22, 2009, 09:09:04 PM »
Adding to mklivecd-0.7.1-28 package.

Thanks to everyone who donates. You keep the servers running.

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: My 'remastered' mkremaster script
« Reply #25 on: June 22, 2009, 09:17:00 PM »
Yeeeeeee---Haaaaw!  Progress is progress.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: My 'remastered' mkremaster script
« Reply #26 on: July 17, 2009, 09:53:03 PM »
..added a newer version that should address most issues people have had; see change log on first post of this thread for details.
 ;D

mbmalone

  • Guest
Re: My 'remastered' mkremaster script
« Reply #27 on: July 17, 2009, 10:05:41 PM »
I can't get past Mounting loop image on /initrd/loopfs:  _
I'm sure your script is great, but do you think it will solve my dilemma?  ::)

It does the same from the command-line.
« Last Edit: July 17, 2009, 10:24:53 PM by mbmalone »

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: My 'remastered' mkremaster script
« Reply #28 on: July 18, 2009, 01:02:52 PM »
The script uses mklivecd to actually create the remaster.. 

If your problem is with getting the right options to pass to mklivecd, it will help.  I did see on your posts that at least some of your difficulties are attributable to this, but I cannot say for sure if all of them are.

If your problem is with mklivecd my script won't make a difference, as all it does is help you to get the correct mklivecd options.

mbmalone

  • Guest
Re: My 'remastered' mkremaster script
« Reply #29 on: July 18, 2009, 03:36:01 PM »
If I can get this thing working, I will definitely prefer to use your easier script. I have searched a lot and came across an option I had not seen before. Do you know about this option below?  If it's a good one, maybe you can add it to your script. Maybe it's already included by default or obsolete. All I know is my ISO is being created.

Also, I for the the moment believe the temporary directory that is required, must be named "tmp" and not "temp" even through you direct it to the right place. It must be called "tmp" regardless or mklivecd will not find or use it ??? That is what I am thinking, don't have much brain left at this point  ???

Anyway, I found it here:  http://www.fido-x.net/index.php?route=information/sitelinks&sitelinks_id=1

LiveCD Documentation

 * Remastering – Live Mode

--root=/union


The script uses mklivecd to actually create the remaster..  

If your problem is with getting the right options to pass to mklivecd, it will help.  I did see on your posts that at least some of your difficulties are attributable to this, but I cannot say for sure if all of them are.

If your problem is with mklivecd my script won't make a difference, as all it does is help you to get the correct mklivecd options.
« Last Edit: July 18, 2009, 03:39:32 PM by mbmalone »