Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add partition/volume

Status
Not open for further replies.

roeiboot

Technical User
Feb 10, 2002
241
US
oi~

i have a Linux Redhat 7.1 machine up & running, when i installed RH i used half the harddisk.. now i want to add the othre half which is still a Windows partition, how can i add that part of the harddisk so Linux sees & uses it.

thanks.
 
you have to use
fdisk
mkfs
mount
(and edit /etc/fstab)

For example if you have the 3rd partition on primary IDE:


$fdisk /dev/hda
/dev/hda is the 1st IDE
check what you chenge the type of FS for /dev/hda3

$mkfs /dev/hda3
$mkdir /IDE1_3
$mount /dev/had3 /IDE1_3

Now you should be able to use the 3rd partition from the 1st IDE.


add in /etc/fstab a line like:
/dev/hdb3 /IDE1_3 ext2 defaults 1 2


Hope this helps, and I didn't miss something.

PM


__
___
 

Do you want to be able to read your windows stuff or to delete it and use it for Linux??

In the first case:

mkdir /mnt/windows
mount /dev/hda1 /mnt/windows (/dev/hda1 migth be different on your system. Find it with fdisk -l)


In the second case you need to reformat the partition and mount it somewhere where you need the space.

fdisk /dev/hda and change the type to Linux (83 I think)
mkfs.ext2 /dev/hda1 (or other but don't know how to format reiserfs)

You then need to mount it somewhere. If you want to use it as an existing directory fx /home, you need to backup your /home and add the new filesystem to /etc/fstab and mount it.
Then restore you files.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
thanks sofar guys.. but, it ain't going as i want.. at this point i don't really mind losing the data on that Windows disk, this is what "fdisk -l" reports:

Disk /dev/hde: 255 heads, 63 sectors, 2481 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hde1 * 1 7 56196 83 Linux
/dev/hde2 8 2481 19872405 5 Extended
/dev/hde5 8 1074 8570646 83 Linux
/dev/hde6 1075 2141 8570646 83 Linux
/dev/hde7 2142 2174 265041 83 Linux
/dev/hde8 2175 2207 265041 83 Linux
/dev/hde9 2208 2240 265041 82 Linux swap
--

i'm assuming /dev/hde2 is the Windows disk.. how do i format that one for use with Linux ??
 
Are you sure you have Windows installed? The extended partition means that you can have more than 4 partitions on each harddrive. //Daniel
 

DO NOT mess with hde2. That partition has all the partitions with numbers greater than 4.

Your hde disk does not have windows installed it must be somewhere else.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Above response may not be correct:
"add in /etc/fstab a line like:
/dev/hdb3 /IDE1_3 ext2 defaults 1 2"

If its a WindoZe partition, should be vfat rather than ext2.

 
danielhozac, i don't have Windows installed on thet partition.. it's a DOS formatted partition, i have a 4gig harddisk in that machine and only 2 used by Linux.
 
show us the content of /etc/fstab file.
maybe you did'nt mount all partitions.

in any case, as Morsing said, the /dev/hda2 is an Extended Partition.
And in fact the (logical) partitions from 5 to 9 are in that partition.

Looks like you have some unused space:
from cylinder 2241 - to 2481.
so, try to use
fdisk /dev/hda
create a nu partition of type Linux
`m' is for help.


PM __
___
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top