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 01-18-2008, 03:30 PM
"Daniel B. Thurman"
 
Default Having a hard time copying root filesystem to new drive...

Sigh... I pulled an all-nighter trying to copy my existing root filesystem
onto a new drive due to running out of filesystem space. Seems that
I was able to cp -a the existing drive to my new filesystem partition,
was able to properly setup the fstab, relabel, and so on, was able
to see grub working but when it came to starting up the new drive,
I get the following errors:

....blah....blah
Uncompressing Linux... Ok, booting the kernel.
Red Hat nash version 6.0.19 starting
Unable to access resume device (LABEL=SWAP-sda3) <- have to rebuild the initrd file....
mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
[hang]

What am I doing wrong?
More importantly, what is the proper procedure in making a copy of your
existing root filesystem onto a new drive partition?

Thanks!
Dan


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-18-2008, 08:08 PM
Robin Laing
 
Default Having a hard time copying root filesystem to new drive...

Daniel B. Thurman wrote:

Sigh... I pulled an all-nighter trying to copy my existing root filesystem
onto a new drive due to running out of filesystem space. Seems that
I was able to cp -a the existing drive to my new filesystem partition,
was able to properly setup the fstab, relabel, and so on, was able
to see grub working but when it came to starting up the new drive,
I get the following errors:

....blah....blah
Uncompressing Linux... Ok, booting the kernel.
Red Hat nash version 6.0.19 starting
Unable to access resume device (LABEL=SWAP-sda3) <- have to rebuild the initrd file....
mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
[hang]

What am I doing wrong?
More importantly, what is the proper procedure in making a copy of your
existing root filesystem onto a new drive partition?

Thanks!
Dan




If you used LVM partitions, you only need to add another partition to
that partition. Then grow the file system.


If you have not used LVM, then look at splitting your partitions around
and going from there. How much space and what partitions do you have.


I normally put my home on a separate drive and then put the OS on it's
own drive.


Can you supply a df -h of your system?



--
Robin Laing

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-18-2008, 08:46 PM
John Summerfield
 
Default Having a hard time copying root filesystem to new drive...

Daniel B. Thurman wrote:



What am I doing wrong?

Dunno.
Dunno what you did.

More importantly, what is the proper procedure in making a copy of your
existing root filesystem onto a new drive partition?


Ask google. It's done often enough.




--

Cheers
John

-- spambait
1aaaaaaa@coco.merseine.nu Z1aaaaaaa@coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-18-2008, 10:01 PM
"Daniel B. Thurman"
 
Default Having a hard time copying root filesystem to new drive...

Robin Laing wrote:
> Daniel B. Thurman wrote:
> > Sigh... I pulled an all-nighter trying to copy my existing
> root filesystem
> > onto a new drive due to running out of filesystem space. Seems that
> > I was able to cp -a the existing drive to my new filesystem
> partition,
> > was able to properly setup the fstab, relabel, and so on, was able
> > to see grub working but when it came to starting up the new drive,
> > I get the following errors:
> >
> > ....blah....blah
> > Uncompressing Linux... Ok, booting the kernel.
> > Red Hat nash version 6.0.19 starting
> > Unable to access resume device (LABEL=SWAP-sda3) <- have
> to rebuild the initrd file....
> > mount: could not find filesystem '/dev/root'
> > setuproot: moving /dev failed: No such file or directory
> > setuproot: error mounting /proc
> > setuproot: error mounting /sys: No such file or directory
> > switchroot: mount failed: No such file or directory
> > [hang]
> >
> > What am I doing wrong?
> > More importantly, what is the proper procedure in making a
> copy of your
> > existing root filesystem onto a new drive partition?
> >
>
> If you used LVM partitions, you only need to add another partition to
> that partition. Then grow the file system.
>
> If you have not used LVM, then look at splitting your
> partitions around
> and going from there. How much space and what partitions do you have.
>
> I normally put my home on a separate drive and then put the
> OS on it's
> own drive.
>
> Can you supply a df -h of your system?
>

1) I am not using LVM
2) My original disk is too small - found a larger one and wish to
move my disk fs to this new drive.

I think I am asking a simple question but apparently maybe not so
simple :-) The question is, what is the proper way to transfer over
your root filesystem to a new drive/partition. I know that I got
the boot partition on the new drive working. It is the root partition
that I am having trouble with.

What I did was:

1) Add the new drive to the IDE cable
2) Boot with my original drive (it still works but running out of space)
3) Partition and label my new drive with:
/boot 100MB LABEL=/boot1
/ 40GB LABEL=/root1
swap 1GB LABEL=swap1
4) mounted the new /boot partition to /mnt
5) cd to /mnt
6) cp -a /boot .
7) umount /mnt
8) mounted the new / partition to /mnt
9) cd /mnt
10) cp -a /{bin,dev,etc,home,lib,opt,proc,root,opt,sbin,selin ux,srv,sys,tftpboot,usr,var} .
Note: Copy of dev, proc and sys does report errors as far as links and sockets, but
otherwise I assume this is ok, since how else is one to get these copied over?
11) Manually added the mount directories: boot, mnt, media
12) Manually added the otherwise empty directories: misc, net, tmp
and manually set the chmods and permissions
11) edited /etc/fstab with new labels - different from original fstab
12) umount /mnt
13) fsck'ed new boot and root partitions
14) shutdown
15) Remove original drive and add new drive
16) Boot in rescue CD
17) chroot /mnt/sysimage
18) mount new /boot partition to /boot
19) grub-install /dev/sda
20) unmount /boot
21) edit /etc/fstab and ensure labels are correct
22) exit (chroot)
23) remove rescue CD
24) reboot

Grub finds /boot and then starts up, but with errors as reported above.

Anything I miss?

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-18-2008, 10:48 PM
Les Mikesell
 
Default Having a hard time copying root filesystem to new drive...

Daniel B. Thurman wrote:


mount: could not find filesystem '/dev/root'

8) mounted the new / partition to /mnt
9) cd /mnt
10) cp -a /{bin,dev,etc,home,lib,opt,proc,root,opt,sbin,selin ux,srv,sys,tftpboot,usr,var} .
Note: Copy of dev, proc and sys does report errors as far as links and sockets, but
otherwise I assume this is ok, since how else is one to get these copied over?
11) Manually added the mount directories: boot, mnt, media
12) Manually added the otherwise empty directories: misc, net, tmp
and manually set the chmods and permissions


A 'cp --one-file-system -a / /mnt' should have done the same...


11) edited /etc/fstab with new labels - different from original fstab

[...]

21) edit /etc/fstab and ensure labels are correct


You also have to edit /etc/grub.conf (actually the target of its symlink
which may not be there if you haven't mounted your /boot in its relative
position). From rescue mode you might mount the /boot partition
somewhere, then look for grub/grub.conf. The root= in the kernel lines
have to match where your new / partition will be.


Hmmm... You should be able to hit a key to get to the grub prompt when
booting and edit this on the fly instead of a rescue boot again. Then
once you are running, edit /etc/grub.conf.


--
Les Mikesell
lesmikesell@gmail.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-18-2008, 11:19 PM
Duane Clark
 
Default Having a hard time copying root filesystem to new drive...

Daniel B. Thurman wrote:

...
11) edited /etc/fstab with new labels - different from original fstab


The boot file /boot/initrd* has the disk labels embedded in it. And if
those labels are wrong, you get this message:
Unable to access resume device (LABEL=SWAP-sda3) <- have to rebuild the
initrd


My experience with LVM is that booting stops at that point when the
labels are wrong. It appears that without LVM, it continues a bit
longer, so I am not sure how critical it is in that case.


In my case (with LVM), I edited the file initrd by hand, according to
the method mentioned here:

http://mhensler.de/swsusp/
And in particular, the part starting with the line "Fedora requires an
initrd for booting..."


There is a utility "mkinitrd" which should create a new one, but I don't
know how to use it.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-19-2008, 02:32 AM
"Aldo Foot"
 
Default Having a hard time copying root filesystem to new drive...

On Jan 18, 2008 3:01 PM, Daniel B. Thurman <dant@cdkkt.com> wrote:


> > More importantly, what is the proper procedure in making a
> copy of your
> > existing root filesystem onto a new drive partition?



Cloning a disk or partition.

What I've done in days past:
1. Attach the new drive as slave
2. Partition the new slave drive. Make the partitions slightly bigger than the ones from the old drive

3. fsck the new partitions just in case.
4. Take note of the device names on both drives
****** master drive root partition /dev/sda1... etc.
****** slave drive root partition /dev/sdb1... etc.
5. Boot with knoppix or your favorite boot CD.

6. clone with
***** > dd if=/dev/sda1 of=/dev/sdb1
and you get an exact copy of your partition.
change the device name for all partitions you wish to clone.

~af


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-19-2008, 05:31 AM
Tim
 
Default Having a hard time copying root filesystem to new drive...

On Fri, 2008-01-18 at 08:30 -0800, Daniel B. Thurman wrote:
> Unable to access resume device (LABEL=SWAP-sda3) <- have to rebuild
> the initrd file....

Or simply remake the swap partition with that name. The name can be
anything, it doesn't have to be that name for /dev/sda3.

--
[tim@bigblack ~]$ uname -ipr
2.6.23.12-52.fc7 i686 i386

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-19-2008, 05:35 AM
Tim
 
Default Having a hard time copying root filesystem to new drive...

On Fri, 2008-01-18 at 15:01 -0800, Daniel B. Thurman wrote:
> Note: Copy of dev, proc and sys does report errors as far as links
> and sockets, but otherwise I assume this is ok, since how else is one
> to get these copied over?

I thought all of them (their contents) were created upon bootup (each
bootup), as required.

--
[tim@bigblack ~]$ uname -ipr
2.6.23.12-52.fc7 i686 i386

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 06:33 AM.

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