LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-02-2004, 10:57 AM   #1
jhecht
Member
 
Registered: May 2004
Location: NYC
Distribution: Puppy Linux - it's dog-gone great!
Posts: 99

Rep: Reputation: 16
How to use partimage BU prog w/a 2nd HD?


I'm trying to use the partimage BU prog, when I boot from the Mepis CD (my current distro) I can run partimage, and the prog correctly sees the harddrives, and partition structure.

BUT there seems to be no way I can see to define the 'save to' drive as my hdb - it tries to save onto hda, and runs out of room. I have my spare
drive in Ext3 format, but can still find no way to assign it as a 'target'
drive in partimage. My hda is 6 gig, my hdb is 30 gig, so no size probs.

Nor is target select mentioned in the instructions - they say only:
>Put your Linux hard disk you want to backup (Source) on Primary Master Put your destination disk (backup) on Primary Slave
This is how I have them.

Then they say to boot from their floppy - I booted from the Mepis CD, so I
could umount my Linux drives. I had my hda1 umounted to copy it, and hdb1 mounted - so I could write to it - is that correct?

The partimage docs also say:
>Lastly you can choose what happens after the backup is done.
It never gets that far, stalls, 'cause the image is too big for the hda
drive, and I see no way to put the completed image on hdb.

The docs seem to imply that one could save to a different drive by typing
the correct syntax on the "Image file to create/use" line. But no example is given of the syntax for backing up to hdb1, for instance.

I can start partimage - but no target drive select option is apparent on any
of the screens. What am I missing?

Thanks,

John
 
Old 08-02-2004, 11:52 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
If you have the second drive / first partition mounted....
mkdir /mnt/images
mount /dev/hdb1 /mnt/images

.... then you should be able to add that the image name like this...
/mnt/images/myimage

If it is a large file and you selected to split the file, then the image name takes on some numbers ( myimage.000 ) . You need to know that when it comes time to restore the image.
 
Old 08-02-2004, 12:13 PM   #3
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,988

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Here's some instructions that might help:

http://www.desktop-linux.net/backups.htm

I can't give you instructions with mepis/BU but partimage is really not that hard once you get the hang of it. Try downloading the System Rescue cd here:

http://www.sysresccd.org/

It has partimage and a lot of other good utilities. Basically with partimage, you boot off some cd or floppy to get to a linux command line, mount the partition that you want to copy the image to, run partimage from the command line, select the partition you want to image and direct the image to be written to the partition you previously mounted. It sounds to me like your having trouble with mounting the partition you want the image to be written to and/or properly designating the location of that partition in partimage. If you post back the name of the partition you want to write to(eg hdb3) and the filesystem on the partition(ext3, reiserfs, vfat, ect) I can give you detailed step by step instructions on how to do that using the SystemRescue cd.
 
Old 08-02-2004, 03:05 PM   #4
jhecht
Member
 
Registered: May 2004
Location: NYC
Distribution: Puppy Linux - it's dog-gone great!
Posts: 99

Original Poster
Rep: Reputation: 16
H>If you have the second drive / first partition mounted....
mkdir /mnt/images
mount /dev/hdb1 /mnt/images

With hdb1 mounted, I tried typing those commands in a term window. Both were accepted, but instead of creating a new (sub)directory on hdb1, they changed the mount point of the drive to mnt/images. Is that correct? I put it back to the way it was before.

My problem is that I'm too newbie to know the exact syntax needed for the commandline-disguised-as-a-filename-selector.
aka 'Image file to create or use'. It would be nice if it said onscreen something like, 'You MUST enter the full path here!' - any hint that you'd need more than just the filename...

K> Try downloading the System Rescue cd here:
Got it, haven't explored it much, as the Mepis CD auto-boots with partimage on it.

K>It sounds to me like your having trouble with mounting the partition you want the image to be written to
Nah, I can mount it OK

K>and/or properly designating the location of that partition in partimage.
YES. that's the part which eludes me...

K>If you post back the name of the partition you want to write to(eg hdb3)
It's hdb1 - the only partition on the drive. Should I divide it more ways? If so, why?

K>and the filesystem on the partition(ext3, reiserfs, vfat, ect)
It's ext3 now.

K>I can give you detailed step by step instructions on how to do that using the SystemRescue cd.
That would be awesome, dude! I think it would help a lot of new users who are savvy enough to want backups...

I'd like to wind up with a folder on hdb1 called 'Drive BU'. In it, I'd put images with names like hda1_BU, hda3_BU. If I can use longer filenames, it'd be hda1_BU 080204 (datecode), etc.

BTW Kilgore, you tried to help me with my floppy problem, right? It might interest you to know that all my hardware issues were solved with Mepis 2003, but my sound card and screen rez break again on the Simply Mepis distro. Gofigyuh!
 
Old 08-02-2004, 03:50 PM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,988

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Boot up with the System Rescue cd and get to the command prompt. we're going to make a directory to mount hdb1 on, /mnt/hdb1, and mount it:

# mkdir /mnt/hdb1
# mount -t ext3 /dev/hdb1 /mnt/hdb1

hdb1 is now mounted on /mnt/hdb1.

A few things about partimage. Partimage will not make a directory for you and you must have the path to where you want to put the image file properly designated or partimage will tell you it can't write to the location w/o any explanation as to why. At that point all you can do is exit. Suppose you have a directory on hdb1 called "backup" where you want to put the image file. When telling partimage where to write the image file the path should be:

/mnt/hdb1/backup/<any name you want for image file>

I like to use the date for an image file, so the path would be:

/mnt/hdb1/backup/8_02

For your first time out, make it easy on yourself and try writng the image to:

/mnt/hdb1/8_02

This will place the image file in the root directory of hdb1. Remember, partimage will not make a directory. If you designate a directory in partimage that doesn't exist(or mispell an existing one) you just get an error message and you can't go back and correct it. You have to exit partimage and start all over again.
 
Old 08-02-2004, 07:43 PM   #6
jhecht
Member
 
Registered: May 2004
Location: NYC
Distribution: Puppy Linux - it's dog-gone great!
Posts: 99

Original Poster
Rep: Reputation: 16
Ayup, it works - both from the rescue CD, and booting from the Mepis CD as well. the key is knowing that you MUST give the FULL path as well as the filename you want to create.
That, plus knowing the right syntax makes it (almost) simple.

One note - there are a couple of screens after the option screens at the beginning where there is no obvious 'continue' button/feature. I found I had to hit the 'Enter' button in each one so that partimage would continue.

Could someone talk to a moderator here about putting this thread among the 'official' howto's? I think the use of the partimage 'Image file to create/use' entry line is tricky enough that others will benefit from reading this thread.

Also - if it does get into the 'howto's' - there are some basic assumptions here that should be put at the START of the thread. Like, this is for you IF:
1-You have a working Linux install on your computer.
2-You like it enough to want to back it up.
3-There exists enough space to back it up - either to a different partition on the boot drive, or to a second hard drive that's installed in - or connected to - the computer.

Thanks to K. and H. for making the use of partimage clear to me! I'm not used to _having_ to give full path statements _inside_ a 'GUI' interface...

Last edited by jhecht; 08-03-2004 at 07:59 AM.
 
Old 08-03-2004, 01:47 PM   #7
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,988

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I guess I should tell you how to restore too since there are a few partimage quirks here. Again, you boot up and mount the partition where the image file is located. Keeping the same example as the above, let's say it's in /backup on hdb1 and is named 8_02. One funny thing partimage does is add a trailing".000" to your file name so the image file is ultimately named 8_02.000. You have to include that".000" when you designate the path in partimage. You select the operation you want to perform in partimage using the space bar, not the Enter key. So after opening partimage you navigate down to the "restore" operation using the arrow keys and hit the space bar to select that operation. Then you enter the full path to image you want to use:

/mnt/hdb1/backup/8_02.000

Also, most filesystems have a maximum size for a file, e.g. FAT32 is about 2GB. If your image is larger than that max size, partimage will automatically go up to that limit then create a second file with the file name with a trailing ".001". In this example, the second file would be 8_02.001. It keeps going on like this as necessary depending on the size of the partition your imaging; the third file is 8_02.002, etc. You don't have to worry about these extra files when designating the path as long as they are in the same directory as 8_02.000 which they will be unless you move them after their creation and forget to move one. If you designate the path per the above with 8_02.000, partimage will find the other files automatically and do the restore.

Sometimes after restoring a partition, lilo can get screwed up. In this case, you get a series of 01s or 09s printed out when lilo tries to load. Don't panic if this happens. If your distro has a rescue mode on it's install cds you can use that to rewrite lilo to the mbr and all should be well. If not, you can use the system rescue cd to rewrtie lilo to the mbr using th "chroot" command. Here's how:

1. Boot off the rescue cd and get to a command prompt.
2. You need to create a directroy to mount the root partition where linux is installed and mount it. Suppose your linux root partition is on hda6 and it's ext3. Then you would run the following:

# mkdir /mnt/hda6
# mount -t ext3 /dev/hda6 /mnt/hda6

3. Now that your root partition is mounted on /mnt/hda6 you run the lilo program on hda6 to rewrite lilo to the mbr using the chroot command:

# chroot /mnt/hda6 /sbin/lilo -v

That should do it. When you reboot you should see the lilo selection screen again.


Last edited by kilgoretrout; 08-03-2004 at 02:24 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partimage linuxmandrake Linux - Software 7 12-21-2005 08:59 AM
Added a 2nd Sata Drive installed Fedora Core 5, BIOS Doesn't See 2nd Drive. mtmcc1 Linux - General 3 12-03-2005 04:01 PM
I want to start a prog from another prog but not as child grupoapunte Programming 5 05-23-2005 05:37 PM
Better buying "advanced linux prog" or "unix advanced prog" Dominik Programming 3 12-31-2003 01:11 PM
Help with Partimage please sluggo Linux - General 3 11-25-2003 06:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration