LinuxQuestions.org
Register a domain and help support LQ
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 02-02-2004, 05:16 AM   #1
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Rep: Reputation: 15
moving partitions around


Hey everyone

I have been trying to get ACPI suspend to disk working, and I just about have it, and I realized that my swap partition is too small. This gives me reason to mess with this hard drive a bit as I have been meaning to, but I want to ask around before I really mess things up.....

This is a laptop. Windows is installed on /dev/hda1. I have not booted windows in months, and I just keep it around in case on of my professors decides that we really need to use some windows-only program. Anyway, /dev/hda2 is linux (ext3) and /dev/hda3 is swap (around 200 megs).

What I want to do is boot into windows, and use Partition Magic to shrink the windows partition as much as possbile, and then create a new partition out of this free space. I would like to use around 600 megs for a new swap partition, and then use the rest at ext3. Now, I also want to be able to boot Linux and windows after this (im using GRUB).

Im guessing that after I get through this will be my disk:

/dev/hda1 : ntfs
/dev/hda2: ext3 (new empty partition)
/dev/hda3: new swap partition
/dev/hda4: ext3 mounted on /
/dev/hda5: old swap partition, useless

to get this to work, is it going to be as simple as changiing in grub.conf:

root=/dev/hda2 to root=/dev/hda4

or will there be complications. Also, I need to know how to configure the new swap partition as the one I want to use (although its not changing from /dev/hda3, so would it possibly just work?

Thanks for any help I can get with this in advance
 
Old 02-02-2004, 06:13 AM   #2
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
Theoretically it should work but take my advice it doesn't. Sorry to be so blunt but i've tried this myself and i was unsuccessful. It's not just about changing the grub.conf file, the matter is more delicate.

I recommend against it as I had to reinstall.
 
Old 02-02-2004, 06:22 AM   #3
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
ok, well now im a little more worried about it, but can someone please explain exactly what would need to be done, and what problems could come up?

thanks
 
Old 02-02-2004, 06:38 AM   #4
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
ok I would still like to stick to the plan in my original post, but I have thought of another "plan b" if this ends up being too much of a problem


I could shring my current linux partition by about 500 megs, and then merge that with the swap at the end of the disk. No problems doing that, right? That takes care of the swap problem.

Then I am still left with all the wasted space in the NTFS partition. I was thinking of 2 possible options there:

1. change that partition to FAT (anyone know if this is easy? I know MS provided a tool to move FAT to NTFS...)

or 2. get rid of windows and format it ext. anyone know of a free equivalent of VMware??? As I said before, I need to be able to run windows programs, but onoly very rarely.

thanks
 
Old 02-02-2004, 07:36 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,925

Rep: Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747
It is possible. Someone else just accomplished this in another thread.
You will need to change your grub.conf and fstab file.

BTW your old swap wouldn't be useless. You can have a total of 8 seperate swap partitions and / or swap files. So you only need a new 400mb swap partition.

Or if you do not want to change partitions sizes you can try a swap file.
http://www.justlinux.com/nhf/Filesys..._Swapping.html

Always backup important files.

There is wine but make sure your applications are compatible.
 
Old 02-02-2004, 07:59 AM   #6
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
i searched for the thread you mentioned but couldnt find it. I will have more time later (I am in a class at the moment) but if you dont mind can you post the link?

Also, I can't use a swap file because I need the swap partition for susprend-to-disk.

thanks for the reply
 
Old 02-02-2004, 09:22 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,925

Rep: Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747
I would have to look at my email for the thread.

Once you modify your partitions boot the RH 1st CD to rescue mode.
To see what the new partition IDs are:
fdisk -l /dev/hda (thats a small L)

Your root partition will be mounted @ /mnt/sysimage, to change to your / do:
chroot /mnt/sysimage

Edit the /etc/fstab to add and entry for your new swap just like the old one except for the partition ID.

I'm not sure you need to change the grub.conf file. I will have verify later.
 
Old 02-02-2004, 11:21 AM   #8
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
i will have to change the root that is specified in grub.conf, because for some reason, the "make install" script never works for me when I compile a new kernel. It puts it as "root=LABEL=/" which doesnt work. I have to specify /dev/hda2

so I know I would have to change that. is the fstab stuff all there is to it? I was concerned that other unforseen problems might show up somewhere.

I also have been seriously considering just wiping out my windows partition. It is a real waste giving around 6 gigs to an OS that I would be keeping around "just in case". But, as I said earlier, I might really need it some day.

But, I think if I can prepare for any problems that might come up, I think I will keep windows and just try to take all the space from it that I can. I just need to make sure that I have all my bases covered before I do this


thanks for the help
 
  


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
Moving space between partitions GoBillsBN Mandriva 1 07-12-2005 11:41 AM
moving partitions toaster.waffle Linux - General 5 06-09-2005 12:15 AM
Moving Partitions. firedance Linux - General 1 01-08-2005 04:07 AM
Moving directories to their own partitions bxb32001 Debian 7 12-08-2003 06:40 AM
Moving partitions nabil Linux - Software 5 07-17-2001 03:55 AM


All times are GMT -5. The time now is 05:58 AM.

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