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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-09-2003, 01:16 PM
|
#1
|
Member
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Rep:
|
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
|
|
|
09-09-2003, 05:28 PM
|
#2
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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).
|
|
|
09-10-2003, 09:44 AM
|
#3
|
Member
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Original Poster
Rep:
|
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
|
|
|
09-10-2003, 09:50 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194
Rep:
|
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.
|
|
|
09-10-2003, 09:55 AM
|
#5
|
Member
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Original Poster
Rep:
|
Do I actually have to copy the files from / if I use a bootdisk?
Robin
|
|
|
09-10-2003, 01:53 PM
|
#6
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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).
|
|
|
09-10-2003, 03:03 PM
|
#7
|
Member
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Original Poster
Rep:
|
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
|
|
|
09-10-2003, 03:06 PM
|
#8
|
Member
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Original Poster
Rep:
|
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
|
|
|
09-10-2003, 03:49 PM
|
#9
|
Member
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Original Poster
Rep:
|
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
|
|
|
09-11-2003, 11:58 AM
|
#10
|
LQ Guru
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194
Rep:
|
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.
|
|
|
09-12-2003, 07:26 AM
|
#11
|
Member
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 07:12 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|