FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-16-2010, 07:30 PM
Timothy Murphy
 
Default How to move my / partition

Chris Tyler wrote:

>> I want to move the / partition on a (very ancient) Fedora-12 desktop
>> from one SCSI disk to another (/dev/sdb3 to /dev/sda6),
>> because the second disk is showing some signs of sickness.

> If your / filesystem is on a logical volume, which is the default for
> F12 installations, you can move it easily:

Thanks for your response.
But unfortunately these are not LVM partitions, as I should have said.


--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-16-2010, 11:49 PM
g
 
Default How to move my / partition

> Chris Tyler wrote:
>
>>> I want to move the / partition on a (very ancient) Fedora-12 desktop
>>> from one SCSI disk to another (/dev/sdb3 to /dev/sda6),
>>> because the second disk is showing some signs of sickness.
<snip>
> But unfortunately these are not LVM partitions, as I should have said.

to be *terse*:

read;
man rsync { note -a -u -v options
man mkinitrd
man fstab
man grub.conf { if there was one
man chroot

with /dev/sda5 mounted, 'rsync' / to /mnt/sda6 [or how ever you have it
mounted].

if you have '/home' on a separate partition, note in 'man rsync' how to
eliminate '/home'. same applies to '/boot'.

after copy, make changes to '/boot/grub/grub.conf' and '/etc/fstab' to
reflect new locations.

'cd' to mounted directory for new '/', run 'chroot', cd to '/boot' and
run 'mkinitrd'.

reboot.

it has been a while that i last ran such, but i do believe that is it.


hth.


--

peace out.

tc,hago.

g
.

****
in a free world without fences, who needs gates.
**
help microsoft stamp out piracy - give linux to a friend today.
**
to mess up a linux box, you need to work at it.
to mess up an ms windows box, you just need to *look* at it.
**
learn linux:
'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html
'The Linux Documentation Project' http://www.tldp.org/
'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge' http://howtoforge.com/
****

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-17-2010, 03:25 AM
"Kevin J. Cummings"
 
Default How to move my / partition

On 02/16/2010 07:49 PM, g wrote:
>> Chris Tyler wrote:
>>
>>>> I want to move the / partition on a (very ancient) Fedora-12 desktop
>>>> from one SCSI disk to another (/dev/sdb3 to /dev/sda6),
>>>> because the second disk is showing some signs of sickness.
> <snip>
>> But unfortunately these are not LVM partitions, as I should have said.
>
> to be *terse*:
>
> read;
> man rsync { note -a -u -v options
> man mkinitrd
> man fstab
> man grub.conf { if there was one

No, grub has an info page:

info grub

> man chroot

--
Kevin J. Cummings
kjchome@rcn.com
cummings@kjchome.homeip.net
cummings@kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-17-2010, 03:47 AM
g
 
Default How to move my / partition

Kevin J. Cummings wrote:

> No, grub has an info page:
>
> info grub

this is true.

i am 'old school' and keep forgetting about 'info'.

--

peace out.

tc,hago.

g
.

****
in a free world without fences, who needs gates.
**
help microsoft stamp out piracy - give linux to a friend today.
**
to mess up a linux box, you need to work at it.
to mess up an ms windows box, you just need to *look* at it.
**
learn linux:
'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html
'The Linux Documentation Project' http://www.tldp.org/
'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge' http://howtoforge.com/
****

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-17-2010, 12:41 PM
Timothy Murphy
 
Default How to move my / partition

g wrote:

>>>> I want to move the / partition on a (very ancient) Fedora-12 desktop
>>>> from one SCSI disk to another (/dev/sdb3 to /dev/sda6),
>>>> because the second disk is showing some signs of sickness.
> <snip>
>> But unfortunately these are not LVM partitions, as I should have said.
>
> to be *terse*:
>
> read;
> man rsync { note -a -u -v options
> man mkinitrd
> man fstab
> man grub.conf { if there was one
> man chroot
>
> with /dev/sda5 mounted, 'rsync' / to /mnt/sda6 [or how ever you have it
> mounted].
...

So you are saying, basically, that one can safely copy /
on a running system?

--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-17-2010, 12:56 PM
Roberto Ragusa
 
Default How to move my / partition

Timothy Murphy wrote:

> So you are saying, basically, that one can safely copy /
> on a running system?

There are no particular problems in doing that.
I would use cp, with the option to not enter subfilesystems
(you really do not want /proc) and options to copy everything
(e.g. extended attrs).

It will be smart to avoid running data-changing stuff
during the copy (email fetching, a running mysql).
Simply dropping to level 1 will take care of that for you.

You will just have interrupted logs in the new copy (it will
look like a crash and reboot).

--
Roberto Ragusa mail at robertoragusa.it
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-17-2010, 06:43 PM
g
 
Default How to move my / partition

Timothy Murphy wrote:

> So you are saying, basically, that one can safely copy /
> on a running system?

yes.

as mentioned by roberto, best done at 'level 1' as root. my apoligies for not
mentioning such and '/proc'.

i do tend to be 'terse' and forgetful of this being a 'tsl' [tech support
list] where all points should be presented as if poster is a 'newbie' and
for a sake of a 'newbie' who might be reading 'tsl' on a web page.

in as much, using 'rsync' vs 'cp' gives advantage of an output of files
copied which maybe redirected to a file. running 'rsync' a second time and
redirecting output to a second file will show if any files where missed.
seldom has this found any.

i have used 'cp -a' as a test for backup copies followed by 'rsync' and found
files that where not copied.

another advantage of learning 'rsync', not all versions of 'cp' [5.97] have
ability to skip directories as 'rsync' has.


later.

--

peace out.

tc,hago.

g
.

****
in a free world without fences, who needs gates.
**
help microsoft stamp out piracy - give linux to a friend today.
**
to mess up a linux box, you need to work at it.
to mess up an ms windows box, you just need to *look* at it.
**
learn linux:
'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html
'The Linux Documentation Project' http://www.tldp.org/
'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge' http://howtoforge.com/
****


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-18-2010, 02:39 AM
Timothy Murphy
 
Default How to move my / partition

Mikkel wrote:
>> I want to move the / partition on a (very ancient) Fedora-12 desktop
>> from one SCSI disk to another (/dev/sdb3 to /dev/sda6),
>> because the second disk is showing some signs of sickness.

>> Any help or suggestions gratefully received.
>>
> You may want to take a look at the gparted project - they have hard
> drive install documentation as well, as CD/USB/PXE boot images.
>
> http://gparted.sourceforge.net/livehd.php

I followed this advice, which enabled me to run the gparted Live CD
from my hard disk.
I found I had to choose the command-line interface,
as if I chose the default X interface I was asked for the root password,
which I did not know. (Pressing Return did not work.)
However, the command-line interface opened with root as user.

I copied my current / to the new partition with "cp -a".
I then added a new stanza to grub.conf with root=UUID=<new UUID>,
and made a similar change to fstab.

To my surprise, when I re-booted I found it was with the old / ,
and /etc/fstab had been re-written with the old UUID.
(/boot/grub/grub.conf still had the new UUID, but this was ignored.)

I looked at the initrd I was using,
but I saw no mention of sdb (or sda) in this.

I wonder should I edit /etc/mtab (which has the current / partition).
And if I need to re-make initrd how do I do this?

--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-18-2010, 04:36 PM
Mikkel
 
Default How to move my / partition

On 02/17/2010 09:39 PM, Timothy Murphy wrote:
>
> I copied my current / to the new partition with "cp -a".
> I then added a new stanza to grub.conf with root=UUID=<new UUID>,
> and made a similar change to fstab.
>
> To my surprise, when I re-booted I found it was with the old / ,
> and /etc/fstab had been re-written with the old UUID.
> (/boot/grub/grub.conf still had the new UUID, but this was ignored.)
>
> I looked at the initrd I was using,
> but I saw no mention of sdb (or sda) in this.
>
> I wonder should I edit /etc/mtab (which has the current / partition).
> And if I need to re-make initrd how do I do this?
>
You will probably find a reference to the old UUID instead of a
device. It should be using the UUID from the kernel command line,
but it does not sound like it is. Maybe it is time for a bug report?

As far as editing /etc/mtab, this will not do you any good, and may
cause you problems on shutdown. mtab is a list of mounted file
systems. It is not a complete list, as it does not show anything
mounted before / is remounted rw. Also, some things mount file
systems without putting an entry in mtab.

Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 09:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org