Best Image / Config for simple disk cloning?


Forum: User Feedback
Topic: Best Image / Config for simple disk cloning?
started by: lasitter

Posted by lasitter on Nov. 15 2007,18:19
I'm interested in using DSL to do a straight sector by sector copy on a computer that's using a drive with a proprietary partition and file structure on an old (PCI / ISA bus) clone.  It's very plain, with nothing as fancy as SCSI or USB -- just IDE HDD, CD-ROM, and floppy.  It's a 166mhz equivalent system with 16 megs and, VGA/SVGA.  

The owners were doing backups with an ancient Wangdat tape drive, which has since died.  Even when it was working the backup program only copied particular kinds of documents, and in the event of a crash could only recover by having the original vendor do a scratch install of the original system and then reload the data files from tape.  It was bad news all around, and having a complete image backup should be a great improvement.

The computer generally seems happy with DSL and is already booting this (current.iso) image:

< ftp://ftp.oss.cc.gatech.edu/pub....ent.iso >

System has two identical (same model) IDE drives, just over 1G.  I want to create a boot image CD that starts the machine and copies the 1st drive to the 2nd drive.  I've been told that part of the process will involve using a command like:

dd if=/dev/hda of=/dev/hdb bs=256K

The computer is set to boot from the CD first and the hard drive 2nd, so that's pretty standard.  I want the user to be able to stick in a boot CD and give it the three finger salute and then end up with a nice current backup.

I'd like to have the right isolinux.cfg (whatever) that would boot without spending a lot of time scanning for what is not there (SCSI, sound, USB, etc.), with it creating and loading ramdisks as needed.  Simple console would be fine -- no need for xwindows or a window manager.  And I NEVER want it to ask about partitioning or installing anything.

If you have tips for me that would be great, as I'd like this tiny organization to escape being pressured into "upgrading" a system that is presently doing everything that's needed.

Posted by ^thehatsrule^ on Nov. 15 2007,19:16
Take a look at the cheat codes (i.e. wiki, press F2/F3 at cd bootsplash).  You'll probably be interested in "noscsi nousb dma 3" among others...

You could also have that dd command executed automatically upon startup.

Posted by lasitter on Nov. 15 2007,21:28
Quote (^thehatsrule^ @ Nov. 15 2007,14:16)
You could also have that dd command executed automatically upon startup.

I've forgotten what little I ever knew about the inittab, etc., processes, and I'd be glad for whatever help was available in this area.

Posted by roberts on Nov. 15 2007,23:09
Call your script from /opt/bootlocal.sh or even inline there.

Also for maximum efficiency use boot options of

2 base norestore legacy

as well all the noxyz options.

The 2 indicates to run at runlevel 2 which is root cli, which would execute your script in /opt/bootlocal.sh

Your script could shutdown or reboot upon completion so no operator intervention.

Posted by humpty on Nov. 16 2007,03:05
i think he wants to know how to make a custom cd.
Posted by lasitter on Nov. 16 2007,06:58
Quote (humpty @ Nov. 15 2007,22:05)
i think he wants to know how to make a custom cd.

No kidding!  Best part is I enjoy making "material" expressions of gratitude.  It doesn't qualify me for "last of the big spenders" but the responsiveness I've seen here so far has prompted my first donation to the DSL cause.

In cases where helpful individuals won't take money for their labor on my behalf, I usually make "tribute" contributions to Doctors Without Borders.

Back to the question at hand:  I'd seen the "noscsi noideraid nosound nousb nofirewire noicons minimal nomce noapic noapm lowram" options in isolinux.cfg and figured I would need some help in the editing of that file.

< http://damnsmalllinux.org/wiki/index.php/Cheat_Codes >

Thanks for the cheatcode tip.

roberts:  inline in bootlocal.sh

Thanks for that.  Yes I love simple.

I want to assure you that I AM in over my head, which is why I make no secret about being happy to pay for help with stringing the pieces together.

It's been several years since I diddled with Slack and FVWM95, and as my life since seems to have revolved around making Windows (Win2k) work, I've forgotten much of what little I had memorized.  "One of these days" I'm going to make OS upgrading to 64-bit Linux a priority, but I do have this particular chore to finish first ...

I absolutely love the idea of small, simple and fast, and so the motivation behind DSL appeals to me.

Thanks again all around.

Posted by roberts on Nov. 16 2007,10:17
Once you have the basics of what (boot codes) and where (to place your script), it is very straight forward to make a custom CD with mkmydsl.

The next step in the process is that of makeing an extension of the custom /opt/bootlocal.sh. That is just make a tarball of it. Test this setup of boot codes and mydsl loading of the script (tarball). If it works then running mkmydsl will produce a new cd of your setup.

Posted by curaga on Nov. 16 2007,16:31
For getting the most out of isolinux.cfg:

Change the first line "DEFAULT dsl" to "DEFAULT lowram"
Then edit the most bottom APPEND line, the one right below "LABEL lowram"

For the codes, I'd add "idecd". It skips the scsi stack normally used and uses the ide drivers straight, resulting in a little faster transfer

Posted by lasitter on Nov. 16 2007,17:51
Quote (roberts @ Nov. 16 2007,05:17)
Once you have the basics of what (boot codes) and where (to place your script), it is very straight forward to make a custom CD with mkmydsl.

The next step in the process is that of makeing an extension of the custom /opt/bootlocal.sh. That is just make a tarball of it. Test this setup of boot codes and mydsl loading of the script (tarball). If it works then running mkmydsl will produce a new cd of your setup.

OK, the first of a few specific questions about isolinux.cfg file.

With 16 megs, what value should I use for the ramdisk?

With this low amount of RAM, I guess I won't be using the toram option ...

So I just drop in "lowram" as the default and live happily ever after?

I assume there'd be no particular problem with deleting all but the few labels I'm interested in using (?)

---

DEFAULT linux24                      
APPEND ramdisk_size=100000 init=/etc/
TIMEOUT 300                          
                                   
PROMPT 1                            
DISPLAY boot.msg                    
F1 boot.msg                          
F2 f2                                
F3 f3                                
                                   
LABEL dsl                            
KERNEL linux24                      
APPEND ramdisk_size=100000 init=/etc/
                                   
LABEL memtest                        
KERNEL memtest                      
APPEND initrd=                      
                                   
LABEL dsl-txt                        
KERNEL linux24                      
APPEND ramdisk_size=100000 init=/etc/
                     

....

APPEND ##############################

Posted by curaga on Nov. 16 2007,18:13
I think the ramdisk_size value is ignored, at least DSL calculates the ramdisk size based on available memory.

Yeah, feel free to remove all the label sections you don't need. Leave dsl and lowram, though ;)

Posted by ^thehatsrule^ on Nov. 16 2007,20:29
iirc the size of the file needs to be at least a certain number... so you might need to leave them in for compatibility (hence the hashes at the end).
Posted by lasitter on Nov. 17 2007,00:38
Quote (^thehatsrule^ @ Nov. 16 2007,15:29)
iirc the size of the file needs to be at least a certain number... so you might need to leave them in for compatibility (hence the hashes at the end).

Important to know if true, but that would also be one of the dumbest design flaws I could think of to inflict on a user ....
Posted by roberts on Nov. 17 2007,01:31
I would not use lowram, hence tryinig to start X windows on a 16MB machine.

If the design goal is to only run a script (dd ...) to do a backup between drives, then runlevel 2 would be much better.

Boot the cd, script runs without any user intervention. Upon completion of your dd backup script, machine shutdowns ejecting your custom CD.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.