G'day Kent,

How quickly can dd process your rebuild?

Sorry Kent I don't know, I haven't tried this I was simply speculating that it could be done. However, the "bs" {blocksize not bullsh.t ;-)} argument to dd can make a huge difference to the speed. I think the default is 512. I know that specifying bs=1024 makes a heap of difference to copying a Linux ext3 volume. Again wiser minds may be able to help here with the appropriate values. With dd of course you are copying the entire partition even if it is only 20% full. Hence why the tarball approach is quicker.


Also I didn't bother to do the maths, but it may be physically impossible to unpack 2G x 20 terminals in the time required with a single 100Mb Nic card on the server. I don't know what level of tool you allow your students to hack at the local disk with but I suspect that you have to assume that the disk and it's partition table is trashed by the end of the lesson (hence no good speculating as to whether you could save the image on a partition on the local disk).

Is this the default behavior for dd, copying the boot partition? Or will I do that separately?

Eh...it depends on what raw device you specify. If you want a copy of the boot sector, then


dd if=/dev/hda of=/writeabledir/wrkstn1-boot.img bs=512 count=1

The boot sector also contains the partition table. If you google you can find out exactly where within the boot sector the partition table is and also where the boot code is. Then using bs= and skip and count arguments to dd you can get at each individual byte in the boot sector.
"$ man dd " is your new friend.


So my suggestion is, build the PC up to the ms-dos/windows operating environment that you want. I'd suggest that you partition the disk before installing doze/dos so that the hda1 partition is only as big as required, i.e say 20% free after install. Then re-boot the PC into LTSP diskless mode and drop to a local shell. Load the ide drivers so that /dev/hda /dev/hda1,2 etc are created for access to the local disk (Sorry don't know the exact steps but it can be done, and others on this list know how). Using the dd syntax given above you can make a copy of the boot sector of the local disk and place it up on the server, or stick it on another partition on the local drive. Then make a copy of the first partition.

dd if=/dev/hda1 of=/writeabledir/wrkstn1-root.img bs=1024

(note, not sure if the bs=1024 argument is appropriate for doze/dos, try it and see).

Now you have the images that you need. At rebuild time the process is simply the reverse but do the boot sector first which will "re-partition" the disk and install the boot loader, and as I said in the earlier post, there's no reason why this can't be done in a shell auto-run from the SCREEN_01 argument in lts.conf. Note also that you do NOT mount the local disk, dd does it's work on the raw device. So the shell would look something like (other please feel free to correct my syntax and obviously error checking should be done to see each command succeeds),

  insmod ide
  dd if=/serverNfsdir/wrkstn1-boot.img of=/dev/hda bs=512
  dd if=/serverNfsdir/wrkstn1-root.img of=/dev/hda1 bs=1024
  reboot

A solution to your performance problem may be to place the images onto a CD and place that into the local drive of the PC. At rebuild once booted into LTSP mode, the shell would mount the CD-drive and copy the image from there rather than via NFS. This wouldn't necessarily be faster for one machine but if you are doing 20 in parallel......

HTH

Pete




Ok at the risk of teaching you how to suck eggs....You said that the students used MS-DOS, Windoze and Linux. So I'm assuming that the partition table on the desktop gets trashed around a fair bit.


perhaps we need a quick discussion on how disks and things




------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net

Reply via email to