View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 7 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Jul 07, 2008 3:56 pm 
Offline
Joined: Mon Oct 18, 2004 12:22 pm
Posts: 66
Location: orange county ca
This is probably really just a general linux question:

I have a new bigger harddrive to replace the older one. I simply want to copy everything over.

I used the 'dd' command, and it dutifully copies everything over, partitions and all, seemingly perfect..

Until I swap out the old drive and swap in the new one. My system wont boot. The data is there because I can look at it when I connect the drive on a working system. But something is missing when it tries to boot from it.

I can't figure out what to do.

Of course, the next step after getting it to boot would be to resize the myth partition to use up all the new space, but I havent even gotten that far yet (parted should be able to do this, no?).

The other idea I had was to simply install the latest 5.5 on the new drive, and then copy the backup files from the old drive, and do a restore backup.. would that work? Would I be better off reinstalling R5F27 and do the backup restore, and then do an upgrade to 5.5?

_________________
--
Lead Developer, Trixbox CE.
Fonality, inc.


Top
 Profile  
 
PostPosted: Mon Jul 07, 2008 4:26 pm 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
greywire wrote:
My system wont boot. The data is there because I can look at it when I connect the drive on a working system. But something is missing when it tries to boot from it.


Problem: You have no boot record (used to tell the machine where to look on the disk for an operating system).
Solution: You can copy the old one with dd using the device names of the whole disks, whereas before you just used the partition. Let's say you have old disk /dev/sda and new disk /dev/sdb. Boot from your old disk, then try "dd if=/dev/sda of=/dev/sdb bs=512 count=1". Power the computer off, disconnect the old disk and power on. You should now be able to boot.

It will be a bit more difficult if your old disk is IDE and new one is SATA, but not that difficult. Look at Google for "linux root=<blah> boot=<blah2> single". You will need to note down the kernel version, and enter the lilo prompt's options with the ctrl or shift keys.

Regards

Mike

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Top
 Profile  
 
PostPosted: Mon Jul 07, 2008 5:57 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
manicmike wrote:
Solution: You can copy the old one with dd using the device names of the whole disks, whereas before you just used the partition. Let's say you have old disk /dev/sda and new disk /dev/sdb. Boot from your old disk, then try "dd if=/dev/sda of=/dev/sdb bs=512 count=1". Power the computer off, disconnect the old disk and power on

Why not just use the CD in rescue mode and run lilo? That's far more likely to give good results and avoid accidents.
http://www.knoppmythwiki.org/index.php?page=WillNotBootAfterInstall
http://www.knoppmythwiki.org/index.php?page=ReinstallingTheLiloBootloader

OBTW - I usually recommend that folks copy disks at the file level rather than at the sector level.

1) Partition and format the drive (use cfdisk and mkfs)
2) Use rsync in archive mode to copy the contents (be careful not to try copying pseudo file system like /proc)
3) Install lilo from rescue mode.

I actually use this method in my deep backup script (published elsewhere in the forums) to snapshot my file system before any risky experiments.


Top
 Profile  
 
 Post subject: no luck..
PostPosted: Thu Jul 10, 2008 12:32 pm 
Offline
Joined: Mon Oct 18, 2004 12:22 pm
Posts: 66
Location: orange county ca
When I did the DD command I did just as described, on /dev/hda and not on the individual partitions. It copied everything over, creating the same partitions, but I could not boot from it.

I then tried the reinstall of lilo, and I followed the wiki page instructions. It seemed to have worked fine, but I still could not boot.

I tried just doing an auto upgrade to 5.5, hoping in the process it might fix the issue. No go.

Can you show me how I might use the rsync command to do this (I can handle the partitioning part)?

_________________
--
Lead Developer, Trixbox CE.
Fonality, inc.


Top
 Profile  
 
PostPosted: Thu Jul 10, 2008 1:32 pm 
Offline
Joined: Thu Jun 01, 2006 8:27 pm
Posts: 36
greywire wrote:
The other idea I had was to simply install the latest 5.5 on the new drive, and then copy the backup files from the old drive, and do a restore backup.. would that work? Would I be better off reinstalling R5F27 and do the backup restore, and then do an upgrade to 5.5?
Either one sounds like a good solution.

Do you want to keep both disks in the machine? If so, I would just leave the smaller disk as is, copy your existing /myth/tv files to the new disk, wipe your old /myth/tv, and then mount the larger disk as /myth/tv.

To use rsync to copy the contents of /myth/tv:
Code:
rsync -a /myth/tv/ /mnt/

The trailing slashes are important.


Top
 Profile  
 
PostPosted: Thu Jul 10, 2008 2:43 pm 
Offline
Joined: Fri Jan 06, 2006 9:35 pm
Posts: 64
Location: Northern Kentucky
hari wrote:
Do you want to keep both disks in the machine? If so, I would just leave the smaller disk as is, copy your existing /myth/tv files to the new disk, wipe your old /myth/tv, and then mount the larger disk as /myth/tv.

To use rsync to copy the contents of /myth/tv:
Code:
rsync -a /myth/tv/ /mnt/

The trailing slashes are important.


This sounds like it might be the option that I would want to go. I've been reading up on the other options; LVM vs. Storage groups. LVM seems to be the worst option and hardware raid is limited on drivers.

I can get the drive over to another machine and R5.5 loaded. Could you help a newbie on some detailed steps for getting the new drive set up and mounted? The original drive is a IDE and the new drive is SATA. I plan to have all recordings removed before I upgrade, so /myth/tv should be empty.


Top
 Profile  
 
 Post subject: Re: no luck..
PostPosted: Thu Jul 10, 2008 6:21 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
greywire wrote:
Can you show me how I might use the rsync command to do this (I can handle the partitioning part)?

Actually search for recent posts by me that mention rsync. I just wrote up the instructions for someone else...


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 13 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu