LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-16-2004, 03:43 AM   #1
stuart
Member
 
Registered: Jun 2004
Location: aussie in germany
Distribution: mandrake 10 powerpack
Posts: 104

Rep: Reputation: 15
Need to backup then restore a linux partition


Hi peoples, i'm not the most uber linux user(about 3 weeks old) but im managing quite well so far....I have read a bunch of threads on backing up linux partitions and restoring them on other drives etc, but all of the threads and guides i've read are assuming that the linux partitions will be the only ones on the drive that the patitions will be restored to. So here's my dillema

I currently have a laptop with an 80 gig HDD partitioned as

/hda1 75 gig NTFS - WinXP

/hda1 4.5 gig ext3 - Mandrake10

/hda1 0.5 swap


I want to repartition this to

/hda1 30 gig NTFS - WinXP

/hda1 49.5 gig ext3(or reiser, not sure on that yet) - Mandrake10

/hda1 0.5 swap


I really really want to be able to backup my entire 4.5 gig ext3 partition, and then reapply it to my new 49.5 gig ext3 partition. So i don't have to reinstall anything afterwards. Making the partitions is not the issue as i can install windows first then use partition magic to make the 49.5 ext3fs partition or i could even start the mandrake install, do the partition piece apply it then exit so that's no problem.

I guess i just need to know can i backup my 4.5 gig partition, then i need to just put it back in there on the 49 gig partition as though nothing had changed.....and i need to get lilo installed again also.....will i be able to do this from within windows?? as im not gonna be able to get into linux without lilo installed....or are I??

I have an external drive i can use to back this partition up to, and its 60 gig and i can access it in linux fine as it uses fat32 FS(so it reads under windows and linux) so more than enough space there


any info or input into what i should do on this issue would be great if anyone can provide it

EDIT: i have the LILO reinstall issue resolved, using the slackware cd.

Last edited by stuart; 07-16-2004 at 03:54 AM.
 
Old 07-16-2004, 05:02 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Can you reformat that external drive?
If there is stuff on it, I suggest copy it to hda1. Then create an ext2-partition on the external drive. Copy your 4.5 GB partition here (normal file copying).
(If you copy to a Windows-filesystem you'll lose attributes on your files, I don't think your system would survive that.)
Then repartition hda and copy back.
...Ooopss... Problem! If you needed to copy things from exteernal to hda1, you must copy it back to external before repartitioning. Hope you don't need to bother about Windows attributes on those files?

When you do the copying, best is not to boot the system you are about to copy. Some special files are created at bootup and can't or shouldn't be copied.
 
Old 07-16-2004, 05:34 AM   #3
stuart
Member
 
Registered: Jun 2004
Location: aussie in germany
Distribution: mandrake 10 powerpack
Posts: 104

Original Poster
Rep: Reputation: 15
Thanks for your reply,

Yes i can format the external drive with ext2 or whatever filesystem (i can back the files up to a spare pc on my network)

I can just copy the files to the external drive then??? in Xfree or just from the prompt? i didnt realise i could just straight copy the whole system out then copy the system back in again and it wouldbe fine??

A small issue is this after i copy the system to the external drive, i will install windows first on hda1, can i copy the files back into the linux partition in windows? or how would you propose i do that? as i wont have a linux system installed yet to do it in? (because i dare say it wont work doing it in windows) come to think of it that will probably be the case to copy it to external first, can it be done in windows as you said not to boot into the OS you want to copy....

thanks for your help
 
Old 07-16-2004, 06:27 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
No, you can't do that from Windows - not that I know, anyway.
No, I was thinking maybe you could run from a CD, something like Knoppix. Or if you can't download that much (it's a bit of overkill) try some floppy-based didtro like HAL91 or tomsrtbt. Don't know where to find them, search the net.
But I believe Mandrake gives you a commandprompt from the installationCD: press <ctrl>+<alt>+<F4> and you should have a prompt. If not, try <F1> - <F6>.
You will have to work with a command-prompt and mount the partitions manually. Then copy.
I have done this several times, it _almost_ always work. But there is always a risk with it.
Could use the 'dd' command too, I'm not very familiar with it. It has been discussed here recently, though.
 
Old 07-16-2004, 06:30 AM   #5
stuart
Member
 
Registered: Jun 2004
Location: aussie in germany
Distribution: mandrake 10 powerpack
Posts: 104

Original Poster
Rep: Reputation: 15
ok thanks for your reply, im pretty sure mandrake will boot to the prompt from the cd, and mounting the drives should be no issue either, i will research it a little more then give it a shot

thanks again
 
Old 07-16-2004, 07:30 AM   #6
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
You can copy from within the system. Just boot into your Linux and use the "cp" function. The /proc filesystem is virtual, so it won't copy. You'll need to make a new /proc (mkdir /proc) and the first boot intot the system will populate it. You're looking for [url=http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/]this[/url. Follow the instructions and you'll have no problems. I just did it a few days ago. My situation was the same, but I had backed up to another partition on the drive (my small slice reserved for windows - lol). It worked like a charm, even with a reinstall of Win. Good luck
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to backup and restore a multiple partition hd? jharris1993 Linux - Software 9 03-18-2006 01:41 PM
Windows partition backup/restore golinari Linux - General 6 02-20-2005 02:26 PM
Why can't I restore a partition table backup containing a reiser partition? oldweasel Linux - Software 2 05-23-2004 12:11 AM
using dd to backup/restore windows partition win32sux Linux - General 9 01-26-2004 03:27 AM
How to backup and restore a working Linux System redwolf Linux - General 3 07-27-2003 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:41 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