LinHES Forums
http://forums.linhes.org/

HOWTO: Creating a recovery diskette for KnoppMyth
http://forums.linhes.org/viewtopic.php?f=11&t=6074
Page 1 of 1

Author:  spalVl [ Fri Sep 16, 2005 10:16 pm ]
Post subject:  HOWTO: Creating a recovery diskette for KnoppMyth

This is a process I followed after upgrading my single disk KnoppMyth install. The hdd data was copied using an imaging utility (Symantec Ghost) to image the old drive to new drive. After the upgrade I found on new drive the lilo bootloader configuration MBR was corrupt and had to be repaired. When attempting to boot would receive "L I 99 99 99" Error and would halt boot.

Creating the Recovery diskette with a working Knoppmyth install

1. Switch to console mode and login with root
Code:
ALT + CTRL + F1

2. Make directory to mount floppy disk
Code:
mkdir /floppy

3. Insert and format diskette (all data on diskete will be lost)
Code:
fdformat /dev/fd0u1440

4. Create minix file system on floppy
Code:
mkfs -t minix /dev/fd0 1440

5. mount floppy disk
Code:
mount /dev/fd0 /floppy

6. Run Grub-Install script: The script will create /floppy/boot/grub and copy image files required for booting.
Code:
grub-install --root-directory=/floppy fd0

7. Create the grub menu file used to configure which disk grub boots from
Code:
pico /floppy/boot/grub/menu.lst

8. Edit the menu.lst file, change kernel line to reflect proper hard disk to boot from (below IDE Disk1, and root=1st partition) , save file when complete.
Code:
default 0
hiddenmenu
timeout 3
title KnoppMyth Recovery
kernel (hd0,0)/vmlinuz root=/dev/hda1

9. Unmount floppy disk
Code:
umount /floppy


To use the Recovery diskette to repair a damaged lilo configuration or MBR
1. Configure BIOS to boot from diskette (see PC or motherboard manual)
2. Insert Recovery Diskette and boot PC
3. After KnoppMyth frontend loads switch to console mode and login with root
4. Re-install LILO bootloader on the MBR of your hard drive using the configuration file /dev/lilo.conf
Code:
lilo -v

5. Reboot

Author:  knoppix4me [ Sat Sep 17, 2005 2:59 pm ]
Post subject: 

Ghost doesn't make an image copy. This is a common misconception. Ghost uses tar to store and extract the partition data. The reason LILO fails is because the files it expects to load are no longer in the same locations (block numbers) on the target drive. I found all this out myself recently, trying to do basically the same thing.

The bootloader is probably the only thing disturbed by copying a disk this way, so your restore method works.

Author:  lynchaj [ Sat Sep 17, 2005 3:34 pm ]
Post subject: 

This is a fabulous idea. I made my rescue boot disk as soon as I saw your post. Great idea. I recommend making a KnoppMythWiki.org page on this subject and/or including it as an option in KnoppMyth itself. You never know when lilo is going to get hosed for whatever reason.

Its cheap insurance that might be invaluable in a real emergency.

Thanks!

Andrew Lynch

Author:  randomhtpcguy [ Mon Nov 07, 2005 10:54 am ]
Post subject:  Restore Ghost Image corrupts LILO

Thanks for your help.

I used ghost to copy my drive to a larger drive and rebooting with the new drive failed with the same error L I 99 99 99 ...

I will try your solution to fix it.

Does anyone know if any options in Ghost version 8 could be used to recreate the boot sector correctly? There are some options when creating the image that seem like they may copy it sector by sector or include the boot sector, etc...

Any other disk image programs that would be as simple to use as ghost but not have this problem?

I think upgrading to a larger hard drive is a common desire for newbies or people who are upgrading to HD. So if this is the best solution maybe it should be in the FAQs or the upgrade guide.

Author:  spalVl [ Mon Nov 07, 2005 12:08 pm ]
Post subject: 

Quote:
Does anyone know if any options in Ghost version 8 could be used to recreate the boot sector correctly? There are some options when creating the image that seem like they may copy it sector by sector or include the boot sector, etc...

I toyed with a bunch of options in v6, v7, and 2000. I think I used sector/sector with no luck.
Quote:
So if this is the best solution maybe it should be in the FAQs or the upgrade guide.

I created a HOWTO on the wiki.
http://www.knoppmythwiki.org/index.php? ... ryDiskette

Author:  BluesBrian [ Sun Jul 15, 2007 4:49 pm ]
Post subject:  Re: HOWTO: Creating a recovery diskette for KnoppMyth

spalVl wrote:
4. Re-install LILO bootloader on the MBR of your hard drive using the configuration file /dev/lilo.conf
Code:
lilo ?v

5. Reboot


Should be
Code:
lilo -v

Author:  spalVl [ Sun Jul 15, 2007 5:23 pm ]
Post subject: 

Quote:
lilo ?v

Yeah, I've noticed the forum and KM wiki have some posts and howtos that have got screwed up charcters in them.

quotes, minus, and a few other characters seems to be prone.

Author:  BluesBrian [ Sun Jul 15, 2007 8:17 pm ]
Post subject: 

spalVl wrote:
Yeah, I've noticed the forum and KM wiki have some posts and howtos that have got screwed up charcters in them.

quotes, minus, and a few other characters seems to be prone.


I certainly don't point out the issue to be a pinhead. The contributors here do a fabulous job! It's cool that the forum and wiki have edit capabilities! :D
// Brian

Author:  Too Many Secrets [ Mon Sep 17, 2007 9:48 am ]
Post subject: 

Is there a way to do this on a CD or USB stick instead of a floppy? Maybe someone has a script? TIA

Author:  BluesBrian [ Mon Sep 17, 2007 11:51 am ]
Post subject: 

Too Many Secrets wrote:
Is there a way to do this on a CD or USB stick instead of a floppy? Maybe someone has a script? TIA

I have a discussion (sorry it's not very straight forward) about using the Install CD as a recovery diskette.
http://mysettopbox.tv/phpBB2/viewtopic.php?t=15883
(see the "Plan B" section)
I have not played with a USB booting device.

Author:  BluesBrian [ Sat Sep 22, 2007 11:03 am ]
Post subject: 

Note: Upon some review, I have edited this message rather significantly.

On my second posting on the thread:
http://mysettopbox.tv/phpBB2/viewtopic. ... light=R5F1
I discuss tweeks on the wiki page
http://www.knoppmythwiki.org/index.php? ... ryDiskette
that applies to R5F1or R5F27
Two points on Creating the Recovery diskette for R5F1 or R6F27:
1. Code tweek:
Code:
$ fdformat /dev/fd0u1440

becomes
Code:
$ fdformat /dev/fd0u

2. You have to install grub-install before the grub-install command will work.
Code:
apt-get update
apt-get install grub



Working the Recovery side:

Under R5C7, the Recovery Diskette worked nicely! and the system boots into a KnoppMyth menu .. It's a beautiful thing! .. even using the Hauppauge PVR-350 TV Out setup. You should have full access to the system for any recovery activity.

BUT (Houston, we have a problem!) .. under R5F1 and R5F27 there are some problems with using the Hauppauge PVR-350 TV Out setup. While watching on an attached monitor, the boot-from-floppy .. booting .. booting .. booting .. switches "on" the PVR-350 .. under R5F1 hangs on the initialization of the PVR-350 and under R5F27 hangs on a green-screen-of-hmmm that appears to be the regular intialization screen for the PVR-350 (under normal Knoppmyth boot, the switch-over to the PVR-350 flashes a green screen before it comes up in a black and white text screen that displays the final booting text before the X-gui screen comes up.) The last text visible on the monitor indicates initializing the PVR-350. This state will remain until <Ctrl>-<Alt>-<Del> is pressed and the system will shut-down for a reboot. As far as I could find, no other key sequence operates (I tried <Ctrl>-<Alt>-<Bkspc>, <Ctrl>-<Alt>-<F1> through <Ctrl>-<Alt>-<F7>.)

Booting from the Installation CD does not bring up R5F27. (boot on CD, choose "7. Quit", mount the drive, chroot to the drive). Except that, here, after you get the "green-screen-of-hmmm" on the TV, the monitor is still operating and the various <Ctrl>-<Alt>-keys do work and you are at a working prompt. This is what is supposed to happen! At this point, you are able to apply the repairs needed, such as rebuild the MBR (Maste Boot Record).

Ideas anyone?

Author:  nickread [ Sun Mar 08, 2009 3:23 am ]
Post subject: 

I've just had to do this using the installation CD as I didn't have a recovery diskette (and my floppy drive is probably too old anyway) :D

Write up here http://mysettopbox.tv/phpBB2/viewtopic.php?t=19663&highlight=

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/