Linux unbootable, after copying partitions to new drive

PsychoR8der

Active Member
Joined
Jul 17, 2007
Messages
97
Reaction score
0
Location
Pretoria, Fearie glen
I had to copy a partition of linux (SUSE) to a new drive in order to make a backup of the system, (it was critical that everything stay exactly in tact as on original drive) but now I am having trouble to boot into those partitions. I already tried to repair the boot loader, and fic the MBR, but nothing worked, and it kept giving the error "no operating system".

Please can anyone help?
 
Did you remember to flag the partition as bootable in fdisk/cfdisk?
 
sounds like you haven't fixed the MBR because it's loading the dos/windows one. Grub or lilo? You need it installed to MBR.

You'll have to boot into a rescue environment. Fortunately for you, SUSE makes this quite easy. Boot off the CD/DVD. DO NOT choose Rescue. Choose install instead. When all the gui stuff has loaded, you'll get to a point where it asks you if you want to make a new install, upgrade or boot into an existing install. Choose the existing one. What this does, is search your discs for an existing install, then boot it with the kernel from the CD/DVD.

The repair grub/lilo as you normally would.
 
I installed the linux MBR, because it said it was replacing the previous one in the linux Yast repair interface. I didn't flag the partition as active, I think the program flagged the swap partition, I'll try that and let you know thx.

Does it matter in what order the partitions are?
 
As far as linux goes, it doesn't matter what order the partitions are in - as long as they are correct in the /etc/fstab file. It also doesn't matter if your partition is set to "active" or "bootable" - only windows/dos needs that.

The "no operating system" comes from the dos/windows bootloader, which means you probably restored the backup that yast made.

Which version of SUSE are you running? grub or lilo? What error are you getting now?
 
Ok, so the "activeness" of the partition might not be the issue, but then how do i fix the /etc/fstab file. I'm using SUSE 10.2, Grub, and know that the linux OS is in teh hdd2 partition.
 
So your linux is installed in a single partition? If you can boot off the disc like I described above, your /etc/fstab is probably correct. Otherwise you'll get an error like "unable to mount /"

Also when you're booted into that mode (boot installed OS), try running this:

grub-install /dev/hda

You'll have to mess about with the options depending on your config. Check grub-install --help or man grub-install
 
I have a partition for linux and one for the swap, will let you know if I get it right. I'll also try and set the linux partition active so dos can find the operating system, and then see what happens.
 
It might be helpful to paste the output of a fdisk -l here for us to have a look at. Also paste your /etc/fstab and /boot/grub/grub.conf (if you use grub, not sure where lilo keeps its config).
 
1. First Partition = Linux, Ext3 (Active)
2. Second Partition = Linux Swap

/etc/fstab :
===========================================================
/dev/hdb3 / ext3 acl,user_xattr 1 1
/dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hdb1 /windows/D ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/sda1 /windows/E ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hdb2 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/hdd1 /data2 ext3 defaults 1 1
/dev/hdd1 /data3 ext3 defaults 1 1
===========================================================

/boot/grub/grub.conf Could not find file.


Original System:

1. First Partition = Linux Swap
2. Second Partition = Linux, Ext3

/boot/grub/grub.conf also didn't exist.

My original system had a grub boot loader menu, giving options for Linux, and windows 1, 2 and 3. In the BIOS, the first boot disk is C: where I think the loader is.

C: has 1 partition, only NTFS.

D: has 3 partitions, 1st NTFS, 2nd Linux Swap, 3rd Linux Ext3 where linux is situated and which boots when option 1 in bootloader is selected.

E: has 1 partition, NTFS, has Vista on.

F: has 2 partitions, 1st Linux Ext3, 2nd Linux Swap. This is where the duplicated OS should boot from.

I disabled the IDE 0 channel, and SATA 3 port, when I worked on F:. This deactivates the C: and D: and E: drives, because I don't want to damage that system, which works fine.

I think I might have gone a bit overboard with the information, but I think it might help you guys?

Oh, how do you run fdisk again? I'm a bit rusty.
 
As root :
Code:
fdisk -l
should list them.
 
Last edited:
PsychoR8der, that's good information. Please enabled all the IDE/SATA channels that were enabled before you started with this. To avoid confusion you need to have things as consistent as possible. Add the following:

1. Boot off the SUSE 10.2 CD and choose rescue. When you are in a commandline, do:

Code:
fdisk -l

and give us the output.

2. From the above I understand that you had three IDE hard drives - primary master (/dev/hda) had one NTFS partition. Primary slave (/dev/hdb) had one NTFS, one Linux swap, and your main Linux partition on. Secondary master (/dev/hdc) I assume was a optical drive or somethingelse/nothing. Secondary slave (/dev/hdd) was your backup disc onto which you backed up what was on your secondary master. Are these discs still all present and in the same order? If not, please discribe your current setup.

3. Your grub config is actually in /boot/grub/menu.lst (grub.conf is a Red Hat mod as far as I know). Please post.
 
I will get the needed information as soon as I can, and let you know, thx for the help so far. Currently busy with a few things, but won't be long till my next post.
 
Without all the information, the problem seems to be either than your bootloader is pointing to the wrong hard-drive or the wrong partition - or the partition is not bootable.

Lets see what fdisk and your grub conf say tho. :)
 
Top
Sign up to the MyBroadband newsletter
X