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

Re: I screwed up my LILO/HD/partitions - Help!



If you want, I can send you an image of GRUB floppy. The image can be
write to a floppy by rawrite. You can boot you computer into GRUB prompt
by this floppy. After entering several commands, your Linux box will be
running. Then you can run lilo again to rewrite the MBR of hda. I have
tested this GRUB floppy many times.

For your case, the GRUB command should be:
---------------
grub> kernel (hd1,0)/boot/vmlinuz-2.x.x root=/dev/hdb1
grub> boot
---------------
The 1.44MB image file will be sent to you upon your reply.

Qian

On Wed, 14 Aug 2002 MallarJ2@aol.com wrote:

> I'm in urgent need of some help in recovering my system.  I've made (I
> think) a serious error with LILO and now I can't get my partition
> mounted.
>
> * I run a dual-boot system with Win2k and Potato
>
> * /dev/hda is my Win2k drive
> * /dev/hdb is my Linux drive
> * /dev/hdb1 is my Linux root partition
> * /dev/hdb2 is my Linux swap partition
>
> I have my Win2k NTloader configured as follows:
>
> [boot loader]
> timeout=30
> default=c:\bootsect.219
> [operating systems]
> c:\bootsect.219="Linux 2.2.19"
> multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000
> Professional" /fastdetect
>
>
> So, I boot my system off of /dev/hda (Win2k), which loads the boot
> sector for /dev/hdb and boots into Linux.
>
> Now the problem.  I wanted to get rid of the Win2k partition altogether
> and use it for another backup/data drive.  I thought I could just make
> /dev/hdb bootable via lilo, reformat my /dev/hda drive, and things would
> be cool.  Not so.
>
> I updated my lilo.conf to boot from /dev/hdb and mount root as /dev/hdb1
> and did a lilo -t and lilo to test and install it.  No errors.
>
> Now, I can't boot up my Linux partitions at all.  I put my CD Rom where
> /dev/hda used to be so my BIOS would keep the same drive locations, and
> tried to boot the system.  The PC boots, but it never loads my Linux
> partition, it just displays a blinking cursor at me.  No lilo prompt,
> nothing.
>
> I then put my Win2k drive back into /dev/hda's slot and tried to boot
> using the NT loader, this is a bit better, I can boot up Win2k just
> fine, but when I tried to access the Linux partition, it displays "LIL-"
> and just locks up.  I have a feeling I know the problem here, I forgot
> to copy the boot sector from the Linux partition back onto my
> c:\directory as c:\bootsect.219.
>
> I put my CDROM back into /dev/hda's slot and loaded up the Potato CD's
> (I don't have boot floppy, the disk fails during reads now - it's old).
> I tried in vain to mount the Linux partitions but got nowhere.  Here's
> some things I did (in the shell) and the results:
>
> mount /dev/hdb1 /target
> Gives me the "wrong fs, bad option, bad superblock, or too many file
> systems" error
>
> mount -t ext2 /dev/hdb1 /target
> Same error
>
> mount -t ext2 /dev/hdb /target
> Same error
>
> cfdisk /dev/hdb
> Shows my partition table as:
>
> /dev/hdb1 Boot Primary Linux ext2
> /dev/hdb2 Primary Linux swap
>
> Dumping the table in detail "p" command:
>
> -------START-------         ---------END--------
> Flags Head Sec Cyl ID Head Sec cyl
> 1 0x80 1 1 0 0x83 254 63 1023
> 2 0x00 254 63 1023 0x82 254 63 1023
> 3 0x00 0 0 0 0 0 0 0
> 4 0 0 0 0 0 0 0 0
>
> fdisk /dev/hdb
> Showed me this (I forget which command generated it [not quite verbatim,
> but close]):
>
> Number of cylinders set to 3649
> Nothing is wrong, but it's greater than 1024
> This can cause problems with LILO
>
> The "v" command responds:
> 62 unallocated sectors
>
> The "p" command displays:
>
> Start End Blocks ID
> /dev/hdb1 Boot 1 3585 28796481 83
> /dev/hdb2 3586 3469 514080 82
>
>
> I'm afraid to do much more in fear of wiping out my /dev/hdb drive.  I
> don't really care about the /dev/hda drive, other than I can use it to
> boot up and get online to send this e-mail.
>
> I don't know what else to try. I *really* need to keep the data on
> /dev/hdb if at all possible.  I know, I know, I need a backup.  I've
> been trying for weeks to get a successful backup and haven't yet found
> anything that works.
>
> Right now, the immediate need is to get my Linux partition mount.
>
> The next thing to figure out is how to switch the drives so /dev/hdb
> becomes /dev/hda.  If we can kill two birds with one stone, all the
> better.
>
> Please, any assistance you can offer be greatly appreciated.
>
> Thanks,
> Jay
>



Reply to: