* [gentoo-user] Moving root filesystem to a new partition
@ 2009-11-23 20:35 Alan E. Davis
2009-11-23 20:51 ` Alex Schuster
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Alan E. Davis @ 2009-11-23 20:35 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
Can someone tell me what steps are necessary to move the / filesystem to a
new partition? I recall someone helping me with this before, but cannot
find the email. The oldest of three drives on my system had my / partition,
/dev/sdc1. One day recently, that partition became inaccessable. After
quickly installing Ubuntu on a different drive, that root partition
eventually showed up again.
So I've been able to boot Gentoo again off the separate /boot partition on
/dev/sda1. I need to move that / partition. I have several other
partitions mounted off this one, mainly as /usr and maybe /usr/local/, and
some storage partitions mounted to my home directory.
I copied the root (/) partition with the new partition at /dev/sdb5 mounted
as /newroot, using
# cp -ax / /newroot
I checked that /proc, /dev, and /sys are there, and empty. I recall there
are some other steps necessary. I changed /etc/fstab, and the grub2
grub.cfg from ubuntu, the entry for this kernel. The boot stalls at a
certain point.
May I ask what steps are necessary to do this?
Thank you,
Alan Davis
[-- Attachment #2: Type: text/html, Size: 1157 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Moving root filesystem to a new partition
2009-11-23 20:35 [gentoo-user] Moving root filesystem to a new partition Alan E. Davis
@ 2009-11-23 20:51 ` Alex Schuster
2009-11-23 22:51 ` Dale
2009-11-24 17:39 ` Peter Humphrey
2 siblings, 0 replies; 13+ messages in thread
From: Alex Schuster @ 2009-11-23 20:51 UTC (permalink / raw
To: gentoo-user
Alan E. Davis writes:
> I copied the root (/) partition with the new partition at /dev/sdb5
> mounted as /newroot, using
> # cp -ax / /newroot
>
> I checked that /proc, /dev, and /sys are there, and empty. I recall
> there are some other steps necessary.
/dev needs at least the entries console and null, and tty1 for splash
things (I think). You could create them like this:
mknod c 5 1 /dev/console
mknod c 1 3 /dev/null
mknod c 4 1 /dev/tty1
Or copy over your original /dev directory (without the stuff udev added)
from the old system:
mount -o bind / /mnt
cp -a /mnt/dev /newroot/
Wonko
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Moving root filesystem to a new partition
2009-11-23 20:35 [gentoo-user] Moving root filesystem to a new partition Alan E. Davis
2009-11-23 20:51 ` Alex Schuster
@ 2009-11-23 22:51 ` Dale
2009-11-24 0:54 ` Francisco Ares
2009-11-24 17:39 ` Peter Humphrey
2 siblings, 1 reply; 13+ messages in thread
From: Dale @ 2009-11-23 22:51 UTC (permalink / raw
To: gentoo-user
Alan E. Davis wrote:
> Can someone tell me what steps are necessary to move the / filesystem
> to a new partition? I recall someone helping me with this before, but
> cannot find the email. The oldest of three drives on my system had my
> / partition, /dev/sdc1. One day recently, that partition became
> inaccessable. After quickly installing Ubuntu on a different drive,
> that root partition eventually showed up again.
>
> So I've been able to boot Gentoo again off the separate /boot
> partition on /dev/sda1. I need to move that / partition. I have
> several other partitions mounted off this one, mainly as /usr and
> maybe /usr/local/, and some storage partitions mounted to my home
> directory.
>
> I copied the root (/) partition with the new partition at /dev/sdb5
> mounted as /newroot, using
> # cp -ax / /newroot
>
> I checked that /proc, /dev, and /sys are there, and empty. I recall
> there are some other steps necessary. I changed /etc/fstab, and the
> grub2 grub.cfg from ubuntu, the entry for this kernel. The boot
> stalls at a certain point.
>
> May I ask what steps are necessary to do this?
>
> Thank you,
>
> Alan Davis
I have done this in the past. I usually boot the CD, make mount points
for old and new, then mount the old and new that I want to copy. Then I
do a cp -av /path/to/old /path/to/new/ and let it copy. This can take
quite a bit of time tho. It seems those little bitty files take the
longest. Maybe omitting the -v option would help on that?
Once you get it copied over, edit your fstab file as needed on the new
side and install the bootloader as well. After that, it usually just works.
Dale
:-) :-)
P. S. Sorry for not including some fancy tarball stuff. ;-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Moving root filesystem to a new partition
2009-11-23 22:51 ` Dale
@ 2009-11-24 0:54 ` Francisco Ares
2009-11-24 2:31 ` Dale
0 siblings, 1 reply; 13+ messages in thread
From: Francisco Ares @ 2009-11-24 0:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]
On Mon, Nov 23, 2009 at 8:51 PM, Dale <rdalek1967@gmail.com> wrote:
> Alan E. Davis wrote:
>
>> Can someone tell me what steps are necessary to move the / filesystem to a
>> new partition? I recall someone helping me with this before, but cannot
>> find the email. The oldest of three drives on my system had my / partition,
>> /dev/sdc1. One day recently, that partition became inaccessable. After
>> quickly installing Ubuntu on a different drive, that root partition
>> eventually showed up again.
>> So I've been able to boot Gentoo again off the separate /boot partition on
>> /dev/sda1. I need to move that / partition. I have several other
>> partitions mounted off this one, mainly as /usr and maybe /usr/local/, and
>> some storage partitions mounted to my home directory.
>> I copied the root (/) partition with the new partition at /dev/sdb5
>> mounted as /newroot, using
>> # cp -ax / /newroot
>>
>> I checked that /proc, /dev, and /sys are there, and empty. I recall there
>> are some other steps necessary. I changed /etc/fstab, and the grub2
>> grub.cfg from ubuntu, the entry for this kernel. The boot stalls at a
>> certain point.
>> May I ask what steps are necessary to do this?
>>
>> Thank you,
>>
>> Alan Davis
>>
>
> I have done this in the past. I usually boot the CD, make mount points for
> old and new, then mount the old and new that I want to copy. Then I do a cp
> -av /path/to/old /path/to/new/ and let it copy. This can take quite a bit
> of time tho. It seems those little bitty files take the longest. Maybe
> omitting the -v option would help on that?
>
> Once you get it copied over, edit your fstab file as needed on the new side
> and install the bootloader as well. After that, it usually just works.
>
> Dale
>
> :-) :-)
> P. S. Sorry for not including some fancy tarball stuff. ;-)
>
Well, as far as I know one would like to edit the bootloader configuration
as well, so as to reflect the new root directory.
Or has anyone written this before and I didn't notice? ;-)
Francisco
--
"If you have an apple and I have an apple and we exchange apples then you
and I will still each have one apple. But if you have an idea and I have one
idea and we exchange these ideas, then each of us will have two ideas." -
George Bernard Shaw
[-- Attachment #2: Type: text/html, Size: 2848 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Moving root filesystem to a new partition
2009-11-24 0:54 ` Francisco Ares
@ 2009-11-24 2:31 ` Dale
2009-11-27 0:59 ` Alan E. Davis
0 siblings, 1 reply; 13+ messages in thread
From: Dale @ 2009-11-24 2:31 UTC (permalink / raw
To: gentoo-user
Francisco Ares wrote:
>
>
> On Mon, Nov 23, 2009 at 8:51 PM, Dale <rdalek1967@gmail.com
> <mailto:rdalek1967@gmail.com>> wrote:
>
> Alan E. Davis wrote:
>
> Can someone tell me what steps are necessary to move the /
> filesystem to a new partition? I recall someone helping me
> with this before, but cannot find the email. The oldest of
> three drives on my system had my / partition, /dev/sdc1. One
> day recently, that partition became inaccessable. After
> quickly installing Ubuntu on a different drive, that root
> partition eventually showed up again.
> So I've been able to boot Gentoo again off the separate /boot
> partition on /dev/sda1. I need to move that / partition. I
> have several other partitions mounted off this one, mainly as
> /usr and maybe /usr/local/, and some storage partitions
> mounted to my home directory.
> I copied the root (/) partition with the new partition at
> /dev/sdb5 mounted as /newroot, using
> # cp -ax / /newroot
>
> I checked that /proc, /dev, and /sys are there, and empty. I
> recall there are some other steps necessary. I changed
> /etc/fstab, and the grub2 grub.cfg from ubuntu, the entry for
> this kernel. The boot stalls at a certain point.
> May I ask what steps are necessary to do this?
>
> Thank you,
>
> Alan Davis
>
>
> I have done this in the past. I usually boot the CD, make mount
> points for old and new, then mount the old and new that I want to
> copy. Then I do a cp -av /path/to/old /path/to/new/ and let it
> copy. This can take quite a bit of time tho. It seems those
> little bitty files take the longest. Maybe omitting the -v option
> would help on that?
>
> Once you get it copied over, edit your fstab file as needed on the
> new side and install the bootloader as well. After that, it
> usually just works.
>
> Dale
>
> :-) :-)
> P. S. Sorry for not including some fancy tarball stuff. ;-)
>
>
>
> Well, as far as I know one would like to edit the bootloader
> configuration as well, so as to reflect the new root directory.
>
> Or has anyone written this before and I didn't notice? ;-)
>
> Francisco
>
> --
> "If you have an apple and I have an apple and we exchange apples then
> you and I will still each have one apple. But if you have an idea and
> I have one idea and we exchange these ideas, then each of us will have
> two ideas." - George Bernard Shaw
If it needs to be then sure. I usually move things file wise with cp
then move things physically in the case as well. My OS is always on
hda. The grub config is on hda1 and grub bootloader is on the MBR of
hda as well. So, I don't have to edit grub on mine. I do boot once by
using the edit feature of grub, just to make sure before I move things
physically.
You do have to plan these things tho. Wouldn't hurt to write down on
paper where everything is and don't erase anything until you are sure
your ducks are in a row. Maybe even write notes on the drive with a
post it note.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Moving root filesystem to a new partition
2009-11-23 20:35 [gentoo-user] Moving root filesystem to a new partition Alan E. Davis
2009-11-23 20:51 ` Alex Schuster
2009-11-23 22:51 ` Dale
@ 2009-11-24 17:39 ` Peter Humphrey
2009-11-25 17:19 ` daid kahl
2009-11-25 20:56 ` [gentoo-user] " walt
2 siblings, 2 replies; 13+ messages in thread
From: Peter Humphrey @ 2009-11-24 17:39 UTC (permalink / raw
To: gentoo-user
On Monday 23 November 2009 20:35:34 Alan E. Davis wrote:
> Can someone tell me what steps are necessary to move the / filesystem to
> a new partition?
Just restore your latest backup to the new partition, then edit /etc/fstab
to specify the proper layout. Easy - I do it often.
--
Rgds
Peter
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Moving root filesystem to a new partition
2009-11-24 17:39 ` Peter Humphrey
@ 2009-11-25 17:19 ` daid kahl
2009-11-25 20:56 ` [gentoo-user] " walt
1 sibling, 0 replies; 13+ messages in thread
From: daid kahl @ 2009-11-25 17:19 UTC (permalink / raw
To: gentoo-user
> Just restore your latest backup to the new partition, then edit /etc/fstab
> to specify the proper layout. Easy - I do it often.
A good idea. If for some reason you don't have disk image
backups...grab something like system rescue cd, and partimage the
whole drive and the restore from it...
~daid
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Moving root filesystem to a new partition
2009-11-24 17:39 ` Peter Humphrey
2009-11-25 17:19 ` daid kahl
@ 2009-11-25 20:56 ` walt
2009-11-27 11:08 ` Peter Humphrey
1 sibling, 1 reply; 13+ messages in thread
From: walt @ 2009-11-25 20:56 UTC (permalink / raw
To: gentoo-user
On 11/24/2009 09:39 AM, Peter Humphrey wrote:
> On Monday 23 November 2009 20:35:34 Alan E. Davis wrote:
>> Can someone tell me what steps are necessary to move the / filesystem to
>> a new partition?
>
> Just restore your latest backup to the new partition, then edit /etc/fstab
> to specify the proper layout. Easy - I do it often.
Okay, I just can't resist asking this nosy question: Why do you need to
restore from backup "often"?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Moving root filesystem to a new partition
2009-11-24 2:31 ` Dale
@ 2009-11-27 0:59 ` Alan E. Davis
0 siblings, 0 replies; 13+ messages in thread
From: Alan E. Davis @ 2009-11-27 0:59 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3567 bytes --]
I bind mounted / then copied /dev to the new partition. This was advice
given earlier, the first time it happened to me: I finally found an earlier
replay to a similar request from me. All is now well.
Thank you for the advice.
Alan
On Tue, Nov 24, 2009 at 12:31 PM, Dale <rdalek1967@gmail.com> wrote:
> Francisco Ares wrote:
>
>
>>
>> On Mon, Nov 23, 2009 at 8:51 PM, Dale <rdalek1967@gmail.com <mailto:
>> rdalek1967@gmail.com>> wrote:
>>
>> Alan E. Davis wrote:
>>
>> Can someone tell me what steps are necessary to move the /
>> filesystem to a new partition? I recall someone helping me
>> with this before, but cannot find the email. The oldest of
>> three drives on my system had my / partition, /dev/sdc1. One
>> day recently, that partition became inaccessable. After
>> quickly installing Ubuntu on a different drive, that root
>> partition eventually showed up again.
>> So I've been able to boot Gentoo again off the separate /boot
>> partition on /dev/sda1. I need to move that / partition. I
>> have several other partitions mounted off this one, mainly as
>> /usr and maybe /usr/local/, and some storage partitions
>> mounted to my home directory.
>> I copied the root (/) partition with the new partition at
>> /dev/sdb5 mounted as /newroot, using
>> # cp -ax / /newroot
>>
>> I checked that /proc, /dev, and /sys are there, and empty. I
>> recall there are some other steps necessary. I changed
>> /etc/fstab, and the grub2 grub.cfg from ubuntu, the entry for
>> this kernel. The boot stalls at a certain point. May I
>> ask what steps are necessary to do this?
>>
>> Thank you,
>>
>> Alan Davis
>>
>>
>> I have done this in the past. I usually boot the CD, make mount
>> points for old and new, then mount the old and new that I want to
>> copy. Then I do a cp -av /path/to/old /path/to/new/ and let it
>> copy. This can take quite a bit of time tho. It seems those
>> little bitty files take the longest. Maybe omitting the -v option
>> would help on that?
>>
>> Once you get it copied over, edit your fstab file as needed on the
>> new side and install the bootloader as well. After that, it
>> usually just works.
>>
>> Dale
>>
>> :-) :-)
>> P. S. Sorry for not including some fancy tarball stuff. ;-)
>>
>>
>>
>> Well, as far as I know one would like to edit the bootloader configuration
>> as well, so as to reflect the new root directory.
>>
>> Or has anyone written this before and I didn't notice? ;-)
>>
>> Francisco
>>
>> --
>> "If you have an apple and I have an apple and we exchange apples then you
>> and I will still each have one apple. But if you have an idea and I have one
>> idea and we exchange these ideas, then each of us will have two ideas." -
>> George Bernard Shaw
>>
>
> If it needs to be then sure. I usually move things file wise with cp then
> move things physically in the case as well. My OS is always on hda. The
> grub config is on hda1 and grub bootloader is on the MBR of hda as well.
> So, I don't have to edit grub on mine. I do boot once by using the edit
> feature of grub, just to make sure before I move things physically.
>
> You do have to plan these things tho. Wouldn't hurt to write down on paper
> where everything is and don't erase anything until you are sure your ducks
> are in a row. Maybe even write notes on the drive with a post it note.
> Dale
>
> :-) :-)
>
>
[-- Attachment #2: Type: text/html, Size: 4422 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Moving root filesystem to a new partition
2009-11-25 20:56 ` [gentoo-user] " walt
@ 2009-11-27 11:08 ` Peter Humphrey
2009-11-29 8:26 ` daid kahl
0 siblings, 1 reply; 13+ messages in thread
From: Peter Humphrey @ 2009-11-27 11:08 UTC (permalink / raw
To: gentoo-user
On Wednesday 25 November 2009 20:56:23 walt wrote:
> Okay, I just can't resist asking this nosy question: Why do you need to
> restore from backup "often"?
I'm going through a transient at the moment, having more-or-less given up on
trying to keep KDE-3 and not being ready for KDE-4 (or vice-versa). I've
been trying a few other distros, and even Gnome (shows what a parlous state
Gentoo's in; I couldn't imagine ever considering Gnome six months ago).
So I've had cause several times to change my disk layout, and although it
consumes time the easy way is to make a backup and then restore to the new
layout.
This is a toy box, after all. If I can't fiddle with it when I feel like it,
what's the point of having it? :-)
On the other hand, I suspect a hardware problem of causing k3b:4 to be
unable to find the CD drives, the BIOS to report 2992MB RAM instead of 4096
and several BIOS settings to have been changed without my knowledge. That's
driving me towards considering replacing the whole system. It's six years
old now so it doesn't owe me anything. In the end I may revert to something
like my original Gentoo layout and stay with it.
--
Rgds
Peter
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Moving root filesystem to a new partition
2009-11-27 11:08 ` Peter Humphrey
@ 2009-11-29 8:26 ` daid kahl
2009-11-29 13:02 ` Peter Humphrey
0 siblings, 1 reply; 13+ messages in thread
From: daid kahl @ 2009-11-29 8:26 UTC (permalink / raw
To: gentoo-user
> I'm going through a transient at the moment, having more-or-less given up on
> trying to keep KDE-3 and not being ready for KDE-4 (or vice-versa). I've
> been trying a few other distros, and even Gnome (shows what a parlous state
> Gentoo's in; I couldn't imagine ever considering Gnome six months ago).
Maybe not in line with the OP, but I had the same issue last month
with using kde3 and needing to switch. I tried kde4, but my video
card is garbage and I didn't want to tinker to find the reason X was
so slow....
I went for Xfce and have been quite happy. Things run even faster now!
~daid
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Moving root filesystem to a new partition
2009-11-29 8:26 ` daid kahl
@ 2009-11-29 13:02 ` Peter Humphrey
2009-11-29 17:29 ` Marcus Wanner
0 siblings, 1 reply; 13+ messages in thread
From: Peter Humphrey @ 2009-11-29 13:02 UTC (permalink / raw
To: gentoo-user
On Sunday 29 November 2009 08:26:36 daid kahl wrote:
> I went for Xfce and have been quite happy. Things run even faster
> now!
Yes, I'm just installing it on my home server to replace KDE. Looks
quite usable now, though it wasn't a few years ago when I last tried it.
This desktop might even find itself running Ubuntu. Now there's an
about-face!
--
Rgds
Peter
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Moving root filesystem to a new partition
2009-11-29 13:02 ` Peter Humphrey
@ 2009-11-29 17:29 ` Marcus Wanner
0 siblings, 0 replies; 13+ messages in thread
From: Marcus Wanner @ 2009-11-29 17:29 UTC (permalink / raw
To: gentoo-user
On 11/29/2009 8:02 AM, Peter Humphrey wrote:
> On Sunday 29 November 2009 08:26:36 daid kahl wrote:
>
>
>> I went for Xfce and have been quite happy. Things run even faster
>> now!
>>
>
> Yes, I'm just installing it on my home server to replace KDE. Looks
> quite usable now, though it wasn't a few years ago when I last tried it.
>
> This desktop might even find itself running Ubuntu. Now there's an
> about-face!
>
>
Check out lxde, it's actually lightweight. Xfce4 is not light enough for
my desktop: 2ghz pentium 4, 256mb ram. Lxde runs great, though!
Marcus
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-11-29 17:29 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-23 20:35 [gentoo-user] Moving root filesystem to a new partition Alan E. Davis
2009-11-23 20:51 ` Alex Schuster
2009-11-23 22:51 ` Dale
2009-11-24 0:54 ` Francisco Ares
2009-11-24 2:31 ` Dale
2009-11-27 0:59 ` Alan E. Davis
2009-11-24 17:39 ` Peter Humphrey
2009-11-25 17:19 ` daid kahl
2009-11-25 20:56 ` [gentoo-user] " walt
2009-11-27 11:08 ` Peter Humphrey
2009-11-29 8:26 ` daid kahl
2009-11-29 13:02 ` Peter Humphrey
2009-11-29 17:29 ` Marcus Wanner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox