Can't Boot after Partition Magic Manipulation

Can't Boot after Partition Magic Manipulation

Post by simon » Thu, 18 Jul 2002 19:17:07



hi, I needed to change my drives around.
I hooked up my Linux drive as a slave on a w2k machine and copied my linux
(Debian 2.2) onto another drive using PartionMagic 7.
Then I copied the linux image back to the destination drive, but it won't
boot and the rescue floppy thinks it needs to reinstall the system.
I can access all the linux data ok.
Can this be fixed?
Thanks
simon
 
 
 

Can't Boot after Partition Magic Manipulation

Post by Marco Sha » Fri, 19 Jul 2002 01:30:03



> hi, I needed to change my drives around.

http://www.debian.org/releases/stable/i386/ch-rescue-boot.en.html#s-f...

Read through F1 and F10.  What you may need to do is give "boot:" some
kind of option like "root=/dev/hda1" to tell the kernel on the floppy to
mount this partition as your / partition.

Then, you somehow need to rerun /sbin/lilo.  I'm not sure if you'll need
any extra arguments to it though.

Marco

 
 
 

Can't Boot after Partition Magic Manipulation

Post by renrut » Fri, 19 Jul 2002 09:10:36



Quote:> hi, I needed to change my drives around.
> I hooked up my Linux drive as a slave on a w2k machine and copied my linux
> (Debian 2.2) onto another drive using PartionMagic 7.
> Then I copied the linux image back to the destination drive, but it won't
> boot and the rescue floppy thinks it needs to reinstall the system.
> I can access all the linux data ok.
> Can this be fixed?
> Thanks
> simon

If you use lilo as your boot loader *and* you have your kernel (vmlinuz*) in
the root partition itself (i.e. not in a physically separate /boot
partition), then you may need to rerun lilo to update the MBR on your drive.
Lilo hard-codes the location of the kernel in the MBR of your boot drive
whenever you run /sbin/lilo.  The BIOS, after doing it's initial processing,
will read the MBR and then x'fer control to whatever location is specified,
i.e. run whatever's at cylinder 1492, sector 7.  This is normally the kernel
which carries out the rest of the boot process.  If your kernel is no longer
at cylinder 1492, but is now at cylinder 1200 (because you've moved it to a
new partition) then your boot process will fail.  Note, GRUB does not have
this problem as it dynamically determines the location of the kernel at run
time.

Of course, you need to be able to boot into a Linux system in order to run
/sbin/lilo.  But since you can read the partition, I presume you have
another system you can boot into.

 
 
 

Can't Boot after Partition Magic Manipulation

Post by renrut » Fri, 19 Jul 2002 09:14:59



Quote:> hi, I needed to change my drives around.
> I hooked up my Linux drive as a slave on a w2k machine and copied my linux
> (Debian 2.2) onto another drive using PartionMagic 7.
> Then I copied the linux image back to the destination drive, but it won't
> boot and the rescue floppy thinks it needs to reinstall the system.
> I can access all the linux data ok.
> Can this be fixed?
> Thanks
> simon

If you use lilo as your boot loader *and* you have your kernel (vmlinuz*) in
the root partition itself (i.e. not in a physically separate /boot
partition), then you may need to rerun lilo to update the MBR on your drive.
Lilo hard-codes the location of the kernel in the MBR of your boot drive
whenever you run /sbin/lilo.  The BIOS, after doing it's initial processing,
will read the MBR and then x'fer control to whatever location is specified,
i.e. run whatever's at cylinder 1492, sector 7.  This is normally the kernel
which carries out the rest of the boot process.  If your kernel is no longer
at cylinder 1492, but is now at cylinder 1200 (because you've moved it to a
new partition) then your boot process will fail.  Note, GRUB does not have
this problem as it dynamically determines the location of the kernel at run
time.

Of course, you need to be able to boot into a Linux system in order to run
/sbin/lilo.  But since you can read the partition, I presume you have
another system you can boot into.