Kernel panic - Confused partitions

NetMasker netmasker at yahoo.com
Thu Dec 9 23:55:18 EET 2004


Well,
I booted in rescue mode and I made a "chroot /mnt/sysimage". In my surprise
the /boot folder had contents now!

#cat /etc/lilo.conf
prompt
timeout=50
default=linux
boot=/dev/hda7
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32
image=/boot/vmlinuz-2.4.18-3
        label=linux
initrd=/boot/initrd-2.4.18-3.img
read-only
root=/dev/hda8
other=/dev/hda5
        optional
        label=winxp
other=/dev/hda6
        optional
        label=DOS
other=/dev/hda1
        optional
        label=win2k

#lilo -t -v
Reading boot sector from /dev/hda7
Merging with /boot/boot.b
Mapping message file /boot/message
Boot image: /boot/vmlinuz-2.4.18-3
Mapping RAM disk /boot/initrd-2.4.18-3.img
Added linux *
Boot other: /dev/hda5, loader /boot/chain.b
Added winxp
Boot other: /dev/hda6, loader /boot/chain.b
Added DOS
Boot other: /dev/hda1, on dev/hda, loader /boot/chain.b
Added win2k
The boot sector and the map file have *NOT* been altered.

#fdisk -l /dev/hda
Disk /dev/hda: 255 heads, 63 sectors, 4866 cylinders
Units=cylinders of 16065 * 512 bytes
Device    Boot    Start         End        Blocks        id    System
/dev/hda1    *        1            1402    11261533    7     HPFS/NTFS
/dev/hda2            1403       4863    27816545    f      Win95 Ext'd (LBA)
/dev/hda5            1403       3442    16386268    7     HPFS/NTFS
/dev/hda6            3443       3448          48163    83   Linux
/dev/hda7            3449       4332      7100698    83   Linux
/dev/hda8            4333       4462      1044193    82   Linux swap
/dev/hda9            4463       4865      3237066     b    Win95 FAT32

Now I am sure that the partitions are confused! (I remeber them and I can
also recognise them from their size - you can see it in "lilo.conf" also):
hda6 was set up to be the dos partition
hda7 was set up to be the boot partition
hda8 was set up to be the root partition
hda9 was set up to be the swap partition
the rest are ok.

Can I fix this now and how??
Thanks in advance


"Tommy Reynolds" <TommyReynolds at yahoo.com> wrote in message
news:pan.2004.12.06.22.31.05.214920 at yahoo.com...
> On Tue, 07 Dec 2004 00:11:51 +0200, NetMasker wrote:
>
> > Thanks for your response Tommy but it seems that I didn't erased my root
> > partition.  I booted again with the cd-rom rescue method and I can see
> > my files and linux files also.
>
> Cool.  This is very good news.
>
> > But I think my partitions are still confused. I tried to unmount and
> > mount the partitions again but it told me that they were mounted
> > differently in /etc/mtab.
>
> "/etc/mtab" is a generated file.  You could safely delete it and try
> rebooting.  That won't solve the problem but if you could post the
> new content it may help us track this down.
>
> > What if I run lilo again? I use the windows nt boot loader to boot and I
> > don't want to destroy this.
>
> Don't bother.
>
> > I run the test: "lilo -t -v" and I took this message: fatal: open
> > /boot/boot.b: No such file or directory. I also noticed that the "/boot"
> > directory has no contents (but the others directories are ok).
>
> What happens if you boot via rescue mode, and switch to your hard
> drive.  Assume that rescue mode has mounted your root filesystem as
> "/sysimage"; you might try this:
>
> # chroot /sysimage
> # lilo -t -v
>
> so lilo will look at your hard drive files, not those of the rescue
> media.
>
> > Below is the boot error again:
> > ----------------------
> > Creating root device
> > Mounting root filesystem
> > Kjournald starting. Commit interval 5 seconds. EXT3-fs: mounted
> > filesystem with ordered data mode. pivotroot: pivot_root(/sysroot/,
> > /sysroot/initrd) failed: 2 Freeing unused kernel memory: 280k free
> > Kernel panic: No init found. Try passing init= option to kernel.
> > ----------------------
>
> Hmmm... this is the classic behavior when the root file system is not
> mounted correctly.
>
> 1.  What does your "/etc/lilo.conf" file look like?
>
> 2.  What does "fdisk -l /dev/hda" output show?
>
> Cheers!
>





More information about the Linux-greek-users mailing list