Linux - GeneralThis 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
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.
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.
Hi, I wasn't sure whether to post this in General or Newbie.
I've recently installed SuSE 9.0 next to Windows Xp, and it's all working fine. However, I've decided I don't need so much space on C:/, and that I can give it to the Linux partition.
I went to YaST, then Partitioner, and got a stern message telling me not to screw about with partitions if I wasn't an expert and that any change to a mounted partition (which was what I wanted to change) wouldn't be forwarded to the kernel and this was a Bad Thing.
So, I went over to Windows and tried with Partition Magic. I decided to do it step-by-step to make sure it wouldn't go wrong. The first step was to reduce the size of the primary partition C:/. No problem. The second step was to move the beginning of the second primary partition (the extended one) so that the empty space between the two primaries ended up at the beginning of the second (the extended one), ready to be added to the three Linux partitions at the third step. In other words, I didn't actually touch the three Linux partitions; they stayed in the same location.
However, moving the empty space into the extended partition was enough to confuse the boot loader, and the computer no longer booted, so I had to use the Partition Magic diskettes to restore the partitions to their previous configuration.
How should I, then, correctly redistribute this free space? Linux seems rather sensitive to any changes in partition configuration. What factors do I have to take into account while making such changes?
Code:
Current hard-disk structure
|||||||||||||||---////////////////////
Key
| = primary containing Windows Xp
- = free space
/ = (extended) primary containing logical partitions
red = swap
blue = boot
yellow = SuSE
indigo = my files
perhaps if you do what you did before but boot of a linux boot disk, then reinstall your bootloader. I think ( with lilo anyway ) it calculates the offsets of each partition when you install it.
I have never done this myself, but I think it will work.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Why so complicated? Just create another primary partition in the empty space and enter an entry in /etc/fstab. (Up to four primary partitions or three primaries and an extended partition are supported by any system)...
Originally posted by JZL240I-U Why so complicaed? Just create another primary partition in the empty space and enter an entry in /etc/fstab. (Up to four primary partitions or three primaries and an extended partition are supported by any system)...
Well, it's not very complicated; I just explained it very fully.
So, what you're saying it that /etc/fstab is where the partition info is? I'll take a look at that.
However, that doesn't really solve the problem does it? It allows me to create another partition, but what I want to do is increase the size of the existing ones without upsetting the process of booting.
While I'm at it, here are more questions:
SuSE has three partitions.
Swap, with 1 gig (twice the RAM)
Boot, with 100 megs hardly used
The main one, with 7 gigs, quickly filling up with stuff
Would the computer benefit from more swap space? Does the boot partition really need all its space or can I reduce it?
Last edited by DavidAdventurer; 06-01-2004 at 05:04 PM.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally posted by DavidAdventurer Well, it's not very complicated; I just explained it very fully.
Well, not really . Why is it necessary to put your "stuff" somewhere into the same partition as /? Be that as it may...
Quote:
Originally posted by DavidAdventurer So, what you're saying it that /etc/fstab is where the partition info is? I'll take a look at that.
It is. Do.
Quote:
Originally posted by DavidAdventurer However, that doesn't really solve the problem does it? It allows me to create another partition, but what I want to do is increase the size of the existing ones without upsetting the process of booting.
Okay. In principle I can't find fault with your reasoning how to proceed (first post). Try this: first use Partition Magic to make XP smaller. Then there is the program "parted" or "qtparted" from the Linux side. Type these in at the command line and try the resizing from the linux side, perhaps that will work including a working boot-loader. If not, use the start disk of SuSE, say install at the first screen. SuSE will then detect your existing system and offer to repair it. Use expert modus and tell it to restore the boot loader. Principally kinasz's is right, you could do it from the command line with something like "grub-install" (man grub-install for the parameters).
Quote:
Originally posted by DavidAdventurer ... Would the computer benefit from more swap space? Does the boot partition really need all its space or can I reduce it?
No more swap. With 512 MB RAM your system will almost never swap, exception: you are running extremely resource-hungry applications?!? If you want to inspect this search this site for "swap" and "monitor" or some such, there are a lot of threads on that subject ...
You can reduce /boot but you will only gain a few (50?) MB, it's already small in the first place.
The easiest way to solve your problem is to create a new partition and format it with ext2, FAT. FAT would be reasonable - so your windows installation can also use the partition if needed.
Next step: Create a new folder (directory) in your home directory (e.g. NewDisk). Then mount your new partiotion to this directory with -t vfat switch. If you are a non english user you should also define a windows compatible codepage for this partition so you can use special chararacters in Linux and in Windows.
If you really think you want to mess with resizing partions, you must have a lot of spare time at your disposal.
Originally posted by JZL240I-U Well, not really . Why is it necessary to put your "stuff" somewhere into the same partition as /? Be that as it may...
I now understand that I could create a partition for each directory that might beed space and then assign mount points such as /usr, /opt, /home, /etc etc to them. But wouldn't that be crazy? I can't know now which directories are going to end up with things in them as programs are installed, logs are created, etc. I'm just starting to study the operating system. I just want the / partition to be large enough to accommodate all the directories within it as they grow and shift.
A separate issue is the directory with my music, documents, etc. That is on a FAT32 partition at mount point /Files for SuSE and F:/ for Xp.
Quote:
Originally posted by JZL240I-U
Okay. In principle I can't find fault with your reasoning how to proceed (first post). Try this: first use Partition Magic to make XP smaller. Then there is the program "parted" or "qtparted" from the Linux side. Type these in at the command line and try the resizing from the linux side, perhaps that will work including a working boot-loader. If not, use the start disk of SuSE, say install at the first screen. SuSE will then detect your existing system and offer to repair it. Use expert modus and tell it to restore the boot loader. Principally kinasz's is right, you could do it from the command line with something like "grub-install" (man grub-install for the parameters).
[/B]
I've worked out how to move things around without making the system unbootable. The boot loader seems to have a problem with free space being in the extended partition before the first logical partition. It doesn't, however, seem to have any problem with free space anywhere else, so I've been able to move the extended partition towards the beginning of the disk, and take the swap and boot logical partitions with it. So, the free space is now between /dev/hde6 (mounted as /boot) and /dev/hde7 (mounted as /). This is good because / is what I want to give this space to. However, Partition Magic refuses to resize / to eat up the space, or even move it so that the space is to the right. I have found that I can trick PM into moving it to the left by using the redistribute space wizard (the resize command is blocked for this partition), but this has the bizarre side-effect of changing the partition type to "MINIX/Linux" from "Linux Ext2". Note that the partition is really Reiser, not Ext2. Will letting PM change the partition type have any negative effect?
I'm now going to boot up with the SuSE installation CD to see if I can do any better there.
Quote:
Originally posted by JZL240I-U
No more swap. With 512 MB RAM your system will almost never swap, exception: you are running extremely resource-hungry applications?!? If you want to inspect this search this site for "swap" and "monitor" or some such, there are a lot of threads on that subject ...
[/B]
OK, I'll keep it small.
Quote:
Originally posted by JZL240I-U
You can reduce /boot but you will only gain a few (50?) MB, it's already small in the first place. [/B]
Originally posted by Sohni The easiest way to solve your problem is to create a new partition and format it with ext2, FAT. FAT would be reasonable - so your windows installation can also use the partition if needed.
Next step: Create a new folder (directory) in your home directory (e.g. NewDisk). Then mount your new partiotion to this directory with -t vfat switch. If you are a non english user you should also define a windows compatible codepage for this partition so you can use special chararacters in Linux and in Windows.
If you really think you want to mess with resizing partions, you must have a lot of spare time at your disposal.
Compatibility for characters? How do I go about doing that?
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally posted by DavidAdventurer I now understand that I could create a partition for each directory that might beed space and then assign mount points such as /usr, /opt, /home, /etc etc to them. But wouldn't that be crazy?...
That depends on your backup strategy. I actually do that, also because I want to contain possible harddisk errors in manageable chunks of data.
Quote:
Originally posted by DavidAdventurer ... I can't know now which directories are going to end up with things in them as programs are installed, logs are created, etc....
Originally posted by DavidAdventurer ... I've worked out how to move things around without making the system unbootable. ...
Good for you .
Quote:
Originally posted by DavidAdventurer ... However, Partition Magic refuses to resize / to eat up the space, or even move it so that the space is to the right. I have found that I can trick PM into moving it to the left by using the redistribute space wizard (the resize command is blocked for this partition), ?...
That's why I suggested parted / qtparted in my previous post...
Quote:
Originally posted by DavidAdventurer ... but this has the bizarre side-effect of changing the partition type to "MINIX/Linux" from "Linux Ext2". Note that the partition is really Reiser, not Ext2. Will letting PM change the partition type have any negative effect??...
Yes, that might definitely create problems. You might reset the type of the partition with fdisk, but when PM screws up even the system information of the partition what is it doing to the data contained thereon?
Quote:
Originally posted by DavidAdventurer ... Every MB counts!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.