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.
hi!
i have a p4 1.8 ghz with 25 mb of ddr sdram.
i have a 40 gig HDD which is partitioned as follows:
one 20 gig primary partition
the remaining 20 gb constitute the extedned partition.out of this,13 gb is a DOS logical drive.
the remaining 7 gb are under linux (ext3)
that is further divided into a 500 mb swap partition and a 6.5 gb root partition
i hav run out of space on the root partition, now i want to expand it, taking space from the DOS logical partition.i have partition magic 8.0
my question is, will i hav to make any changes in any linux config file if i do it with partiton magic?? will linux recognise the new space added??
and, can i do the same with the swap partition?? i have 256 megs or ram, and people tell me a 500 mb swap partition is too small..is that right??
i tried using the fdisk program of linux, but it didnt work for me..so im sticking to partition magic
Re: resizing linux partitions with partition magic ??
Quote:
Originally posted by funkymunky hi!
i have a p4 1.8 ghz with 25 mb of ddr sdram.
i have a 40 gig HDD which is partitioned as follows:
one 20 gig primary partition
the remaining 20 gb constitute the extedned partition.out of this,13 gb is a DOS logical drive.
the remaining 7 gb are under linux (ext3)
that is further divided into a 500 mb swap partition and a 6.5 gb root partition
i hav run out of space on the root partition, now i want to expand it, taking space from the DOS logical partition.i have partition magic 8.0
my question is, will i hav to make any changes in any linux config file if i do it with partiton magic?? will linux recognise the new space added??
and, can i do the same with the swap partition?? i have 256 megs or ram, and people tell me a 500 mb swap partition is too small..is that right??
i tried using the fdisk program of linux, but it didnt work for me..so im sticking to partition magic
thanx in advance
Mayank
It looks like the 25 mB sdram is actually 256 mB. 500 mB swap is likely more than enough. Try the "free" to see your usage of RAM and swap.
Let me guess: you have added software and /usr has grown, or you have added web content and /var has grown.
A temporary fix is to delete any stuff you do not need. /var/log/ may contain old messages that you have been accumulating. /tmp may be plugging up too, on some systems.
If the DOS and / partitions are adjacent, it should be possible to move the border by modifying the partition table. If you have to split the DOS partition and add part to LINUX, this would require changing some configuration files. Typically, what you would do is modify /etc/fstab so that the new partition get mounted on /usr or /var or somewhere you have run out of space. There are several steps: repartitioning, setting up a Linux filesystem on the new partition, copying files from the old partition to the new, modifying /etc/fstab to show mounting the new partition on the old directory, deleteing the files that have been copied after verifying to free the space, and rebooting. I doubt partition magic will do anything as complicated as that for you, but you can do it yourself. First defragment the DOS partition. Then divide the partition. Use the later part for Linux.
Whether you fear this procedure, or are confident it will work for you, back up any important or valuable data before starting. The surest procedure for a newbie would be to repartition and re-install everything as required.
If you list your partition table in detail, we can be more specific with advice. It might be wise to list the table with fdisk in Linux and with fdisk in that other OS, to make sure everyone is happy in the end. Please show sector addresses and partition sizes and types. Indicate which partition is bootable. You wrote that fdisk did not work. What went wrong, exactly?
the system in question is not here right now, so "fdisk -l " is not possible
i can tell u though, that the dos and the root partitions are adjacent, and partition magic provides the option of resizing the root partition to take over some of the space of the adjacent dos partition...what im not sure abt it what effect it will have on linux...will some config files hav to be altered??
PS...when i made changes with fdisk-i deleted the dos partition and made an ext3 partition in its place-no chnges occured, and when i rebooted in Windows, nothing had changed!
Bravo! You might become a brain surgeon yet. You may have to create a file structure on the partition (PM may have done that). You can try manually mounting the retyped patition:
as root
mkdir /mnt/usr (if /usr is full)
mount /dev/hdawhatever /mnt/usr
To check.
If you need to put a filesystem on it:
mke2fs -j /dev/hdawhatever
The whatevers are the partition number according to Linux.
If this test works, you can copy what files you want into the retyped partition and remount it at boot by modifying /etc/fstab
/dev/hdawhatever /usr ext3 defaults 1 2
Supposing /usr is full, copy /usr over to the new area, and check every file for accuracy.
mkdir /mnt/usr
cp -R /usr/* /mnt/disk/usr
tar c /usr |md5sum -
cd /mnt/disk
tar c usr |md5sum -
The two md5sums should be the same...
If so, you can delete contents of /usr to release space.
cd /usr
rm -fr *
umount /dev/whateverr
mount /dev/whatever /usr
Your system should work normally except /usr is no longer crowded.
Now reboot (after changing /etc/fstab to mount the retyped partition as /usr).
One needs to be very careful doing commands like these as root. One little type could delete the wrong stuff!
Disk /dev/sda: 145.9 GB, 145999527936 bytes
255 heads, 63 sectors/track, 17750 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 534 4289323+ 83 Linux
/dev/sda2 535 7577 56572897+ 83 Linux
/dev/sda3 7578 8621 8385930 83 Linux
/dev/sda4 8622 8875 2040255 f Win95 Ext'd (LBA)
/dev/sda5 8622 8875 2040223+ 82 Linux swap
I want to make a separate partion of 60 or 70 GB... with the present structure..!!
please guide me what i want to doo.. as i ama not an linux expert..!!
The start/end information shows the partitions you have listed are contiguous so you should have a lot of free space from the end of /dev/sda5 to the end of disc.
For some purposes, fdisk is not the best partitioner. You may have cfdisk or sfdisk etc.
In fdisk, you would issue the "n" command to create a new partition and specify the length in units of cylinders or bytes. You can mark the partition type by typing l to list available types and t to mark the new partition's type. You probably want type 83 or Linux. When the partition table as listed by the p command looks right, write it to disc by the w command. Your changes have no effect until you do that. Supposing that your new partition is /dev/sda6, you could put that in your /etc/fstab:
/dev/sda6 /home jfs defaults 0 2
You will want to create a filesystem on the partition using mkfs.
mkfs -t jfs /dev/sda6
Just a reminder... A mistake with this stuff could be fatal. If you put the wrong partition in the mkfs command, you clobber the wrong partition. If you delete stuff from the partition table and then do a w, you lose that from the partition table. It is an excellent idea to save a copy of the partition table so you can get your data back by restoring it if necessary. Take a few moments before pushing enter. Make sure you have enough sleep and are not rushed...
On some systems the changed partition table may not have effect until you reboot. On others, exiting the fdisk programme re-reads the table.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.