LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   making new partition (https://www.linuxquestions.org/questions/slackware-14/making-new-partition-309622/)

tavixor 04-04-2005 10:57 AM

making new partition
 
Hello!

I want to do a new partition to my hda disk (already whole linux and swap). So how i can cut some space, let say 10GB, from my hda1? Or do i have to delete entire partition and recreate it and then create that third partition ? I was just thinking if i delete hda1 so could it mess up my linux.

thanks in advance !

keefaz 04-04-2005 11:01 AM

Post the ouput with :
Code:

/sbin/fdisk -l
(l as L in lower case)

Nobber 04-04-2005 11:05 AM

You could try parted.

I've never tried it, though, so I will say no more!

tavixor 04-04-2005 11:11 AM

Disk /dev/hda: 123.5 GB, 123522416640 bytes
255 heads, 63 sectors/track, 15017 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 172 15017 119250495 83 Linux
/dev/hda2 1 171 1373526 82 Linux swap

Partition table entries are not in disk order

Disk /dev/hdg: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdg1 1 24321 195358401 7 HPFS/NTFS

Disk /dev/hdh: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdh1 1 14946 120053713+ 7 HPFS/NTFS

keefaz 04-04-2005 11:32 AM

Ok you have no free space in hda to create another partition

As mentioned you could use parted, I used it once to resize a partition
Please, keep in mind that there is a risk to loose all your data, it worked just fine
for me though

To do this, you have to boot from a bootable linux cdrom (or floppy) with the
parted program inclued, then issue the following commands
Code:

parted /dev/hda
(parted) print
# output should like :
Minor    Start      End    Type      Filesystem  Flags
1          xxx        xxx    primary  linux-swap
2          xxx        xxx    primary  ext3

At this point, note the Start number for hda2 (the second line, second column)
Then issue this command :
Code:

(parted) resize 2 XXX 8000
(parted) quit

2 is the minor number of the partition (hda2), XXX is the start number you noted previously
and 8000 is the new partition size in megabytes (for example)

Then remove your cdrom and reboot, hopefully it worked

[edit]
It seems that from your output, the swap partition is hda2...
(I did not read it well)
So you will have to delete hda2 first, then resize hda1
then create a new hda2 partition starting at the end number for hda1
(use the print command after each operation and use the help command too)

PhilD 04-04-2005 11:53 AM

There is also a gui for parted called qparted. It is included on Knoppix I know. It looks almost exactly like partition magic and works just as well. I have even manipulated NTFS partitions for XP with it with no problems.

If you like little bars to drag around to move or resize partitions I would recommend this!

PhilD

tavixor 04-04-2005 12:36 PM

Thanks for every one !
I will give a try when i found a working floppy disk drive :).
I tried qtparted but when i ran make install it gives a error something like this "cannot compute sizeof (char *), 77 see config.log blablabla". I'm so tired right now so maybe i try to fix it anothertime.


All times are GMT -5. The time now is 03:05 PM.