Posts: 3
koinsky67
Joined: 30 Apr 2009
#1
Hello!

I've installed antiX-M8 on an old laptop (ACER Travelmate 202T) without network connection by cloning a HD partition from a desktop PC where I had an up-to-date system (originally antiX-M7.5, later upgraded to antiX-M8).

The kernel can't access the root filesystem (ext3); the error message is:

kernel panic - not syncing : VFS : unable to mount root fs on unknown-block (0,0)

I guess the cause is missing support for the HD controller in initrd.img?

Desktop: chipset = VIA Apollo Pro 133
Laptop: chipset = ALi M1621 / M1535

I don't think this matters but anyway...
The HD on the desktop PC is a 20GB Seagate (parallel IDE/ATA);
the only thing I know about the laptop HD is its size: 5GB.
---------------

(Assuming I'm right about the cause of the problem) my question is:
What's the easiest way to create a suitable initrd.img for the laptop?

Can I just boot from any liveCD (I've been using grml-2008.11), mount
the root partition (eg. on /mnt/sda1) and run mkinitrd with suitable
options, ie. [-d confdir] [-r root] -o /mnt/sda1/boot/mkinitrd.img?

Should I use: -d /mnt/sda1/etc/mkinitrd OR <default>
-r /dev/sda1

Should I add whatever module is required by"ALi M1621" (WHICH?) to
/mnt/sda1/etc/mkinitrd/modules beforehand? Or is it better to replace the laptop's /etc/mkinitrd/modules and /etc/mkinitrd/mkinitrd.conf with those from the liveCD?

OR can I just chroot to /mnt/sda1 and re-install the kernel (using a previously downloaded kernel package, via pendrive) as this will recreate initrd.img?

Thanks for any help!
Posts: 516
oldhoghead
Site Admin
Joined: 01 Oct 2007
#2
Before you do all that, usually a kernel panic with that error message can be resolved, first post the contents of your fstab, and device map and your menu.lst and then we will see if we can sort it out.

cheers,
oldhoghead
Posts: 3
koinsky67
Joined: 30 Apr 2009
#3
Hi oldhoghead! Thanks for helping!

The HD in the original PC was named"sda", but I cloned it onto another HD in another PC to reduce the partition size (so that it would fit into the laptop's 5GB HD. On this PC the HD was named"hda" so I had to edit fstab and menu.lst to make the system bootable.

I don't know why a cloned system would change the HD device name
from"sda" to"hda" as both HDs were parallel ATA!!

Faced with the boot problem on the laptop (after finally cloning the partition onto its HD) I decided to label the partitions and use labels in fstab and menu.ist to avoid this device naming issue (hda vs sda).
-----------------

This is the current device.map but I'm not sure it's the original one because I changed"sda" to"hda" (or vice-versa) once in my trials and I can't remember whether I've restored it.

rock:~/acer-202t# cat device.map
(fd0) /dev/fd0
(hd0) /dev/sda
-----------------

Here is the fstab (current and original versions):

rock:~/acer-202t# cat fstab
# Pluggable devices are handled by uDev, they are not in fstab
LABEL=ROOT / ext3 defaults,noatime 1 1
LABEL=SWAP swap swap sw,pri=1 0 0
proc /proc proc defaults 0 0
# procbususb /proc/bus/usb usbfs devmode=0666 0 0
# devpts /dev/pts devpts mode=0622 0 0
# sysfs /sys sysfs defaults 0 0

rock:~/acer-202t# cat fstab.old
# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda3 / ext3 defaults,noatime 1 1
/dev/sda4 swap swap sw,pri=1 0 0
proc /proc proc defaults 0 0
procbususb /proc/bus/usb usbfs devmode=0666 0 0
devpts /dev/pts devpts mode=0622 0 0
sysfs /sys sysfs defaults 0 0
# Dynamic entries below
/dev/sda1 /mnt/sda1 ext3 noauto,users,exec 0 0
/dev/sda2 /mnt/sda2 ext3 noauto,users,exec 0 0
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/scd0 /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
-----------------

Here is the menu.lst (current and original versions):

rock:~/acer-202t# cat menu.lst
timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1

gfxmenu /boot/grub/message

title MEPIS at hda1, newest kernel
root (hd0,0)
kernel /boot/vmlinuz root=LABEL=ROOT nomce quiet splash vga=787 resume=LABEL=SWAP
boot

title MEPIS at hda1, previous kernel (if any)
root (hd0,0)
kernel /boot/vmlinuz.old root=LABEL=ROOT nomce quiet splash vga=787 resume=LABEL=SWAP
boot

rock:~/acer-202t# cat menu.lst.old.1
timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1

gfxmenu /boot/grub/message

title MEPIS at sda3, newest kernel
root (hd0,2)
kernel /boot/vmlinuz root=/dev/sda3 nomce quiet splash vga=791 resume=/dev/sda4
boot

title MEPIS at sda2, previous kernel (if any)
root (hd0,2)
kernel /boot/vmlinuz.old root=/dev/sda3 nomce quiet splash vga=791 resume=/dev/s
boot

#title MEPIS at sda3, kernel 2.6.27-1-mepis-smp
#root (hd0,2)
#kernel /boot/vmlinuz-2.6.27-1-mepis-smp root=/dev/sda3 nomce quiet splash vga=7
#boot

NOTE: I've kept the previous kernel (2.6.22) alongside the current one (2.6.27). vmlinuz.old/ vmlinuz are just symlinks to them (likewise for System.map and initrd.img).
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#4
You could use the antiX livecd (or grml), mount the partition that antiX got cloned too, cd into it and run as root
update-grub

and see what that comes out with. Then try booting into antiX.

(save a copy of your menu.lst though)

If you use antiX livecd, there is a restore/repair/fix grub in msystem.
Posts: 3
koinsky67
Joined: 30 Apr 2009
#5
Hi Anticapitalista!

I've already done that. Not exactly as you suggest but equivalent I think:

grub-install --recheck --root-directory=/mnt/sda1 /dev/sda1

From the grub-install manpage:

--root-directory=DIR
install GRUB images under the directory DIR instead of the root directory

--recheck
probe a device map even if it already exists


In fact I did it right after cloning the partition because what was on the MBR was the Windows bootloader. Then I did it again after the failed boot attemps.

I don't think there is a grub configuration problem as it runs, presents the boot options in menu.lst and loads the selected kernel. I've tried both kernels, and the displayed messages are different but both end with

kernel panic - not syncing : VFS : unable to mount root fs on unknown-block (0,0)

Thanks for your help!

PS:
A luta continua! __{{emoticon}}__
Posts: 516
oldhoghead
Site Admin
Joined: 01 Oct 2007
#6
rock:~/acer-202t# cat device.map
(fd0) /dev/fd0
(hd0) /dev/sda
try changing
(hd0) /dev/sda to
(hd0) /dev/hda

cheers,
oldhoghead