View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Aug 09, 2008 5:59 pm 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
I am attempting to migrate from a PATA boot drive to a SATA boot drive. I copy the image from the PATA drive to the SATA drive using driveimage 7, a technique I have used many times before with success. I boot the knoppmyth CD, choose quit and then:

0. mount /dev/sda1 so that it is writable, the chroot /mnt/sda1

1. edit lilo.conf and fstab so that the device names are changed from /devhda* to /dev/sda*

2. run lilo -v

3. reboot.

I get the following errors:

Code:
/linuxrc: Out of file descriptors
/etc/init: Out of file descriptors
Kernel panic - not syncing: Attempted to kill init!


I've done the forum searches and found various threads on this topic, but haven't found anything that solves the problem. Some additional info that I believe is important:

1. A clean install to the sata drive gives me a bootable system.

2. All use is Knoppmyth R5.5

3. There is no change of machine involved. I am using the same machine, which supports both PATA and SATA.

Any help would be greatly appreciated!

Marc


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 10, 2008 9:42 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Well I'm sure you can guess my recommendation so ...

What does bear repeating is that making an exact sector for sector copy of an existing HD image is often counter productive. Doing so tends to duplicate all sorts of suboptimal things (like fragmentation) even if the HDs are identical, and when they have different geometries the situation is even worse. You're far better off formatting and creating a FS appropriate for the new drive, doing a simple recursive copy in archive mode which will defrag the image while you're at it, and then reinstalling the boot loader.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 10, 2008 11:55 am 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
tjc wrote:
Well I'm sure you can guess my recommendation so ...

What does bear repeating is that making an exact sector for sector copy of an existing HD image is often counter productive. Doing so tends to duplicate all sorts of suboptimal things (like fragmentation) even if the HDs are identical, and when they have different geometries the situation is even worse. You're far better off formatting and creating a FS appropriate for the new drive, doing a simple recursive copy in archive mode which will defrag the image while you're at it, and then reinstalling the boot loader.


Interesting.. Are you saying that the follow will work:

1. Boot system to be copied.

2. Attach new disk via USB connector.

3. Create ext3 file system in new disk.

4. Mount ext3 partition on new disk at /mnt/new-disk

5. cp -a / /mnt/new-disk

6. shutdown

7. Attached new disk to IDE or SATA chain.

8. Boot knoppmyth install CD. Choose "7-quit", do the usual "chroot" stuff and a "lilo -v".

That will do it?

In terms of image copy -- I've used driveimage to do this many times. You are correct that it preserves the fragmentation, but I suspect it deals with the geometry changes, as I haven't had a problem before and driveimage was designed to deal with migrating to a new disk. Based on what I've read, I suspect the current problem is that the SATA drivers aren't being loaded...

Marc


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 10, 2008 7:46 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
That's essentially what I meant. Other refinements... I'd connect the drive via SATA or eSATA if possible since it will speed the copies significantly. I'd also use cp -ax to copy each file system separately. This will avoid problems trying to copy the pseudo-filesystems such as /proc or the like.

You don't even need to reboot or use the CD to do the lilo install you can simply edit the /new/etc/lilo.conf (fix the "boot" and "root" settings) and use the -C flag to have it use that.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 10, 2008 9:43 pm 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
tjc wrote:
You don't even need to reboot or use the CD to do the lilo install you can simply edit the /new/etc/lilo.conf (fix the "boot" and "root" settings) and use the -C flag to have it use that.


Just to be sure I understand -- Are you saying that I don't need to do the chroot stuff. Instead, if I've mounted the new root partition at "/new", I can simply "lilo -C /new/etc/lilo.conf", and lilo will update the boot sector of the new drive?

Marc


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 12:39 am 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location: California
TJC, I gave it a try. When I run "lilo -v", I get the error
Code:
 "Fatal: raid_setup: ("/dev/sda")


Marc


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu