Partioning and formatting HDD
Hello everyone I'm new to Linux and I need some help with
formmating and mounting partions in liunx. I would greatly appreciate any help I can get. I'm trying to combine two partitions toghether I have the folowing partitions. dev/hda1 primary linux 1.0 GB Boot /dev/hda2 primary linux swap 512 MB /dev/hda3 primary linux 3.0 GB /dev/hda4 extended /dev/hda5 linux 512 MB /dev/hda6 linux rest of the disk / on /dev/hda1 /usr on /dev/hda3 /home on /dev/hda5 /extra on /dev/hda6 and I would like to combine home and extra into one partition and mount it under /hikito and modify fstab and remove / comment out of the 2 old partitions I would also like to make it ext3 file system on the new partiton and fstab and add the /hikito I ve tried to do this on my own but I can't I new to Linux Please Help! |
It looks like hda5 and hda6 are next to each other. It's a good sign. With partitions divided by another it's much harder.
Th easiest way will be to delete them both and create a new partition. So before you begin, copy all your data from the two to a safe place! You can do the whole thing using fdisk. So: fdisk /dev/hda (you can list your partitions using the 'p' key or read the list of commands using 'm') press 'd' (to delete a partition) then press 5 to delete hda5 do the same with hda6 Then press 'n' to create a new partition, choose 'l' (logical), accept default values for begin and end (will take the whole free space). Then press 'p' to see current scheme. Check if it is what you want. Then use 'w' to save the changes. It's done in fdisk. Use mkfs.ext3 /dev/hda5 to format it (it will probably be hda5). Now edit fstab. The line for your new partition should be /dev/hda5 /hikito ext3 defaults 1 2 To comment out the ld ones, simply put # at the beginning of the lines they're described in. |
Hi Hikito/Morgan
Welcome to LQ! I haven't been here for a while myself, but I'll try to help you. First make sure that you don't have anything that you want to keep on partition 5 or 6. Any data there will be destroyed by following this procedure! If the partitions are mounted, they need to be unmounted now: > umount /dev/hda5 > umount /dev/hda6 Then enter fdisk: > /sbin/fdisk /dev/hda 'm' will print a help menu for you. Use the command 'd' to delete partitions 5 and 6, then use 'n' to add a new partition. Since you want the new partition to fill up the disk, just use the default values for first and last cylinders. 'w' will write the partition to disk and exit fdisk. (You can chicken out with 'q') Now use > /sbin/mkfs.ext3 /dev/hda5 to create a file system on your new partition. Make an empty directory > mkdir /hikito Only the partition table left and we're done! Open /etc/fstab in a suitable text editor (emacs is always a suitable text editor, by the way ;) ). Comment out the lines for the removed partitions. This is done by adding a '#' character at the beginning of the lines. Add this line: Code:
/dev/hda5 /hikito ext3 defaults 1 2 Hope I didn't forget anything. Good luck! Martin |
You type quicker than I do, Mara :)
Seems that we agree on the solution though ... Martin |
Thanks
Thanks Mara and MartinN It worked Thanks a lot
Best Regards Morgan :) |
All times are GMT -5. The time now is 04:30 PM. |