WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] ezremaster TC 4.7.7 remaster kernal panic  (Read 11293 times)

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #15 on: May 20, 2013, 09:57:46 AM »
Hi gmc
It's actually compressed swap in RAM. Thumb drives also have a limited number of write cycles, somewhere in the
1 to 10 million range these days I believe. Wearing out a $5 thumb drive is more palatable than wearing out your DOM.
Oh, compressed!  That's very interesting. 

I like your logic on cheap thumb drives.  I haven't bought any in so long that it never occurred to me.

Thanks!

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #16 on: May 20, 2013, 10:03:54 AM »
Code: [Select]
cat /proc/swaps
Here is what I get when I try that command.

cat /proc/swaps
Filename            Type      Size   Used   Priority
/dev/zram0                              partition   240264   0   -1


This makes the impression that you would more likely have 1GB of RAM.
You are so right!  On the machine where I copied the above output I do indeed have 1GB.  The other machine only has 256MB total, with 8MB of that going to shared video.  And that is the one with the working PXE server setup that I so much want to remaster.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #17 on: May 20, 2013, 11:23:13 AM »
One of the characteristics of Core is that it is highly nomadic.
Unless you wanted to use something like local_initramfs.sh which depends on currently loaded modules, I see no absolute reason to remaster on the target machine.

I have created remasters for a diskless machine to be booted via PXE on a different machine and it worked out very well.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #18 on: May 20, 2013, 08:30:57 PM »
One of the characteristics of Core is that it is highly nomadic.
Unless you wanted to use something like local_initramfs.sh which depends on currently loaded modules, I see no absolute reason to remaster on the target machine.

I have created remasters for a diskless machine to be booted via PXE on a different machine and it worked out very well.
Actually, that is one of the main goals I had for the remaster.  Another is for a complete working backup, ready to run out of the box, so to speak.

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #19 on: May 20, 2013, 08:53:41 PM »
Hi gmc
It's actually compressed swap in RAM. Thumb drives also have a limited number of write cycles, somewhere in the
1 to 10 million range these days I believe. Wearing out a $5 thumb drive is more palatable than wearing out your DOM.
Oh, compressed!  That's very interesting. 

I like your logic on cheap thumb drives.  I haven't bought any in so long that it never occurred to me.

Thanks!

Update:  We had to go to town today so while we were out and about I checked the prices on new thumb drives.  I was pleased to find that I could buy a "small" (8GB) PNY drive for $6.  So I did.  At that price you are right - it won't matter if it goes bad, it becomes a "wear" item, like tires on the car.  Thanks for the tip.

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #20 on: May 27, 2013, 05:05:41 AM »
OK - Time for an update.

I removed the DOM (128MB Disk On MOdule) and installed TC 4.7.7 to an 8GB USB thumb drive.  I added a second, 256MB USB thumb drive as a swap drive.  Then I ran ezremaster again.  This time maximum memory useage went to 97% and swap useage maxed out at 90%.  After a very long wait ezremaster failed with this mesage at the end of the log file:

+ sudo advdef -z4 /tmp/ezremaster/image/boot/core.gz
Error writing on /tmp/ezremaster/image/boot/core.gz [at void convert_gz(adv_fz*, adv_fz*):redef.cc:447]
+ exit 23

The new swap drive is being recognized:


oot@box:/# cat /proc/swaps
Filename                                         Type          Size       Used     Priority
/dev/zram0                              partition   61084     51896    -1
/dev/sdb1                                partition   251900   150452   -2

Does this appear to be related to the kernel panic problem or is it something new?

Thanks...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #21 on: May 27, 2013, 10:12:36 AM »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #22 on: May 27, 2013, 10:29:57 AM »
After a process exits, memory gets freed up, so not of much relevance.

You can check in real time with
Code: [Select]
watch cat /proc/swaps
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #23 on: May 28, 2013, 04:29:31 AM »
After a process exits, memory gets freed up, so not of much relevance.

You can check in real time with
Code: [Select]
watch cat /proc/swaps
I was using conky and watching almost constantly - I never did see it go higher than I mentioned, but since conky only samples it could have missed that critical moment when memory was filled.

Do you think the "watch cat..." method would be more responsive than conky?  I'm going to try Rich's tip on temporary space.

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #24 on: May 28, 2013, 04:36:59 AM »
Hi gmc
I think the system ran out of memory. See:
http://forum.tinycorelinux.net/index.php/topic,15299.msg88554.html#msg88554
Thanks for the links - very useful.  I tried using sda1 for my temp storage but ezremaster fails immediately and there is no log to be found anywhere.  I tried letting ezremaster create the directory itself and then tried again after creating it myself.  Neither method worked.  I'm going to try some more tests while I wait for additional ideas from TC Headquarters.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #25 on: May 28, 2013, 09:55:49 AM »
Hi gmc
Did you also set the ownership and permissions?
Code: [Select]
sudo mkdir /mnt/sda1/ezremastertemp
sudo chown tc:staff /mnt/sda1/ezremastertemp
chmod 775 /mnt/sda1/ezremastertemp
And then point the first page ezremaster to that temp directory rather than using the default RAM based /tmp/ezremaster.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #26 on: May 28, 2013, 12:01:18 PM »
After a process exits, memory gets freed up, so not of much relevance.

You can check in real time with
Code: [Select]
watch cat /proc/swaps
I was using conky and watching almost constantly - I never did see it go higher than I mentioned, but since conky only samples it could have missed that critical moment when memory was filled.

Do you think the "watch cat..." method would be more responsive than conky?  I'm going to try Rich's tip on temporary space.

Code: [Select]
watch -h
[...]
-n      Loop period in seconds (default 2)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #27 on: May 29, 2013, 02:35:25 PM »
Hi gmc
Did you also set the ownership and permissions?
Code: [Select]
sudo mkdir /mnt/sda1/ezremastertemp
sudo chown tc:staff /mnt/sda1/ezremastertemp
chmod 775 /mnt/sda1/ezremastertemp
And then point the first page ezremaster to that temp directory rather than using the default RAM based /tmp/ezremaster.
I thought I had it set right but did not.  I compared the permissions and ownership with the one I created on the external HDD (NTFS) with the one I made on the USB thumb drive (ext2) - they were identical but only the HDD temp storage would work with ezremaster.  I wanted to avoid that one because it required the ntfs utility to run, and that used up precious RAM.

Before I got your response I tried starting ezremater from a root console and that part worked.  I was then able to use the USB thumb drive for temp storage.

At that point I ran ezremaster again.  This time I had a 256MB USB thumb drive formatted as linux swap, a second USB thumb drive (8GB) for temp storage, running as root, monitoring with htop and watch -n 1 cat /proc/swaps.

Using this setup I saw a significant reduction in memory useage - so low that the 256MB swap drive was never touched.  RAM swap was only minimally used, generally around 2 or 3 percent.

So, did it work?

No.  I still got the same kernel panic when booting the new CD.

But wait!  There is good news!  I went back tot he wiki and read through the entire article on ezremaster again.  (It makes more sense after using it for a while and then reading the guide again.)  This time I ran ezremaster again but chose differnet options.  Instead of choosing  'Extract TCZ in to initrd' I selectively chose 'Inside initrd' and Inside initrd on boot'.

Success!

Ironically, after re-reading the wiki I realized that extracting TCZ's into the initrd was the worst choice I could have made for booting on these thin clients - they don't have enough memory as it is, they sure don't need more things loaded into RAM at boot time!

Maybe at a later time I will try the 'extract TCZ' method again with the HP T5740 since it has lots of memory.

Anyway - I want to tell you how much I appreciate the time and effort you have put into helping me with this.  I have learned so much through the process, thank you.  I do have another question or two for follow-up it you don't mind.  I'll use another post to keep things separate.

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #28 on: May 29, 2013, 05:30:56 PM »
OK, now for my next question.  When I booted the remastered CD I noticed that some things were included and some were not.  On the source machine I was using home=sda1 and opt=sda1.  I removed home and opt from .filetool.lst and added root.  I did not include home=sda1 or opt=sda1 in the remaster.

On booting the remastered CD I found that the files in root were restored but that home and opt were not.  Iam surmizing that ezremaster does not include /home or /opt uless they are included in .filetool.lst?

It would be good to know exactly what ezremaster does and does not include in a remaster.

Thanks.

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: ezremaster TC 4.7.7 remaster kernal panic
« Reply #29 on: May 29, 2013, 05:41:07 PM »
One more question if I may.

When I made the working remaster I chose 'Inside initrd apps on boot' for some programs and 'inside initrd apps' for others.  (On the source system they were all installed as 'onboot'.

On booting from the CD I found that all the programs were 'onboot', even those that were selected as 'Inside initrd apps'.  Can someone explain to me what the options mean?  I have read the wiki artilcle again, several times, but must still be missing something.

Thanks.