Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

SparkyLinux Custom ISO Builder

Started by way12go, August 12, 2014, 03:15:36 PM

Previous topic - Next topic

way12go

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.
Success gives birth to success? Failure gives birth to failure? - Sagar Gorijala.

Chdslv

Quote from: way12go 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.

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.

pavroo

#17
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:
mkdir -p /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live
2. Copy initrd and vmlinuz:
cp /full-patch/WORKINGDIRECTORY/squashfs-root/boot/vmlinuz-VERSION /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT/live/vmlinuz
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:
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
Change /full-patch/WORKINGDIRECTORY and VERSION number as you have.

Watch what is going on for any error message.
Nothing is easy as it looks. Danielle Steel

Chdslv

#18
Using
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 withmksquashfs /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, 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!



pavroo

#19
Now go to: /full-patch/WORKINGDIRECTORY/ISOTEMP/ISOMOUNT directory and build iso image:
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/ISOMOUNT
If the iso is made go to: /full-patch/WORKINGDIRECTORY and run:
isohybrid -u custom-linux-version-1.iso
Create md5sum if needed:
md5sum custom-linux-version-1.iso > custom-linux-version-1.iso.md5
Change:
- 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:
SQUASHFSOPTSFULL="-no-recovery -comp xz -always-use-fragments -b 1M"
Nothing is easy as it looks. Danielle Steel

Chdslv

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!


MoroS

Quote from: Chdslv on November 30, 2014, 10:04:36 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:

#!/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's no such thing as "impossible". :)

Chdslv

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, 16:18:51 up 10 min,  3 users,  load average: 5.64, 3.52, 1.63

It doesn't appear to use swap.              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, 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.   

MoroS

Quote from: Chdslv on December 01, 2014, 04:59:19 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).

Quote from: Chdslv on December 01, 2014, 04:59:19 PM
The log files are massive...
I should've used a bigger (than 1 second) value for the sleep command. ;)

Quote from: Chdslv on December 01, 2014, 04:59:19 PM
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's no such thing as "impossible". :)

Chdslv

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!

MoroS

Quote from: Chdslv 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.
You've got cpufreq-info to check which is currently used. Then use cpufreq-set to set it.

Quote from: Chdslv on December 01, 2014, 06:56:54 PM
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's no such thing as "impossible". :)

Chdslv

I set 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?

MoroS

Quote from: Chdslv on December 01, 2014, 11:26:59 PM
I set 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's no such thing as "impossible". :)

tems

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  :(

pavroo

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

View the most recent posts on the forum