LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem setting up partitions (https://www.linuxquestions.org/questions/linux-newbie-8/problem-setting-up-partitions-810905/)

nickjbanks 05-29-2010 06:42 AM

Problem setting up partitions
 
Hi, I think something has gone wrong with my attempt at setting up a new partition. I have two HDDs, initially one was divided into two partitions. I shrank the second partition using resize2fs from a live cd and am trying to create a third partition. I have been trying to follow this: http://www.howtoforge.com/linux_resi...xt3_partitions

Here is the output of fdisk -l and df -h:

xebian:~# fdisk -l

Disk /dev/ide/host0/bus0/target0/lun0/disc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/ide/host0/bus0/target0/lun0/part1 1 32 257008+ 1 FAT12
/dev/ide/host0/bus0/target0/lun0/part2 * 33 2089 16522852+ 83 Linux
/dev/ide/host0/bus0/target0/lun0/part3 2090 9729 61368300 83 Linux

Disk /dev/ide/host0/bus0/target1/lun0/disc: 250.0 GB, 250059350016 bytes
240 heads, 63 sectors/track, 32301 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/ide/host0/bus0/target1/lun0/part1 * 1 32301 244195528+ 7 HPFS/NTFS

xebian:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part2
15G 1015M 14G 7% /
tmpfs 29M 0 29M 0% /dev/shm
/dev/ide/host0/bus0/target1/lun0/part1
230G 105G 123G 46% /xbox2share

catkin 05-29-2010 07:13 AM

Quote:

Originally Posted by nickjbanks (Post 3985233)
I shrank the second partition using resize2fs ...

resize2fs shrinks the file system, not the partition. The procedure is to shrink the file system and then shrink the partition to not less than the size of the file system. An easy way to get the file system to fill the partition is a) shrink the file system to less than the desired final size b) shrink the partition to the desired final size c) use resize2fs again without telling it the size; by default it re-sizes the file system to the partition size.

syg00 05-29-2010 07:48 AM

That guide is pretty old - not entirely wrong, but things have changed.

Anyway, what was your question ?.

nickjbanks 05-29-2010 07:51 AM

Quote:

Originally Posted by catkin (Post 3985256)
resize2fs shrinks the file system, not the partition. The procedure is to shrink the file system and then shrink the partition to not less than the size of the file system. An easy way to get the file system to fill the partition is a) shrink the file system to less than the desired final size b) shrink the partition to the desired final size c) use resize2fs again without telling it the size; by default it re-sizes the file system to the partition size.

I think that is what I did. I followed the instructions in the link above. I was following pretty blindly so I might be completely wrong.

onebuck 05-29-2010 07:51 AM

Hi,

I will add to what 'catkin' has said. Since you say that a LiveCD (which one) was being used then possibly 'Parted Magic', 'qtparted' or the like can be used to re-size with ease.

Also I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem.

You should place your data or lists within the vbcode tags # or Quote to make your posts cleaner therefore easier to read.

:hattip:

nickjbanks 05-29-2010 07:55 AM

Quote:

Originally Posted by syg00 (Post 3985299)
Anyway, what was your question ?.

I'm not sure the new partition (/dev/hda3) is set up properly. The folder I am trying to mount to it doesn't show up but I'm not really sure how to check. I'm used to Windows with pretty pictures of folders, I've no real idea if /dev/hda3 is there or not

syg00 05-29-2010 08:14 AM

You have to careful to separate (in your head) partition and filesystem.
You have created a new partition - an empty partition. To use it you need to format a filesystem within it - think format in Windoze. Most distros have GUIs that'll do it for you these days.

nickjbanks 05-29-2010 08:32 AM

Thanks syg00. I've just used mkfs and it looks good so far. I'm accessing the computer via PuTTY from my laptop so I'm not sure if I have any gui options. I've just rebooted and the other directory has now mounted to /dev/hda3 without any errors so I think all is now good. Time to stop fiddling before I break something.


All times are GMT -5. The time now is 09:10 AM.