LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 11: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, 11:51 AM   #2
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 40
_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, 07: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, 08:41 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,043

Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
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, 10: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, 01:09 PM   #6
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 40
_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


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 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 01:31 AM
setting up partitions for gentoo/winXP dual boot? lleb Linux - General 2 07-03-2006 07:10 PM
Dual Boot - partitions & sharing files from XP. charjoe Linux - General 2 06-14-2006 05:39 PM
Slack & Gentoo dual boot aje Linux - General 4 06-15-2005 07:08 AM
Dual Boot Redhat & Gentoo Crashed_Again Linux - General 4 11-14-2003 05:50 PM


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