Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum Linuxiarze.pl

Author Topic: SparkyLinux Custom ISO Builder  (Read 20870 times)

Offline way12go

  • Sr. Member
  • ****
  • Posts: 480
  • Karma: 0
  • Life is a unique pattern.
Re: SparkyLinux Custom ISO Builder
« Reply #15 on: November 29, 2014, 09:44:43 am »
I always wanted to use

1. Custom ISO maker

and

2. Backup current system into ISO ( Same effect I guess )

And I never tried 1 and when ever I tried 2 I had one recurring problem the ISO is large or it wouldn't boot from USB.

Any way I'm very happy with Sparkylinux install once and forget it, just dist-upgrade.

Time to time my fickle mind want to mess up with current install.

I shall never try something like that again and, that is, mess up with current system. I'm happy with Joe's Window Manager.
Life is a unique pattern.

Offline Chdslv

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
Re: SparkyLinux Custom ISO Builder
« Reply #16 on: November 29, 2014, 11:10:09 am »
I always wanted to use

1. Custom ISO maker

and

2. Backup current system into ISO ( Same effect I guess )

And I never tried 1 and when ever I tried 2 I had one recurring problem the ISO is large or it wouldn't boot from USB.

Well pal, the idea is to try, and try, and try...until you get a result, even if the result is a negative one, and somehow you find a way out. I'd like to know the experience of others, who had tried to remaster SparkyLinux or Debian.

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2165
  • Karma: 2
    • SparkyLinux
Re: SparkyLinux Custom ISO Builder
« Reply #17 on: November 29, 2014, 03:43:10 pm »
It looks like the process of creating squashfs stops itself.
Make a test, so we can try to detect a problem.
1. Use Buld_New option to unpack an iso image.
2. Make changes - upgrade, install new apps, etc.

Close the Custom ISO Builder and open a terminal emulator in your working directory (as root).
1. Create live dir:
Code: [Select]
mkdir -p /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live2. Copy initrd and vmlinuz:
Code: [Select]
cp /full-patch/WORKINGDIRECTORY/squashfs-root/boot/vmlinuz-VERSION /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live/vmlinuz
Code: [Select]
cp /full-patch/WORKINGDIRECTORY/squashfs-root/boot/initrd.img-VERSION /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live/initrd.img
3. Still being in your WORKINGDIRECTORY create the new squashfs:
Code: [Select]
mksquashfs /full-patch/WORKINGDIRECTORY/squashfs-root /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live/filesystem.squashfs -no-duplicates -no-recovery -comp xz -always-use-fragments -b 1MChange /full-patch/WORKINGDIRECTORY and VERSION number as you have.

Watch what is going on for any error message.
« Last Edit: November 29, 2014, 03:51:19 pm by pavroo »
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux at irc.freenode.net

Offline Chdslv

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
Re: SparkyLinux Custom ISO Builder
« Reply #18 on: November 30, 2014, 10:04:36 am »
Using
Code: [Select]
mksquashfs /full-patch/WORKINGDIRECTORY/squashfs-root /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live/filesystem.squashfs -no-duplicates -no-recovery -comp xz -always-use-fragments -b 1M building filesystem.squashfs stopped at 313MB, and with
Code: [Select]
mksquashfs /full-patch/WORKINGDIRECTORY/squashfs-root /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live/filesystem.squashfs -no-duplicates -no-recovery -comp xz -always-use-fragments filesystem.squashfs stopped at 817.2MB.

But, without the switch comp-xz, i.e,
Code: [Select]
mksquashfs /full-patch/WORKINGDIRECTORY/squashfs-root /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live/filesystem.squashfs -no-duplicates -no-recovery -always-use-fragments -b 1M building of the filesystem.squashfs was susccessful. Also, the processors were working at a lower rate.
Regards!

 
« Last Edit: November 30, 2014, 10:36:40 am by Chdslv »

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2165
  • Karma: 2
    • SparkyLinux
Re: SparkyLinux Custom ISO Builder
« Reply #19 on: November 30, 2014, 02:12:39 pm »
Now go to: /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT directory and build iso image:
Code: [Select]
xorriso -as mkisofs -rock -omit-version-number -disable-deep-relocation -joliet -allow-leading-dots -volid "ISO-NAME" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o "/full-patch/WORKINGDIRECTORY/custom-linux-version-1.iso" "/full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNTIf the iso is made go to: /full-patch/WORKINGDIRECTORY and run:
Code: [Select]
isohybrid -u custom-linux-version-1.isoCreate md5sum if needed:
Code: [Select]
md5sum custom-linux-version-1.iso > custom-linux-version-1.iso.md5Change:
- ISO-NAME
- custom-linux-version-1

If some options are useless for you, edit CONFIG file and remove what you don't need from the line:
Code: [Select]
SQUASHFSOPTSFULL="-no-recovery -comp xz -always-use-fragments -b 1M"
« Last Edit: November 30, 2014, 02:16:49 pm by pavroo »
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux at irc.freenode.net

Offline Chdslv

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
Re: SparkyLinux Custom ISO Builder
« Reply #20 on: November 30, 2014, 03:12:16 pm »
Thanks Paweł!
I did all that earlier. I posted about remastering an iso in a roundabout way. It was (and still is) a nice learning experience going through your work.
Kind regards!
 

Offline MoroS

  • Sr. Member
  • ****
  • Posts: 259
  • Karma: 0
  • Problem solver ;)
Re: SparkyLinux Custom ISO Builder
« Reply #21 on: December 01, 2014, 11:07:27 am »
...
But, without the switch comp-xz, [...] building of the filesystem.squashfs was susccessful. Also, the processors were working at a lower rate.
...

By ommiting the -comp parameter you switched from XZ compression to GZip compression, which is less resource intensive. That might really mean either overheating or RAM problems. Overheating won't be visible in log files. Memory failure might be visible (in /var/log/dmesg, /var/log/messages, /var/log/kernel if they still exist, because the SystemD transition made logging a bit more complicated :/ ). Memory issues should also occur when running a lot of things that will load up your memory, but you also might use memtest to check your memory, if you have some time to spare.

If you're into experiments you can try to monitor the temperature, CPU load and memory usage with a simple script that will write those values into 3 separate files. You can then post them so we can see what's happening:
Code: [Select]
#!/bin/bash
while true
do
    uptime >> $HOME/uptime.log
    free >> $HOME/memory.log
    sensors >> $HOME/sensors.log
    sleep 1;
done
This requires that you have lm_sensors installed (you probably have already, try executing the "sensors" command in the terminal). I was writing this script out of my head (don't have any Linux to test it at work :/ ), but it should work. Just launch the script in a separate terminal before building the SquashFS file. The files should be in your home directory.
There isn't a single thing that's impossible. Just the things that we don't yet know how to deal with. ;)

Offline Chdslv

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
Re: SparkyLinux Custom ISO Builder
« Reply #22 on: December 01, 2014, 04:59:19 pm »
MoroS,
Thank you for the script. You are right, the laptop is overheating. The log files are massive to be copied here. I am pasting the last lines.
The laptop powers off  in 10 minutes,
Code: [Select]
16:18:51 up 10 min,  3 users,  load average: 5.64, 3.52, 1.63
It doesn't appear to use swap.
Code: [Select]
             total       used       free     shared    buffers     cached
Mem:       2884688    2779960     104728      75744     152388    1744208
-/+ buffers/cache:     883364    2001324
Swap:      2654204          4    2654200

The temperature, when it powers off,
Code: [Select]
acpitz-virtual-0
Adapter: Virtual device
temp1:        +84.0°C  (crit = +86.0°C)
temp2:        +66.0°C  (crit = +85.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +84.0°C  (high = +80.0°C, crit = +90.0°C)
Core 2:       +87.0°C  (high = +80.0°C, crit = +90.0°C)


Can't buy a new laptop yet, so I might have to use Gzip, rather than XZ. Actually, there is a newer laptop at home, but neither SparkyLinux (any Debian) or Xubuntu connects to WiFi.   

Offline MoroS

  • Sr. Member
  • ****
  • Posts: 259
  • Karma: 0
  • Problem solver ;)
Re: SparkyLinux Custom ISO Builder
« Reply #23 on: December 01, 2014, 05:57:28 pm »
...the laptop is overheating...
Overheating is a common problem for laptops, especially when they're used near the maximum of their capabilities (most manufacturers today still treat them like typing machines and don't expect users to actually do power-usage). The thermal heatsink might also be clogged with dust, which causes higher than average temperatures (typically noticable after a year of hardware usage). On the other end there are also software solutions to prevent overheating on long and intensive tasks. One example would be CPUFreq, which manages the CPU scaling (governor and frequency). You might want to set a less demanding governor like "ondemand" or "powersave" prior to building the ISO (this keeps the frequencies low, thus giving lower temperatures, but at the cost of the whole process taking more time to complete).

The log files are massive...
I should've used a bigger (than 1 second) value for the sleep command. ;)

Can't buy a new laptop yet, so I might have to use Gzip, rather than XZ. Actually, there is a newer laptop at home, but neither SparkyLinux (any Debian) or Xubuntu connects to WiFi.
GZip should be fine most of the time (it should also be a bit faster when running the live image). As for the Wifi problems you might want to create a post about it on the forum and include your laptop model and the output of lspci and/or lsusb command (whether the former or latter contains information about your wifi model). Most of the problems are solvable by installing specific wifi driver-related packages.
There isn't a single thing that's impossible. Just the things that we don't yet know how to deal with. ;)

Offline Chdslv

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
Re: SparkyLinux Custom ISO Builder
« Reply #24 on: December 01, 2014, 06:56:54 pm »
Thanks for the tips. I'll try cpufreq ondemand next time. What would be the command to set it and reset it to normal after? I have cpufrequtils installed.

I tried Custom Iso Builder on Ubuntu 14.10 as the base to rebuild SparkyLinux. I let it go for more than 10 mins and checked the sensor log, and the temperature had gone about 67°C few times in that 10 mins, but fallen to around 45°C. Is it something to do with the Debian base? Anyway, if I can get the work done with Gzip, that's perfectly okay with me.
Regards!

Offline MoroS

  • Sr. Member
  • ****
  • Posts: 259
  • Karma: 0
  • Problem solver ;)
Re: SparkyLinux Custom ISO Builder
« Reply #25 on: December 01, 2014, 10:19:04 pm »
Thanks for the tips. I'll try cpufreq ondemand next time. What would be the command to set it and reset it to normal after? I have cpufrequtils installed.
You've got cpufreq-info to check which is currently used. Then use cpufreq-set to set it.

I tried Custom Iso Builder on Ubuntu 14.10 as the base to rebuild SparkyLinux. I let it go for more than 10 mins and checked the sensor log, and the temperature had gone about 67°C few times in that 10 mins, but fallen to around 45°C. Is it something to do with the Debian base? Anyway, if I can get the work done with Gzip, that's perfectly okay with me.
Regards!
I wonder. Maybe Ubuntu had the "ondemand" governor set by default. That would explain lower temperatures.
There isn't a single thing that's impossible. Just the things that we don't yet know how to deal with. ;)

Offline Chdslv

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
Re: SparkyLinux Custom ISO Builder
« Reply #26 on: December 01, 2014, 11:26:59 pm »
I set
Code: [Select]
cpufreq-set --governor ondemand on Sparky and set Iso-builder to build the squashfs and it kept on going past 20% while checking the sensors log. The temperature went above 83°C few times, but went on building. It was slow, though. Would the ondemand command be always there after reboot?

Offline MoroS

  • Sr. Member
  • ****
  • Posts: 259
  • Karma: 0
  • Problem solver ;)
Re: SparkyLinux Custom ISO Builder
« Reply #27 on: December 04, 2014, 05:26:20 pm »
I set
Code: [Select]
cpufreq-set --governor ondemand on Sparky and set Iso-builder to build the squashfs and it kept on going past 20% while checking the sensors log. The temperature went above 83°C few times, but went on building. It was slow, though. Would the ondemand command be always there after reboot?

Setting the governor via command line is only temporary. The settings reset with reboot. You can set it permanently via the /etc/default/cpufrequtils settings file.
There isn't a single thing that's impossible. Just the things that we don't yet know how to deal with. ;)

Offline tems

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: SparkyLinux Custom ISO Builder
« Reply #28 on: December 09, 2014, 04:17:19 am »
Hi team!

Congratulations for this spetacular  distro.
I have a project to create a fork to use in my religious community.
I wanted to work with the updated packages, but, when i use the ISO MASTER, in option building a new, and upgrade, when I run the last option it does not generate the iso.

Please, help.  I'm a still not as intermediate linux user. :(

Thanks, thanks!

Please, forgive me my poor English  :(
 

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2165
  • Karma: 2
    • SparkyLinux
Re: SparkyLinux Custom ISO Builder
« Reply #29 on: December 09, 2014, 12:25:04 pm »
Hi
Have you read the guides already?
It looks like you don't choose right directory - it's very important.
http://sparkylinux.org/custom-iso-builder-howto-part-2/
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux at irc.freenode.net