Thursday, December 5, 2013

LiveCD project, revisited

Well, it's been a while, and I haven't updated you on the sometimes frustrating LiveCD project.  So I will take a few minutes and do so.

I finished the project more than a week ago on a Friday afternoon, an hour after I was supposed to go home.  I tested it in VirtualBox on my Linux workstation, and it booted and let the user activate the VPN and access the three web pages they were supposed to access.  It did not offer them an install option, and they had immediate access in the Unity Panel to only VPN, Firefox, & the Libre Office apps.  My intent had been to offer both Firefox and Chrome, but you would not BELIEVE how hard it is to shrink a filesystem small enough that 'remastersys' can shrink it down to an ISO file under 700MB so it can be burned to a CD.  Chrome is much bigger than Firefox, so Firefox won.

I also took the CD home and successfully tested it on my old Dell laptop, and my weekend was happy and relieved.

On Monday, I gave my boss the CD, and told him to have fun with it.  He knew I had stayed late on Friday to complete the project, not because he was pressuring me, but because I just wanted to finish it so I could start the new week by simply documenting the process of creating a LiveCD for future reference.  I know, documenting my work...  I'm going to lose my SysAdmin card if the others find out. :-)

10 minutes later he brought the CD to my desk and said it didn't work.  What the heck???

I put it in my workstation, and restarted it.  No VirtualBox test this time.  I did it all the way!  Worked like a charm!

I then realized that because it was moving at the speed of CD, just getting past the initial splash screen was taking over 35 seconds on my workstation, and it has 8 CPUs and 12GB of RAM.  He had been testing it on old notebooks.  I tested it successfully on my workstation, and then returned the CD to my boss.  I said, "Don't scare me like that!  It just takes a good long time to boot up because it's moving at the speed of CD and you're using very old laptops."  So he plugged it in and booted it up.  I stood and watched, counting internally, "One-one-thousand, two-one-thousand, three-one-thousand..."   He looked at me quizzically, and I pointed out to him that I had just crossed the 30 second mark and it would be a while.  After another minute or so, I got tired of standing and sat in his guest chair to wait this thing out.  After another 3 minutes I surrendered and asked him to give me both the CD and the laptop we were testing on so I could have it at my desk and not have to bother him again for testing.

Tail between my legs, I returned to my desk and to the drawing board.  That didn't go so well, did it? Dang!

I decided that since it worked on two other machines, the CD was okay.  It must be something about the way I created it.  So I burned a copy of the original LiveCD as it came from Ubuntu.  I was using Ubuntu Desktop 12.04, i386 version.  One CD later, I was booting the laptop.  Kind of.  It got about 10 seconds into the boot process and put up an error about the kernel requiring a PAE qualified CPU, and this one was not.  Aha!   So, I asked myself, what the heck is PAE???

I Googled it and found this bit of information on wikipedia.

"In computing, Physical Address Extension (PAE) is a feature to allow 32-bit x86 processors to access a physical address space (including random access memory and memory mapped devices) larger than 4 gigabytes."

Okay, that is understandable.  Older CPUs were unable to use that much memory, and it's a nice way to increase your computer's performance.

Here's the problem.  Ubuntu decided - unilaterally - to start using PAE only kernels starting in 12.04.  One page explaining it can be found here:
http://askubuntu.com/questions/122841/why-is-12-04-using-a-pae-dependent-kernel-by-default

It's Ubuntu's right to make such a decision.  I would have preferred that they add a bit of code to their install script that detects the CPU and determines whether it as PAE compliant, and if not, installs an non-PAE kernel for that machine.

So all my work was for naught.  I had to go out and hunt down a non-PAE version of Ubuntu 12.04.  I found an unsupported version at:  http://people.canonical.com/~diwic/12.04-nonpae/  ...and used it as my base, starting over from scratch.  Two days later, I had a tested, working copy.  I had tested it on the first of the two laptops where the original LiveCD had failed for the boss.  I had tested it on my workstation, both via VirtualBox and via actual booting to the CD.  I was happy.  I had even managed to kill two stoned birds by documenting - line by line - as I ran through the process, so I was well on my way to finishing the documentation.

I gave the CD to the boss, and tiredly made my way back to my desk to rest and play with my laurels. For about two minutes.  That's when my boss called me and told me the CD had caused a 'kernel panic'.  A kernel panic occurs basically when the kernel - the heart of the Unix/Linux operating system - encounters either a software or hardware problem which it feels to be insurmountable, and it throws up the panic message and stops.  Okee dokee.  So either the CD was flawed, or the hardware on the laptop was having an issue.

I brought the CD back to my desk and repeated my tests, booting both the other notebook from the boss, and my own workstation - both via VirtualBox and via booting from the CD.  No problems.  Okay.  That means a hardware issue.  Having just wasted weeks building a PAE kernel that failed because the hardware wasn't good enough, I quickly came to the conclusion that the hardware on the second notebook was probably too old for the kernel being used in 12.04, PAE or not.

So yesterday, I started over yet again, this time using Ubuntu Desktop 11.10  i386, and this morning successfully burned a CD that I am about to begin testing.  I have also downloaded Ubuntu Desktop i386 versions 11.04 and 10.10, so I can go back a year in kernel design if need be.  I don't like the security implications, but since this is a LiveCD, I don't see a heck of a lot a hacker can do, so I will test, and if it works, I'll let the boss decide.  Perhaps he can give the 12.04 CD to the users with the newer hardware, and regress back to the older version for those who refuse to buy a newer laptop or tower for their home use.

I hope you're learning a bit about what it is to be a Unix/Linux Systems Administrator!!


MyFreeCopyright.com Registered & Protected

No comments:

Post a Comment