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.
I know I can resize a Windows Partition as I have done it successfully before but now I need to know if anyone knows or has had any problems trying to resize say a "/home" partition to make way for a extra distro to go on harddrive?
I have a harddrive with a /root partion & a Very Large /home partition which I would like to make smaller so I can add another distro.
1) make a backup of the partition you want to resize. you may need to restore it to make that distro bootable again.
2) open a term window and issue the command: init S or init 1 (to go to single user mode: I hope you are comfortable with command-line operations).
3) run cfdisk (probably /sbin/cfdisk: use locate to find it on your distro) to reduce the size of the partition you want smaller, and to create the new partition to take up the space you made available. BE CAREFUL. If you want the new partition/distro to be bootable, you will have to select the Bootable option for the new partition.
4) install the new distro to the new partition. Don't install the bootloader to the MBR, unless you feel competant to edit the bootloadeder config file manually to boot other distros. Install the bootloader to the partition the new distro in installed into, then edit the bootloader config file for the previous distro to add the new distro to it (copy the bootloader config for the new distro to the bootloader config of the existing distro).
You could try installing qtparted - its a GUI which makes it all a bit more user friendly. However my personal favourite is to boot the machine with either a Mandrake/Mandriva install disk or a PCLinuxOS LiveCD and use the excellent Mandrake GUI partitioing program (its in the PCLinuxOS Control Centre on PCLinuxOS) to do it.
Excellent Ideas. I have all the Live distros mentioned ,But I dont think you can resize Linux Patritions with Qtparted only windows ,witch is why I asked about resizing linux, I think BigRigDrivers advice seems to have some basis to it,
I could also be wrong somewhere about qtparted though?
I might research into all this a bit more
Thanks 4 Helping.
I haven't used QTparted. But (and this is a very large but) if it inhereted the limitation of parted, I wouldn't try it. The limitation? Parted requires that the partition which is "The Object" must, MUST, be the same size as "The Target" partition in order to successfully restore a backup.
So. To solve that problem, I use DAR. I searched for four years for a backup solution to do what I wanted it to do (ignoring DAR all along the way). Late last year, I finally looked at DAR.
Damn. Here's what I've been looking for all along. DAR makes archives (each file individually archived, so that if one is corrupt, you risk only one, not the entire archive, as with tar).
DAR also has a skip-ahead feature. If a file, such as a data file (text, spreadsheet, etc) is corrupt, you can restore the non-corrupt part, and re-build the corrupt from other data sources [you still have them, don't you?])
Best part of DAR, vis-a-vis the current topic, is that DAR doesn't care one whit about partition sizes, so long as the target partition is large enough to hold the backup when it is restored.
Files can be compressed 'by extension', or selected for non-compression (because they're already compressed). I've successfully backed up a 6.6 G installation to a 2.7 G archive (the compression is just a little short of 3:1). Can't image life in the Linux world without DAR, unless something better comes along.
There's also KDAR, the Kde port. Haven't tried it yet. DAR is command line. KDAR is GUI.
'nuf said.
Last edited by bigrigdriver; 08-26-2005 at 09:00 PM.
Parted says it can resize ext2/ext3 and Reiserfs partitions, although QTparted claims it can't resize ext2/ext3 (may be outdated). Gparted seems to support more than either of these.
Make sure you have a *GOOD* backup - no, *2* good backups.
Parted is open source, and supposedly supports ext2(/3) - I've never got it to work.
Given that both qtparted and gparted rely on libparted, I've never bothered to try either, although others swear gparted works as advertised.
Me, I just backup everything, delete and recreate the partition(s) as I want, make the filesystem and reload.
Takes longer, but it's my data I'm looking after.
GParted is a _perfect_ GUI tool.
Mandriva's tool is also good.
You can resize it manually with "resize2fs" for ext2/3 and "fdisk".
I've done manual resizing _many_ times without any failure
hda1 can't grow if hda2 abuts it - as it probably does.
Easiest probably to delete the swap, grow hda1, and put a small swap back. This keeps fstab correct - if you need more swap, create another in space freed from hda3, and add it to fstab.
Logical partitions make this (slightly) easier - LVM looks the best solution of all.
I'd do:
resize hda3 to half a size;
create hda4 from appered free space;
copy all file from hda3 to hda4;
since hda1 is root (I assume) you can delete it (because my root contains only files from Install CD);
delete also hda2 and hda3;
now you create swap at the beginning (~400M);
then you create root (no more than 3-4G);
then you create hda3 and copy all files from hda4 to it;
then you delete hda4 and resize hda3 to the end of the disk.
I have ~4G for root and ~27G for /home. So here is what I do:
I create /home/local and link it to /usr/local.
So now when I install an app it installs to /usr/local (i.e. /home/local) and doesn't take valuable root space, but takes space from the biggest partition.
You can do it either manually or using some Live CD.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.