Jump to content

Partimage tips for those without a burner


Guest GorGor
 Share

Recommended Posts

Guest GorGor

www.partimage.org

 

amended 01JUL2003 Note I am not an expert. COMMANDS are typed without the quotes eg "look at me" and assumes we are newbies.

 

I will edit this when I find all the errors I have made, heh heh. So its not WORTHY of going into the tips section please.

 

 

PREPARING FOR A CLEAN INSTALL. (section a)

1) Create a spare partition for your images, before installing mdk. Read the mdk documentation on partition restoring (not discussed here or mbr restoring (section i). Make notes of your partition sizes and especially in changes you make if you stray away from mdk or resize any partition.

 

The images written by partimage are one third the size of the data you install for mdk, or whatever you install. And after awhile you will probably have the need of minimum of 4 images. On clean install my data was over 1Gig so suggest backup partition be 2 Gigs.

 

My suggestion on clean install, I choose only one partition for root one partition for swap and one partition for my BACKUPS or STORAGE. The cost is a LARGE image.

This storage/image partition where I put downloaded programs too big to save to floppy so I don't like the program after installing it, I restore an earlier image and delete THAT program from my backup/storage parttion.

2) First image is of a clean install with no mdk updates. Mdk prompts you to update during install, but I don't do it until later.

3) Other images will therefore be mdk updates and software changes you think are important to backup.

4) As you get short of space delete the oldest images.

 

WHY DO IT?

So you can experiment with new software, when I find something I like, I save the file to my backup partiton...then restore my latest image and re-install the preferred software and take a new image. This keeps me clean and lean. Plus I can play with software to my hearts content.

 

Naturally I make mistakes, doh, so my images are not strictly sequential.

I may go image a, b, c, back to b with changes and image as d. This creates a path like the kernel trees.

eg. a b c and a b d (forking at B)

 

Partimage allows you to record comments in saving each image. I still take notes because, for me, I still have to delete old images to make space for the next image. If you have 80 gig hard drives well lucky you.

 

 

PREPARING FOR THE FASTEST WRITING OR READING OF THE IMAGES. (section B)

You can skip this step if it scares you. hdparm is a program available on the 9.1 cds. Install it and run with root permission to know what commands to issue when you use the floppy system. Remember the floppy system ignores any setting you have on your hard drive as it loads into RAM. Issue the command " hdparm -h" or "man hdparm" for larger info. Copy and print out the abbreviated parameter list. Note there are only a few that are rated as DANGEROUS and take care when you type in lower or uppercase. Other than the ones mentioned in the output, I would add letters y, Y, z, Z for my hardware to avoid playing with.

 

Each hard drive may be different so the first command to start with is "hdparm -tT /dev/hda"

Then change one parameter at a time and re-run the timing test until you find the best read/write speed. After some tests my hardware liked "hdparm -c3d1u0Xudma2 /dev/hda" and same again for hdc for drive 2. (Notice the capital X and you can combine the parameters into one STRING. Common letters to concentrate on are c,d,m,u,X. Note that udma is better than PIO modes if your motherboard supports them. The help file says re-run the timing 3 times and average them. I find it quicker to run the test once to get the trend, and run it 3 times to compare my best two strings.

 

 

GETTING PARTIMAGE. (section c)

Be aware that there is a stable file and a development file, currently 0.6.2 and 0.7 something. Partimage site has a boot disk image, root image and a pdf help file. Download to a place where you have write permission. Currently they are:

partimage.bootdisk-2.4.18.1-raw, partimage-0.6.2-raw AND partIimageGuide-20030204.pdf

p.s. These files are tiny so save them to your backup partition.

 

CREATING FLOPPIES (section d)

1) Make sure when you insert the first blank floppy that it is mounted. Verify by accessing floppy thru your file manager such as Konqueror. If you have disabled supermount, you can use kde gui tool called "kdf" to mount and unmount floppies.

You can also issue commands in terminal mode such as "mount /dev/fd0 /mnt/floppy" and "umount /dev/fdo" AND you may need root permission to do this.

2) To get root privilege open a terminal and issue the set user command for root (su) and then type in the root password when prompted. "su" and "your root password"

3) To create boot disk (change filename to whatever the new RAW file is). fd0 means fdzero we type

" dd if=/directory where stored/partimage.bootdisk-2.4.18.1-raw of=/dev/fd0"

directory where stored is likely to be /home/your name/

4) Unmount the floppy if not using supermount. Insert disk 2 and mount it, if necessary.

5) Create root disk. "dd if=/directory where stored/partimage-0.6.2-raw of=/dev/fd0 "

 

For me, there was roughly ten second delay b4 the floppy drive was accessed and floppy written to. Rememberthis as the console will ouput a message about hundreds of file in and out but them is still loading into the buffer b4 writing to floppy.

 

TESTING NEW FLOPPIES (section e)

1) Now type "reboot" but go into your cmos/bios and allow floppy to boot b4 your hard disk then insert boot disk and when prompted insert root disk.

2) If a message screen appears about hints to using partimage, you have one set of floppies.

3) As floppies can fail, repeat the above tips to have a second set of floppies. The first floppy is a success if it prompts you to load the root disk. It is likely that dd fails for the root disk and you may get an error that no image was found at sector 0. So repeat the dd command on a new floppy and re-test the full start up. "dd --help" and 'man dd" can give you more info.

 

 

AFTER FLOPPIES LOAD (section f)

1) Issue a command to load your keyboad map, for me that is a US keyboard design.

"keys us"

2) Issue your commands to speed up writing or reading each hard drive. If you chose to.

3) Mount the spare partition you write or read from.

For me that is "mount -t reiserfs /dev/hdc1 /mnt"

hdc1 is the drive 2 first partition.

Understanding the /mnt concept in floppy mode......mount means access to be able to be read, modified or deleted. It will not change the name of the partion folder. So, if drive 2 partition 1 was created during the install process and was given the MOUNT point name, /MY BACKUPS and I then created subfolders 9.1/ and 8.2/ when running partimage, the program reads the subfolders or files immediately below MY BACKUPS So when mounted correctly the full directories become /mnt/9.1/ and /mnt/8.2/ You can verify this by changing directory to /mnt and issuing command "ls" for list with the combined command "cd /mnt && ls"

4) If you can not remember what type of filesystem to MOUNT, try

"mount -t auto /dev/hdc1 /mnt" and replace hdc1 with your backup partion, if different.

5) If mount is still not working skip that step and run 'partimage', you won't be able to read or write images, but you should see what the filesystem type is, for each partition.

 

Note that partimage deliberately hides your swap file partition.

After noting the filesystem types, exit from partimage and mount your destination partition for step (3)

6) Issue command "partimage" to start a 2d graphical program.

 

 

 

SAVING IMAGE (section g)

1) Arrow down or up to highlight the partition you want to image....then tab to the file name section and type

eg "/mnt/your sub-folder name/your image name.gz".

 

Bz2 is also available but is slower and if you use development file 0.7 series lz0 is also availble compression formats.

If the mount command for section f 3 fails then you will get an error message about the UNMOUNTED partition and partimage will ask you for a new folder location. Occassionally, this error is due to your typo error. Likely to be missing out /mnt before the balance of the filename.

2) More prompts follow a successful mounting and are easy to understand.

 

 

 

RESTORING IMAGE (section h)

1) Arrow down or up to highlight the partition you want to overwrite.

2) Tab to the file name and type "/mnt/your subfolder/your image name.gz.000

Comment 1....when you are tired, you tend to omit putting in your sub-folder name or the /mnt bit

Comment 2....currently when you saved the images, the program ADDS 000 (zero zero zero) to the file name. Do not add any zeros at section g or you will end up with a file myimage.gz.000.000

 

 

 

RESTORING THE MBR (section i)

Now this is so important my few words are not worthy. You may find that when you experiment with other distros etc you have overwritten your old mbr. So restoring mbr is needed before or after restoring the image you want to get back to.

comment 1 Its a frustrating trap for sleepy me to restore an image and to forget to restore the mbr and have to reboot the floppies. So, do the mbr first IF NECESSARY, then restore the target image.

 

1) Arrow down or up to highlight the partition you want to overwrite, this partition will include the folder / (or /boot if you installed this as a separate partition)

2) Tab and select MBR to restore

3) You will be offered some choices about partition table or full mbr. Did you keep notes on changes you were making? if not, go for the complete mbr.

4) Now comes the fun bit. Each drive that you have, has a mbr. If your source image file is not on the same drive as the one to be overwitten, you may get a warning message talking about partitions not being the same etc.

THINK before you act. You will normally be overwriting the mbr for drive one.

 

If in doubt try rebooting with the overwritten image and see if the system HANGS. If it does it needs the mbr from the source image file. Loading the files takes ages but restore of the mbr takes seconds.

Link to comment
Share on other sites

  • 1 month later...
Guest GorGor

amendment to mbr

 

I am not an expert and assumed that the mbr was only saved in imaging hda1 or hdc1 etc.

 

Silly me. I have just found out that it looks like each image of each partition saves the mbr.

 

This is very handy. It gives you more mbr files to image back to.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...