LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-08-2006, 04:59 AM   #1
hazmatt20
Member
 
Registered: Jan 2006
Distribution: FC5, Ubuntu
Posts: 126

Rep: Reputation: 15
Move boot partition/Backup


So, my installation drive is a bit of a mess. I don't know what I did when I installed Fedora, but it's a mess now. Here's my partition table.

Device Boot Start End Blocks Id System
/dev/hda1 2 3824 30708247+ f W95 Ext'd (LBA)
/dev/hda5 2 1913 15358108+ 7 HPFS/NTFS
/dev/hda6 1914 1926 104391 83 Linux
/dev/hda7 1927 3824 15245653+ 8e Linux LVM

As you can see with hda1, the windows and linux partitions are bundled together in an extended partition (I think. Not real familiar with partitions outside of just primaries). Anyway, I've got windows up in vmware thanks to the new free player, so the ntfs partition is irrelevant. I also had another ntfs partition to use the remainder of the drive (250 GB total), but I deleted it to change to ext3. However, I want to redo the structure to maximize the free space, not to mention keep everything in order. I also changed my mind again and decided to put it all in the partition with fedora, which would be hda7 above. So, how would I go about doing this? Backup everything and reinstall? Remove all other partitions and resize? What should I do, and how would I do it? Thanks, guys.
 
Old 01-08-2006, 11:03 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
this partition table seems screwy. The extended partition should encompass the other (logical) partitions--eg how can /dev/hda5 start at 1913, if the extended partition starts at 3824?
Also, you have two Linux partitions, but neither is swap.

If I read you correctly, you want a Linux-only install, with Windows running under VMWare.....Start over: Set up with 3 primary partitions for /boot, swap, and / Leave a large chunk of the disk unpartitioned, so it will be easy to add stuff later without disturbing your existing setup.
 
Old 01-08-2006, 02:52 PM   #3
hazmatt20
Member
 
Registered: Jan 2006
Distribution: FC5, Ubuntu
Posts: 126

Original Poster
Rep: Reputation: 15
The table didn't line up correctly when I pasted it, so you are reading it wrong. Boot is an empty column, and the start number is under boot. The extended partition starts where the windows partition starts and ends where the linux LVM partition ends. If I started over, I know how to set it up correctly with boot, swap, and main, but if I do, I need to know how to backup everything so I don't have to go through redownloading and reinstalling everything. Is there a way to move and resize everything without having to start over?
 
Old 01-08-2006, 03:28 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I didn't find any problem with the partition table because hda5 starts from 2 and not 1913. The table is correct without any overlaps and dead spaces. Partitions are tightly following each other and should have no problem in operation.

The only screwy bit of it is the extended partition is at the start of the disk with 30Gb, leaving 220Gb space at the back.

To use the remaining space effectively needs a bit of skill because there can be further 3 primary paritions; hda2, hda3 and hda4. However if the partition hda2 is formed after hda7 then no more logical partition is possible.

Therefore the correct way to do it is to tell the partitioning program that hda2 should start from the end of the disk, so should be hda3 and hda4. Whatever space left is therefore a void after hda7 and hda4 so that additional logical partitions from hda8 to hda60 can be created.

I can't advise on vmware partitions as I haven't used them before. However in moving the Linux to another partition it will become unbootable and needed to be rescued. LVM is complicated in that it addresses the root of Fedora by a "Label" and not by the partition number. The Label is generated by the installer. Therefore I am not hopeful, otherwise it is only a matter to amend /boot/grub/menu.lst and /etc/fstab files after migration.

Thus my suggestion is to make may be hda2, hda3, and hda4 at the rear end of the disk to receieve hda5, hda6 and hda7.

The method to move them.

You need to partition hda5 exactly the same size as hda4 and the same partition type. Similarly for hda6 to match hda3 and then hda7 same size as hda2. Then these lines will mirror the 3 across
Code:
dd if=/dev/hda5 of=/dev/hda4 bs=32256
dd if=/dev/hda6 of=/dev/hda3 bs=32256
dd if=/dev/hda7 of=/dev/hda2 bs=32256
You can then proceed to make the hda2, 3 & 4 work while still have the original versions.
 
Old 01-09-2006, 12:10 AM   #5
hazmatt20
Member
 
Registered: Jan 2006
Distribution: FC5, Ubuntu
Posts: 126

Original Poster
Rep: Reputation: 15
VMware uses a virtual partition and doesn't actually partition the disk. Don't worry about it.

The whole point of moving the installation would be to move it to a larger partition that uses up all available space on that drive not just to get the partition table to line up in numerical order.
 
Old 01-09-2006, 03:16 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I doubt if you can do a resizing and moving partitions in the same disk within one step, especially with NTFS and LVM involved.
 
  


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
Move OS to another partition giuseppe82 Linux - Software 2 09-06-2005 12:44 PM
Why can't I restore a partition table backup containing a reiser partition? oldweasel Linux - Software 2 05-23-2004 01:11 AM
resize or move /boot partition breenbaron Linux - General 3 04-07-2004 12:13 PM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 11:19 PM
How to move space from one partition to another? Rgamboa Linux - Software 1 05-16-2003 05:02 PM


All times are GMT -5. The time now is 09:56 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