LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
Search this Thread
Old 01-26-2005, 08:55 AM   #1
Sigmund
LQ Newbie
 
Registered: Jan 2005
Distribution: Ubuntu
Posts: 4

Rep: Reputation: 0
Resizing Ext3 partition to replace XP


I've been dual-booting XP and Ubuntu for some time now. Whenever my XP install started giving me too many problems to be worth correcting I would just format the ntfs partition and start over. While preparing to reformat for the 3rd time since I installed Ubuntu I noticed that I usually boot into linux for a while when I'm getting the motivation to go through the painstaking process of reinstalling all my stuff and it really didn't make sense for me to keep it up. In short, I'm sick of windows, I don't really need to dual boot anymore and I was wondering if there is a way to increase my root partition (my only mount point besides swap) to take up the entire disk. Or, if its possible to format the xp install, and mount the space as my home directory without losing my settings and such.

Any suggestions of methods or utilities to do this would be appreciated,
Sigmund
 
Old 01-26-2005, 09:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
the /home idea is MUCH better than wanting to expand your root partition. for example. you might want to reinstall ubuntu if it all goes horribly wrong somewhere. you're /home partition is physically seperate form the base system, so you can leave /home alone, and format / only. then on your shiny new system, just mount the /home partitino and instantly all your own media files, settings etc... are there, ready and able.

so... to do this is really easy. just go into fdisk (or cfdisk for a nicer interface) and change the partition type from ntfs to linux ext2 (type 83 afaik) then use
Code:
mke2fs -j /dev/hda1
to create an ext3 system on it. then mount it somewhere temporarily, e.g. /mnt/home (create that directory) and then copy everything over. personally i recommend not just using cp, but other people have no problem. so i say do:
[code]find /home | cpio -pvd /mnt
Code:
this will create a clone of /home and /mnt/home. then just mount it at /home and you're done. well, done other than unmounting /home and deleting all the old data once you're happy with it. The only other thing is to add an entry to /etc/fstab to make it always mount it automatically:
/dev/hda1   /home   ext3     defaults   0 0
all done.
 
Old 01-26-2005, 09:05 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
that's assuming windows was on /dev/hda1 of course!
 
Old 01-26-2005, 09:22 AM   #4
Sigmund
LQ Newbie
 
Registered: Jan 2005
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks a lot, that was insanely fast.
First time I've ever posted here btw.

Your response leads me to another question though. /hda2 is actually my ntfs partition, /hda1 is what I boot to and contains my bootloader. What would be the cleanest way to take care of the fact that I no longer need to make a decision at boot time? Setting a default with no wait time seems pretty sloppy though I think it would probably work fine.

Thanks,
Sigmund
 
Old 01-26-2005, 09:44 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
what bootloader is this? what happens after you get that bootloader? do you have lilo or grub after that? or is hda1 actually the linux /boot partition?

you WILL still need a bootloader for linux, linux never just hurls straight into it. although ubuntu does use a pretty minimal install of grub, no splash screen or anything, so maybe you're just not aware it's grub at all.
 
Old 01-26-2005, 10:08 AM   #6
Sigmund
LQ Newbie
 
Registered: Jan 2005
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
to clarify
/boot is mounted on hda1
I believe it is grub, I usually get a menu with a few options: xp, ubuntu, ubuntu rescue and a memory test. How would I go about editing the contents of the menu permanently? To remove the xp entry and maybe lower the wait period.

Thanks,
Sigmund
 
Old 01-26-2005, 10:24 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
ahh right, that's a lot lot nicer. yeah, edit /boot/grub/grub.conf and just wop out the XP entry. that's all you need to do... try that before nuking hda2 if you want...
 
Old 01-26-2005, 11:48 AM   #8
Sigmund
LQ Newbie
 
Registered: Jan 2005
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
I followed all of the steps in your first response and everything seemed to work fine, tons of free space now. Though you mentioned deleting the old /home directory and I'm not sure how to do that now that I have the new one mounted. Do I need to boot without X, unmount the current /home (i updated fstab as well) so that the old one is accessible and delete it there? I'm not sure how to go about it in Ubuntu since I can't log in as root, if that is the case.

Thanks,
Sigmund
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing an ext3 LVM Partition PenguinPwrdBox Linux - Software 1 09-04-2005 03:34 AM
Resizing/reformatting ext3 partition mark.johnson Linux - Hardware 3 04-25-2005 02:48 PM
Resizing a running Ext3 partition Dee-ehn Linux - Software 11 01-24-2005 06:38 PM
Resizing a partition (ext3) herc Linux - Hardware 1 12-26-2003 05:17 PM
Resizing EXT3 partition using parted??? Hegemon Linux - General 1 01-21-2003 01:59 AM


All times are GMT -5. The time now is 12:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration