Link to home
Start Free TrialLog in
Avatar of Artine
Artine

asked on

Repair Superblock

I'm transferring my linux system from a 1GB drive to a 4GB drive.  It seems to have gone well for the most part, but I'm encountering an error upon booting from the new drive.  First, some background on how I did the transfer.

First I created 3 partitions proportional in size to the three on the old drive: one for /boot, one for / and a swap.  I then copied over the MBR from the old drive (hda) to the new drive (hdb): dd if=/dev/hda of=/dev/hdb bs=446 count=1.  Then, I used dd again to copy each data partition separately.  Finally, I used mkswap to initialize my swap space.

So I've got my new drive will all of the data and ready to boot.  But when it boots up, it complains about an invalid superblock for the /boot partition (hda1).  Since I copied everything over exactly, this is where the problem is coming from, but how can I set the superblock to something valid for the new sizes?  Obviously I don't have a legitimate backup at 8193; I don't have a legitimate backup anywhere.  Is there a way that I can create my own superblock from scratch and apply it?  Any other solutions?

Thanks in advance.
Avatar of chetankulthe
chetankulthe

Hello Artine,

You can use  HDD clone making software it will take care of everything,you can found it from :-
http://www.powerquest.com/drivecopy/ 


Chetan K Kulthe
Hello Artine ,
Make a boot disk, you need to boot after the files have been transferred
Install the new drive on a second slot, boot, and partition the drive the same
as the old one (sizes can vary)
Create the file system on the new partitions

Log in as root and move to / directory
Make a list of all the directories to copy by issuing:  ls | grep -v proc >
/root/files
 (As the proc does not exist we can exclude it)

Make a mount point for the new drive
Go to single user mode with init 1
Mount the new drive to the mount point you created
If you are still in / copy the files with tar cf - `cat/root/files` |
(cd/newdrive;tar xvpf -)
Take out the old drive and put the new one into the old drives port and reboot
using boot disk and run lilo
I think this about does it.

---------------------------------
-Chetan K Kulthe
---------------------------------

ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial