LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-04-2006, 07:36 AM   #1
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30
Blog Entries: 3

Rep: Reputation: 15
2006 root partition full. How resize during installation and keep /home intact?


Hi there,

This newbie has been running Mandriva 2006 for some time now, finding it an excellent tool. However, I tried to install KDE 3.5 and ended up in a re-install situation (it is a long and boring story). Stupid me didn't back up the /home partition first, so I have months and months of blood, sweat and tears that I am desperately trying to rescue.

My plan of action was to turn the system into a reasonably working one, so I could copy my stuff onto an USB-drive, which I just purchased for the purpose, and then make a clean re-install.

Now I am trying to re-install the system to get something working. The distro allows you to select which partitions to format for installation, but there is one problem: I can't install anything since the partition is still full, but, apparently, I can resize it. I assume this means I'll lose everything in that partition. I can live with that (although not with a smile), but losing my documents and stuff would be devastating. I dare not push the "resize" button and continue. I have specified hda5 (which is my / partition) as the one to format. Then I continued with the installation but got nowhere since the partition is still full.

I also appear to have an "other" partition and an "empty" partition. None of those is the Windows partition. I would like to get rid of the empty one (or both) to use for Linux. How would I do that?

Thank you for your help.
 
Old 01-04-2006, 03:12 PM   #2
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
ok stop everything

download knoppix or some other liveCD boot with that, mount your hard drive and usb drive and copy away.
 
Old 01-04-2006, 03:38 PM   #3
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Hi, Finlay,

Thank you for your response.

I'm afraid I tried that. I had an Ubuntu (5.04) live CD lurking, and I tried that. The system boots and everything, but when I try to access /home and list it, I only get /home/ubuntu, and there is nothing there. What you say makes sense, though, but I'm afraid my knowledge of command line Linux surfing is extremely insufficient. Care to fill me in? I think Ubuntu actually caused some of the problems, but I cannot be sure. Before I used Ubuntu, I could at least get to the Mandriva command line, but first time after that I tried to boot up, Mandriva complained about the disk organisation being corrupt. Until today, when my drive arrived, the computer has been hibernating since. I'll try to mount the HD, though. Keep your fingers crossed.

Bengan
 
Old 01-04-2006, 03:42 PM   #4
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
once you have booted ubunto type in:

cat /proc/partitions

this will list your hard drive and it partitions.

you will then need to create a folder: mkdir foldername

then you will need to mount your hard drive partition that contains your /home folder:

mount /dev/hda2 /foldername

replace the hda2 and foldername with appropriate values

then: cd /foldername

let me know if you need any more info

oh and you will need to mount the usb drive
 
Old 01-04-2006, 04:15 PM   #5
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Thanks a lot for the additional information. I have managed to mount both the Windows partition, the USB drive, and the /home partition. What I need now is to re-format the USB drive to get rid of the Windows formatting and create a native Linux drive. It appears as SDA1. I've got an old book on Linux, but at the time it was written, USB was a mere twinkle in somebody's eye. How would I go about formatting the drive?

Sorry to bother you with basic questions like this, but, like I said, I am a beginner at this.
 
Old 01-04-2006, 05:02 PM   #6
TSloth
Member
 
Registered: Oct 2002
Location: Houston, Texas
Posts: 97

Rep: Reputation: 15
You don't need to reformat the USB drive.
As root (using the su command) mount the old home partition. (I know you have already done this buy I include it for the next reader.)
I usually look in /etc/fstab to see if Linux has detected it.
It will look something like this:
/dev/hda2 /mnt/hda2 ext3 ...etc...
Your mount command would simply either one of these:
# mount /dev/hda2
# mount /mnt/hda2
Then go look in /mnt/hda2 and see if it looks like your home directory. If not, one of the other partitions listed in /etc/fstab might be it.

Check to see if your USB device is mounted.
# df -m
This will list all of the mounted partitions and their sizes in megabytes. Your USB device will usually be mounted on /mnt/sda1 or /mnt/removable or similar.

Use the tar command to copy your home partition into a single file on the usb device. Example:
# tar cvfz /mnt/sda1/home.tarz /mnt/hda2
This cvfz means: c=create v=verbose z=compress f=filenamefollows
You can leave off the v if you don't want to see a long list of filenames go by.
When this tar command is done, you will have a single file (home.tarz) in /mnt/sda1

When you want to restore the files, mount your USB device and your new partition (let's say it's /dev/hda2 mounted on /mnt/hda2 again), Change your default directory to /mnt/hda2, and (as root) type:
# tar xvfzp /mnt/sda1/home.tarz
and it will extract all of the files from /mnt/sda1/home.tarz to the currect directory.
The options are: x=extract v=verbose f=filenamefollows z=(un)compress p=preservepermissions
The "v" option will cause a long list of files to be displayed at your terminal. In this case it just gives you a good feeling that all of your files are being copied.

Then check to see what you have in /mnt/hda2. There is a good chance that you'll actually have /mnt/hda2/mnt/hda2/whatever, so you'll want to move (using the "mv" command) everything from /mnt/hda2/mnt/hda2 to just plain /mnt/hda2 using a command like this:
# mv /mnt/hda2/mnt/hda2/* /mnt/hda2

Hopefully someone who knows the tar command better than I do will reply with the correct tar usage to avoid this last step!

- TSloth
 
Old 01-04-2006, 05:43 PM   #7
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Brilliant!!! I am right now in the process of copying my treasure to the USB drive. I have some problems with the Swedish character set in file names, which is not recognised by the Ubuntu system, but I might get around it somehow. I got the most important files copied anyway. Keep your fingers crossed.

Thank you again for all information.

Bengt
 
Old 01-06-2006, 07:37 PM   #8
rrsc16954
Member
 
Registered: Sep 2003
Location: Edinburgh, Scotland
Distribution: Kubuntu 12/4
Posts: 214

Rep: Reputation: 30
I hope you rescued your stuff, Bengan. I know how you feel - my hard drive died a few weeks ago.

In your situation I think a viable option would have been a re-install of Mandrake, choosing to re-format only the root partition and NOT the home partition.

This would have given you a fresh install of whatever version of Mandriva with whatever desktop options you wanted, and all your data and settings should have been saved.

I have re-installed umpteen times without losing data/settings. Not a guarantee, just experience!
 
Old 01-06-2006, 11:47 PM   #9
TSloth
Member
 
Registered: Oct 2002
Location: Houston, Texas
Posts: 97

Rep: Reputation: 15
rrsc16954 has a very good point (immediately above)...
If you install Mandriva you can ask for custom partitioning and it will show you the partitions you have and ask you which ones you want to use as /home, /, etc.
It will give you the option to keep or format (wipe out) each partition. This is one very good reason to have /home separate from other partitions. Sometimes it's handy to have a separate /boot partition too, if you have heavily customized your lilo or grub and don't want to lose it. If you have a simple system (one Linux and zero or one MSWindows, then most distros can figure out the proper lilo or grub settings.
 
Old 01-07-2006, 05:22 AM   #10
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Yes, that is correct, TSloth. However, there is an empty partition that I would like to include into the system. I haven't been able to do that yet.
 
Old 01-07-2006, 08:16 AM   #11
rrsc16954
Member
 
Registered: Sep 2003
Location: Edinburgh, Scotland
Distribution: Kubuntu 12/4
Posts: 214

Rep: Reputation: 30
If you know how you could do that at the re-install? I have tried installing extra partitions with Mandriva but it doesn't seem to love them. Mandrake likes 3 partitions: root, swap and home - this is what it does if you auto-partition.

When I have gone from another distro with more partitions back to Mandriva, it won't use the other partitions and I don't like to argue with it.

You could do a re-install and delete the extra (free) partition and the root partition to make a new bigger root partition, couldn't you? Just a thought...
 
Old 01-07-2006, 11:29 AM   #12
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Yeah, I've tried that. When I click the representation of the empty partition, it tells me to click Delete. If I then click delete, it deletes one of the other partitions instead. Not exactly what I had in mind... And, by the way, I managed to rescue the /home partition. I did it as a root using a Knoppix disk. I first tried the Ubuntu live CD, but it didn't like the funny Swedish characters in the filenames. Knoppix didn't complain, though. Now I have re-installed the Mandriva distro again, but still keep losing KDE when I try to upgrade to 3.5 (from 3.4), but that's a different problem.

Last edited by Bengan; 01-07-2006 at 11:33 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
resize root partition after install Phyrexicaid SUSE / openSUSE 2 08-31-2005 03:38 AM
/home partition full mgichoga Debian 4 07-31-2005 08:03 AM
/home partition full (but) it's not on reboot reddazz Linux - Security 2 02-03-2005 08:12 AM
Resize root partition via reinstall dubya Fedora 0 12-05-2004 01:00 PM
how to resize my /root partition Perfekt Linux - Software 4 12-23-2003 09:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 02:06 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration