LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 06-19-2009, 10:16 AM   #1
_ian
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
removing dual-boot & moving Gentoo partitions


Hi

Does anyone know an easy way to move Gentoo partion(s) to the start of my disk because I now want to remove the Vista partition from my dual boot laptop and I'd like to somehow move the gentoo partitions to the start of the disk without reinstalling if possible.

I have a laptop with the following disk partitions;

Device Boot Start End Blocks Id System
/dev/sda1 * 1 10444 83886080 7 HPFS/NTFS Vista
/dev/sda2 * 10444 10456 100716 83 Linux
/dev/sda3 10457 11065 4891792+ 82 Linux swap
/dev/sda4 11066 30401 155316420 5 Extended
/dev/sda5 11066 17145 48837568+ 83 Linux
/dev/sda6 17146 30401 106478788+ c W95 FAT32 (LBA)


I thought that maybe copying the root partition using DD to the Vista partition, but not sure if this would damage the MBR?

Does anybody now an easy/safe way of doing this or am I better off just formating the partition, removing Vista from the Grub menu and using it as a data partition?

Thanks.
 
Old 06-19-2009, 10:51 AM   #2
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 41
_ian,

Tell us how your Linux partitions are used now.

dd is a bad idea because it copies all the underlying filesystem metadata, so if you copy a small partition onto a bigger partition the extra space appears to have vanished. Copying a bigger parttion to a smaller one .. don't ever do that as some the bigger partition will be left behind.

You should copy files from one parttion to the other but boot with a CD, so your normal gentoo root filesystem is not live. This avoids the complications with copying /dev /sys and /proc, which are not real filesystems.

Book your CD, mount the donor partition to /mnt/gentoo.
Mount the copy to /mnt/floppy (any mount point will do as long as its not inside /mnt/gentoo)
Now use the
Code:
cp -a /mnt/gentoo/ /mnt/floppy/
to do the copy. Read
Code:
man cp
while it runs.
If your want to be able to boot the copy, your will need to edit /etc/fstab (in the copy) and grub.conf as your (real_)root=/dev/... will have changed and possibly your root (hd... too.

The MBR does not belong to any filesystem or partition, so operations on partitions or their filesystems will not harm the MBR.
 
Old 06-22-2009, 06:50 AM   #3
_ian
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi, thanks for your reply.

I would like to end up using the partitions like below;

/dev/sda1 80 Gb Linux /root
/dev/sda2 100 Mb Linux /boot
/dev/sda3 5 Gb Linux /swap
/dev/sda4 150 Gb Linux /home & data

So I have removed the Vista partition, moved the Linux root into it's place at front of drive, kept the /boot & /swap where they are and deleted and removed the extended partitions & created one large /home & data partition (Probably formated as ext3).

Is it best to have the linux /boot partition first or does this not matter? Can I have the /root partitin at that start of the disk? If I had to move this I might as well rebuild from scratch - which I can do, I was just trying to make life easy for myself!

Does this sound possible with the solution you suggested "cp -a" from a live CD, then changing the fstab?

Thanks for your help

_ian
 
Old 06-22-2009, 07:41 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by _ian View Post
Hi, thanks for your reply.

I would like to end up using the partitions like below;

/dev/sda1 80 Gb Linux /root
I guess you meant /, not /root (which would be the home for the root user.

Quote:
Is it best to have the linux /boot partition first or does this not matter? Can I have the /root partitin at that start of the disk? If I had to move this I might as well rebuild from scratch - which I can do, I was just trying to make life easy for myself!
Nowadays you shouldn't have any problem with that.

Quote:
Does this sound possible with the solution you suggested "cp -a" from a live CD, then changing the fstab?

Thanks for your help

_ian
cp -a and then correcting your grub.conf and fstab should be all you need.
 
Old 06-22-2009, 09:26 AM   #5
_ian
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi i92guboj

Thanks - I shall backup and re-configure this way then and yes I did mean '/' & not '/root'.


Cheers
 
Old 06-23-2009, 12:09 PM   #6
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 41
_ian,

A separate boot partition is only needed when the BIOS cannot read all of the hard drive. This normally only happens when you put a large drive in an old PC. The requirement is to have the files needed for booting in the area that the BIOS can read.
The terms 'large' and 'old' are relative. The BIOS not reading the entire drive was first a problem when drives reached 528Mb.

The other reason for a separate /boot is that you have several distros installed. Then /boot can be shared
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot XP & Fedora 10-XP Installed First--Partitions? BDL@Marshall Fedora - Installation 5 12-19-2008 12:31 AM
setting up partitions for gentoo/winXP dual boot? lleb Linux - General 2 07-03-2006 06:10 PM
Dual Boot - partitions & sharing files from XP. charjoe Linux - General 2 06-14-2006 04:39 PM
Slack & Gentoo dual boot aje Linux - General 4 06-15-2005 06:08 AM
Dual Boot Redhat & Gentoo Crashed_Again Linux - General 4 11-14-2003 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 08:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration