[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: deleted /boot files



On Mon, 27 Dec 2004, Harland Christofferson wrote:

> while getting ready to build a raid 1 array, i accidentally deleted 
> the /boot files. the partition is still there however and is still 
> flagged as boot partition.
> 
> although i have a boot floppy for this machine, i could not retrieve 
> a backup of the /boot partition from another hard disk i have. in 
> a novice attempt to resolve this, i copied the /boot partition from 
> another machine and reboot.  upon rebooting w/ the boot floppy, i 
> ran lilo to try to rebuild the MBR. lilo complains:

you CANNNOT copy  /boot from one disk to another ...

-- you just destroyed /boot on the other disk you copied onto
   and so its right, that it panics

-- to recover ...
	- i assume the kernel from the other disk is the same as
	what oyu need on your current disk

	- i assume your floppy boots

	insert floppy and tell it  "root=/dev/md1"  or whatever
	you have as your /  for your system

	- if you cannot boot off of floppy, insert a debian
	install floppy/cd or knoppix cd
 
	- manually build /dev/md0 ( if that is /boot )
		- mdadm  [options] /dev/hdaxx /dev/hdcxxx .. 
		( options would change depending on what the problem is )
			- google for examples that matches your problem

		- mke2fs -j /dev/md0
		- mount /dev/md0 /boot
		- copy the files from a working /boot onto the raid /boot

		- required files in /boot:  vmlinuz map  and any other
		  files used by lilo.conf or (grub)menu.lst

		- run  lilo or grub and reboot

> > Fatal: First sector of /dev/hda1 doesn't have a valid boot signature

correct
  
> how can i fix my /boot partition so that the machine can boot without 
> the files in the boot or root partitions that originally were part 
> of this machine?

/boot is NOT needed to boot ... you can "boot" off anything
	( floppy, cd, network, ... )

/  ( the rootfs ) must be working 

c ya
alvin



Reply to: