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

Re: Strange: Linux boots off a deleted partition [Was Re: Please help: Accidentally wiped off the whole hard disk!!!]



On Sun, May 15, 2005 at 03:17:31AM -0400, Deboo ^ wrote:
> I did a trial on a smaller hard disk. Installed knoppix on it,
> rebooted from the hdd to test it. Rebooted again from the Live CD and
> (after taking down the Linux partition info) deleted the partitions
> and created just one partition, and changed the type to bf (Solaris) 
> -- the same thing which happened with the other hard disk.
> 
> Now I tried booting off the hard disk just to check and it booted
> without problems. Strange because when I check with fdisk, this is
> what I see:
> 
> deboo@knoppix:~$ sudo fdisk -l /dev/hdc
> 
> Disk /dev/hdc: 3227 MB, 3227148288 bytes
> 255 heads, 63 sectors/track, 392 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
>    /dev/hdc1               1         392     3148708+  bf  Unknown
> 
> 
> There was one Linx partition and a Swap partition which I deleted. 
> 
> Can someone explain this behavior? If this hard disk boots alright
> then why doesn't the other hard drive boot when the same thing
> (accidentally) happened to it?

Not so strange ;-)

If you're using lilo as boot manager, it saves on bootsector where the
linux kernel physically is. So, even after erasing partition table,
lilo finds the kernel again.

Your previous linux partition was the first one. You deleted the
partition table, not the partitions themselves. So linux kernel tried
to mount /dev/hda1 as a filesystem, and as your old and your new
partitions start at the same point, it worked.

You only lost your swap partition.

Everything's clear now ;-)

Regards,
Cyprien



Reply to: