WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: 5th grade teacher - need help to bypass windows SystemCed problem - use TC?  (Read 8055 times)

Offline samJohn

  • Newbie
  • *
  • Posts: 5
I'm a 5th grade teacher that bought 33 laptops for my students 7 years ago (used - all I could afford.)  Currenly, some are getting "systemCed error" because the system file in an NTFS drive = E:\winnt\system32\conf\system  is corrupted.  I could not find a way to copy over a good one at boot time before windows started (that would be nice but no go.)  Now I have to take out the disk, place it in a usb adapter on another computer and copy a good "system" over the corrupted one.  So I thought TinyCore could be used to do this:  1. always load it when power is turned on.  2. have TinyCore run an automatica script (bat file) using TinyCore's  command line to copy E:\winnt\system32\confg\mysystem  to  E:\winnt\system32\config\system.  3. then automatically  leave Tinycore and automatically launch windows 2000.

Is this feasible?  If so, would someone walk me through: 1 Placing TinyCore in E:\Utl\TinyCore, 2. creating that script file, and 3. changing the window's boot ini to launch TinyCore.  I know nothing about linux but willing to give it a shot.
Thanks
 
« Last Edit: January 12, 2013, 07:38:08 PM by samJohn »

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
hi samjohn,

why do you want to copy that file at boot time?
i suggest to copy a functional file to the windows-ntfs-partition with the help of a livecd-linux f.e. tinycore.
at first rename the corrupt file, afterwards copy the alternative, new file at the same place.
usually ntfs-partitions are mounted read-only.
the package ntfs-3g helps to mount with write-modus.
f.e. windows on /dev/sda1
sudo mount -t ntfs-3g /dev/sda1 /mnt/sda1

perhabs i could give you some hints for a solution.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
This specific issue is documented here with fixes

http://support.microsoft.com/kb/269075

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
hi samjohn,

a different approach could be to clone a functional system over damaged ones,
based on ntfsprogs.tcz

you could make images in a file:
ntfsclone --save-image --output win_c.ntfsclone /dev/hda1

this images can be used to clone other machines:
ntfsclone --restore-image --overwrite /dev/hda1 win_c.ntfsclone

this could be also done in a zipped image:
ntfsclone --save-image -o - /dev/hda1 | gzip -c > win_c.ntfsclone.gz
gunzip -c win_c.ntfsclone.gz | ntfsclone --restore-image --overwrite /dev/hda1 -

backup over remote host:
ntfsclone --save-image --output - /dev/hda1 | gzip -c | ssh host 'cat > win_c.ntfsclone.gz'
restore over remote host:
ssh host 'cat win_c.ntfsclone.gz' | gunzip -c | ntfsclone --restore-image --overwrite /dev/hda1 -

there are so many ways to find a solution.
« Last Edit: January 12, 2013, 09:07:07 PM by netnomad »

Offline samJohn

  • Newbie
  • *
  • Posts: 5
Thanks for the suggestions:
Why do I want to copy file at boot time?
It needs to be automatic since their are 33 students in the room and I can't stop teaching when the student sees "SystemCED" error.  I already clone with Mclone (a multicasting way - and very nice too) but I can't stop in the middle of the class to do that.

Thanks Codeplayer2 but that requires my intervention in the middle of teaching the class - Actually, I have a better way than that support doc suggests:  Take the disk out of the laptop, use a usb adapter, and copy my system files over the ones there.  Place the disk back into the laptop and all works.


Thanks netnomad for your first suggestion - that is along the lines but I know nothing about linux and pretty good around windows as I have written a lot of bat files/vba code to build all the automation in the classroom.  Also, I already clone with Mclone (a multicasting way - and very nice too) but I can't stop in the middle of the class to do that.



 What I need is for someone to help my classroom by building a script to automate the process.  First, I think I could figure out how to install TC on the hard disk in the folder I have in my original post as well as change the boot.ini to automatically load TC.  Than the script would take over:   
1. Boot into TC command mode, hopefully nothing is displayed on the screen in this entire process
2. copy my system file over the existing file (even if it is ok since this script will run every time the laptops are powered up.
3. leave TC and start windows (or if have to, stay in TC and launch windows.)  Hopefully, TC is OK with just powering down without closing TC.

I just don't think I have the Linux experience and time away from teaching to learn how to build that script - Hopefully, someone has the knowledge to make those commands in the script work.

Thanks


Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Do I understand right that you plan alternatingly booting TC & Win2K without any user interaction?
« Last Edit: January 12, 2013, 10:50:53 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline samJohn

  • Newbie
  • *
  • Posts: 5
Yes that is what we do now - one student comes in, turns on all computers and 4 minutes later, each laptop is ready for the student to begin their lessons.  They click on their name, enter their password, and my program starts where they left off yesterday.  Except once or twice a week, a student gets that systeced error and they have to move to a different computer until I get time to fix it.  That is why I need something before W2k starts to copy my good "system" file over the existing one (even if it is good) so that if the system file is corrupted (or in our case, always goes from 8,900 KB to 13,xxx therefore exceeding the mem that W2k can use for their hives.)  I'm not sure why it increases in size as no student can install hardware devices or access any part of the system including IE or file system.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Hi samJohn
I think you should try to figure out why the registries system file is so large to begin with and why it's getting bigger.
If you already haven't done so:
Try using  RegScanner:
http://www.nirsoft.net/articles/find_registry_large_values.html
Check for any entries that seem to be excessive in size. If you go to the tips section listed here:
http://www.nirsoft.net/utils/regscanner.html
they state:
Quote
view the list of all Registry keys that have been modified in the last few hours or days
When a machine goes south, that may allow you to identify the culprit.
You might also want to Google   registry compact    to reduce the size by removing the empty space
left behind by keys that were deleted.
OK, having said all that, here is a rough overview of how you might automate the process:
Copy the "good  system file to  E:\winnt\system32\config\system.good
Copy  boot.ini  to  boot.windows. Edit it to include an entry for Tinycore.
Copy  boot.windows  to  boot.tinycore. Edit it to default to the Tinycore partition.
Defrag the drive on the laptop to ensure there is empty space at the end of the drive.
Boot the CorePlus CD and using the Apps tool, get the  gparted, ntfsprogs  extensions
Shrink the partition to make room for another one, 100MB should be plenty.
Use the install utility to install Tinycore to the new partition.
Reboot the CorePlus CD and using the Apps tool install  ntfsprogs  into the new partition.
Edit the  /opt/bootlocal.sh  file to do the following:
Code: [Select]
1. Mount the drive containing boot.ini
2. Copy  boot.windows  to  boot.ini
3. Mount the drive containing  system
4. Copy  system.good  to  system
5. reboot
Click on the  Exit  icon, select  Reboot, make sure  Backup Options  is set to  Backup  and the text box underneath
points to your new partition. Click OK.
When Windows comes up, create a batch file that copies  boot.tinycore  to  boot.ini. Run the batch file. Then set it
to run automatically every time Windows boots.
Since you list drive E: and I don't know whether C:, D: and E: are partitions on the same drive or different drives,
I can't offer any suggestions on how they map to Linux drives.
As I said, this is a rough overview and no doubt will require some tweaking. Hope it helps.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Sounds like a plan! :D

The one thing I don't understand is how TC could be booted or bootstrapped via boot.ini, if you'd care to elaborate a bit more in detail about that.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline lverns

  • Newbie
  • *
  • Posts: 29
@tinypoodle
    I'd suggest grub4dos. In theory, you only need to drop two files onto drive C: (a binary file named 'grldr' and a config file named 'menu.lst') and then add something like this to boot.ini
Quote
C:\grldr="Grub4Dos"
Sadly, my experience with such a setup has been rather poor, but that would be one possible route to pursue. Still, grub4dos is my favorite bootloader.

Offline samJohn

  • Newbie
  • *
  • Posts: 5
Thanks Rich,
I appreciate that effort for such details - Next weekend, I hope to try putting those things in place - I'm sure I will get back to this forum since linux is not my strong suit.

I use "regcompactor", Page defrag and reg clean to compact the registry on the master laptop before I clone it.  I have used regscanner to see what is in the registry but because I have the registry working for 7 different computers at one time (clone the master and it works on Ibms, Hps, and Dells) and that is why it goes from 2,300kb new w2k intallation to 8,900kb (still under the 12 or so mb - to leave room for OS programs - up to 16mb total before crashing.)  I have had this problem where a computer works for weeks and then all of a sudden, a student powers it on and gets the systemced error.  When I take the disk out and usb it to look at the system file, it is 13,000+.  So it has gone from 8.9 to 13 in one session AND no device or software has been installed - the K-5th grade students can't get into the OS, file system or anything - power on goes automaticaly into my main program and no desktop - poweroff, is all they can do.

Can regscanner open a system file along with all other hives if they are greater than 16 mgs and windowos doesn't even boot?

(I can do) Copy the "good  system file to  E:\winnt\system32\config\system.good

(I can do) Copy  boot.ini  to  boot.windows. Edit it to include an entry for Tinycore.

(not sure the code) Copy  boot.windows  to  boot.tinycore. Edit it to default to the Tinycore partition.

(I can do that) Defrag the drive on the laptop to ensure there is empty space at the end of the drive.

(not sure - am I asked to include those) Boot the CorePlus CD and using the Apps tool, get the  gparted, ntfsprogs  extensions

(I can do) Shrink the partition to make room for another one, 100MB should be plenty.

(I can do) Use the install utility to install Tinycore to the new partition.

(Is that self evident) Reboot the CorePlus CD and using the Apps tool install  ntfsprogs  into the new partition.

(is it EXactly with numbers like below? and what do I use to edit it?  Is there an "Explorer" file program with TC? ) Edit the  /opt/bootlocal.sh  file to do the following:
Code: [Select]
1. Mount the drive containing boot.ini
2. Copy  boot.windows  to  boot.ini
3. Mount the drive containing  system
4. Copy  system.good  to  system
5. reboot

( where are the backup options) Click on the  Exit  icon, select  Reboot, make sure  Backup Options  is set to  Backup  and the text box underneath points to your new partition. Click OK.

(I can do) When Windows comes up, create a batch file that copies  boot.tinycore  to  boot.ini. Run the batch file. Then set it to run automatically every time Windows boots.

Since you list drive E: and I don't know whether C:, D: and E: are partitions on the same drive or different drives, (same physical drive with 3 partitions and E contains W2k)

I can't offer any suggestions on how they map to Linux drives. (do I need to map or mount them or can I just access them - C and D are Fat32 and E is ntfs - total of 5 gig on all.

Thanks

Offline mocore

  • Hero Member
  • *****
  • Posts: 616
  • ~.~
@tinypoodle
    I'd suggest grub4dos. In theory, you only need to drop two files onto drive C: (a binary file named 'grldr' and a config file named 'menu.lst') and then add something like this to boot.ini
Quote
C:\grldr="Grub4Dos"
Sadly, my experience with such a setup has been rather poor, but that would be one possible route to pursue. Still, grub4dos is my favorite bootloader.

for more detail   
  Grub4dos Guide , Loading/Installing Grub4dos From Windows
http://diddy.boot-land.net/grub4dos/files/install_windows.htm#windows1

it could even be possible from within a boot loader
http://reboot.pro/topic/17955-screengrab-in-grub4dos-shell/ (write to a file )
or
http://www.syslinux.org/wiki/index.php/Lua.c32 , tho i cant see any examples of file writing , i know little of lua

tho that me be going one step beyond   , i think with a few scripts , core.gz , u can fix win2k

then u have time to move from 2k to tcl  ;D



Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Hi tinypoodle
Quote
The one thing I don't understand is how TC could be booted or bootstrapped via boot.ini, if you'd care to elaborate a bit more in detail about that.
Install grub to the boot sector of the new partition (not the MBR of the disk). Use dd to copy the boot sector to a file
called grub.bin. Copy that file to C:\. Add an entry to the boot files that reads   C:\grub.bin="Tinycore Linux"
Create a  menu.lst  file in  /boot/grub  in the new partition to point to Tinycore.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Hi samJohn
Quote
Can regscanner open a system file along with all other hives if they are greater than 16 mgs and windowos doesn't even boot?
To the best of my knowledge, that 16MB limit is only a problem under W2K, so I don't think regscanner will have a
problem with the file size. From the regscanner page:
Quote
Starting from version 1.40, you can search the Registry in a remote computer on your network.
That suggests that if you connect the drive with the borked system file to another computer, you should
be able to use  File->Open  and scan it. Best way to find out for sure is just try it.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Hi samJohn
OK, I'll try to fill in some of the gaps.
Quote
(not sure the code) Copy  boot.windows  to  boot.tinycore. Edit it to default to the Tinycore partition.
First off, it might be a good idea to use an 8.3 format for those file names, like  boot.win  and  boot.tcl. Your
boot.win file should look similar to this:
Code: [Select]
[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Microsoft Windows 2000"
c:\grub.bin="Tinycore Linux"
and boot.tcl should look similar to this:
Code: [Select]
[boot loader]
timeout=5
default=c:\grub.bin
[operating systems]
multi(0)disk(0)rdisk(1)partition(1)\WINNT="Microsoft Windows 2000"
c:\grub.bin="Tinycore Linux"
Quote
(not sure - am I asked to include those) Boot the CorePlus CD and using the Apps tool, get the  gparted, ntfsprogs  extensions
If you have another tool for shrinking the partition, you can skip installing gparted and ntfsprogs.
Quote
(Is that self evident) Reboot the CorePlus CD and using the Apps tool install  ntfsprogs  into the new partition.
Click the Apps icon on the desktop, click connect, scroll down to ntfsprogs and click on it. Click Go. Ntfsprogs is required
so you can read/write an NTFS disk using Linux. You will also need  dosfstools  and  mtools  for FAT support, and
grub-0.97-splash for the boot loader for the new partition.
Quote
(is it EXactly with numbers like below? and what do I use to edit it?
Either click on the desktop then SystemTools->Editor  or  click on the terminal icon and enter:
Code: [Select]
editor /opt/bootlocal.shThis should be very close to what you want:
Quote
mount /mnt/sda1
cp /mnt/sda1/boot.win /mnt/sda1/boot.ini
mount /mnt/sda3
cp /mnt/sda3/winnt/system32/config/system.good /mnt/sda3/winnt/system32/config/system
reboot
This presumes that C:=sda1  D:=sda2  and  E:=sda3. I recommend you verify this. Open a terminal and mount all
three drives. and check the directory listing for each like so:
Code: [Select]
ls /mnt/sda1
ls /mnt/sda2
ls /mnt/sda3
Quote
( where are the backup options) Click on the  Exit  icon, .......
All the options will be in the popup window.
Quote
(do I need to map or mount them .......
Map may have been a poor choice of words on my part, drives/partitions get mounted under Linux.