LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2003, 01:16 PM   #1
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Blog Entries: 14

Rep: Reputation: 35
Resizing root partition


I've got a problem which I'm not sure I want to tackle without first gathering some opinions of not so new bies.

I want to install kernel source files but apparently my root partition isn't large enough; the test installation says something to that effect and indeed the partition root uses is over 90% full. I could probably delete enough data there to make space but that would only postpone the problem. So I'm thinking of resizing the partition.

First, here's my fstab as far as harddisks are concerned:

/dev/sda1 / ext3 defaults 1 1
/dev/sda6 /home ext3 defaults 1 2
/dev/sdb1 /mnt/WinC vfat defaults 0 0
/dev/sdb5 /mnt/WinD vfat defaults 0 0
/dev/sdb6 /mnt/WinE ext3 defaults 0 0
/dev/sda5 swap swap defaults 0 0

And here's what df says:

Dateisystem Größe Benut Verf Ben% Eingehängt auf
/dev/sda1 2,3G 2,0G 157M 93% /
/dev/sda6 1,5G 906M 607M 60% /home
/dev/sdb1 5,7G 2,6G 3,1G 46% /mnt/WinC
/dev/sdb5 5,8G 4,5G 1,3G 78% /mnt/WinD
/dev/sdb6 5,7G 33M 5,4G 1% /mnt/WinE


sda1 is my root partition; sdb6 is a former Windows partition which I have cleaned out. I am thinking of moving the swap partition sda5 to some 500 MB of sdb6 and using the remaining 5 GB for an eventual VMWare Win 98 emulation.

How can I

a) remove the swap partition sda5;

b) append its space to sda1 or make it available to root otherwise;

c) make a 500 MB swap partition on part of what is now sdb6;

d) keep the rest of sdb6 alive for a VMWare partition?

Robin
 
Old 09-09-2003, 05:28 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It should be quite easy with DiskDrake. Just think before clicking! You may delete important data by accident!

I suggest something simplier:
1) Resize hdb6 ( 500MB smaller)
2) Create new swap
3) Delete old swap
4) Add free space to / (resize option).
 
Old 09-10-2003, 09:44 AM   #3
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416

Original Poster
Blog Entries: 14

Rep: Reputation: 35
Thanks, that worked well - at least steps 1 - 3. But Diskdrake won't let me unmount / at all, which I have to in order to get the option to resize it, and I think that would be like sawing through the branch I'm sitting on anyway, wouldn't it?

So how could I go about this part? Is it possible to copy the content of / to another partition and make it / for a while, then unmount the old /? Or a boot disk? If that, what has to be on it?

Robin
 
Old 09-10-2003, 09:50 AM   #4
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
You can copy / to another partition, and you have boot disk in the form of your bootable cd. Not sure if you'll be able to run diskdrake from it.
 
Old 09-10-2003, 09:55 AM   #5
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416

Original Poster
Blog Entries: 14

Rep: Reputation: 35
Do I actually have to copy the files from / if I use a bootdisk?

Robin
 
Old 09-10-2003, 01:53 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
Originally posted by bitpicker
Thanks, that worked well - at least steps 1 - 3. But Diskdrake won't let me unmount / at all, which I have to in order to get the option to resize it, and I think that would be like sawing through the branch I'm sitting on anyway, wouldn't it?

So how could I go about this part? Is it possible to copy the content of / to another partition and make it / for a while, then unmount the old /? Or a boot disk? If that, what has to be on it?

Robin
Do you have your install cd? Boot in the installation mode (not rescue). In the partitioning phase you can reise / (it's not mounted). Then reboot from the cd, rescue mode (to reinstall LILO/GRUB). If unsure how to do this, write (it was mentioned many times and is quite easy with MDK).
 
Old 09-10-2003, 03:03 PM   #7
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416

Original Poster
Blog Entries: 14

Rep: Reputation: 35
Doesn't resizing during the partitioning phase of the installation delete the data in /? If it does, what exactly (which directories) do I have to copy elsewhere? For instance, I can't very well copy /mnt/WinE to /mnt/WinE (I tried - I just copied everything from / to /mnt/WinE, and yes, the computer crashed...).

I feel exceedingly stupid. My books tell me lots about creating new partitions, but resizing doesn't get mentioned. I'm not even sure I really need it - is there a way to take the 470MB now free and unassigned and allocate it to / without adding it to the actual partition?

I'm really having a hard time getting my head around some of the core concepts, it seems.

Robin
 
Old 09-10-2003, 03:06 PM   #8
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416

Original Poster
Blog Entries: 14

Rep: Reputation: 35
One thing I tried was make Diskdrake set up the former /winE as /; there appears a dialogue which gives the option to move all files from / to /WinE (then /) but when I tried that the computer performed a reset.

Robin
 
Old 09-10-2003, 03:49 PM   #9
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416

Original Poster
Blog Entries: 14

Rep: Reputation: 35
Damn, apparently I just killed my Linux system.

It seems that all the above partitioning has left the system somewhat unstable - when I tried to open a CD ROM the system just resetted the computer. I had a couple of resets at other times, once while loading KDE, once while traing to get diskdrake to show me the data for /WinE... So I tried the option of repartitioning from the boot CD.

There were six options or so, and I chose 'user defined'. This gives me the diskdrake interface with no partitions mounted - but resizing for / only allowed downsizing instead of enlarging, even though the 470 MB or free space next to it were shown correctly. I could have set up something in there, but I couldn't add the space to any other partition already in existence.

The program forced me to reassign / to a partition, and I asigned it to the previous /; to the effect that it then wanted to reformat sda1, which I didn't do; instead, I reset the computer.

On next boot fsck failed to be able to check the system (system check was forced) and dropped me to a shell mumbling about a superblock larger than the physical size of the partition. As a consequence Linux now no longer boots; apparently I have to reinstall.

I'd like to know whether I can reinstall it at least without destroying /home/robin, my user partition, which still has all its data; I can see it using Ext2FS Anywhere from Windows, everything is still ok there, and apparently the content of my previous / is still in WinE, too, so not all is lost. But what can i do about this superblock problem?

Robin
 
Old 09-11-2003, 11:58 AM   #10
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
When you copy to WinE, if it's a Windows partition, you lose permission info that Windows doesn't support. You should have mounted your windows partition as "umsdos" instead of "vfat". Then when you copied, the lost info would have been preserved. You can reformat and reinstall safely. Just don't destroy or format your home partition during installation.
 
Old 09-12-2003, 07:26 AM   #11
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416

Original Poster
Blog Entries: 14

Rep: Reputation: 35
Actually I had emptied WinE and made it ext3; but as usually when it rains it pours, so while my Linux system wasn't running anymore a security patch from Microsoft actually killed my Windows, too - so I have simply started from scratch this morning, giving Linux more space and a more sensible set of partitions. My /home files rest securely in the old WinE for the moment which is the only partition I have left untouched.

While this wasn't the simple solution I had in mind I feel I have learned quite a bit during this process, so thanks everyone for your replies!

Robin
 
  


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
LVM: Resizing the root partition fulat2k Linux - General 6 01-08-2012 04:35 PM
Resizing Root Partition gerowen Linux - Software 5 10-09-2005 04:36 AM
Resizing Root partition without data loss dysfunction Linux - Newbie 3 09-30-2004 01:50 PM
Resizing root partition?! black hole sun Mandriva 6 07-16-2004 12:00 AM
Resizing a root reiserfs partition Insodus Linux - General 2 09-16-2003 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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