OpenWrt Forum Archive

Topic: VFS-Unable to mount rootfs

The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

   I m trying to bring up Kamikaze-RC1 on x86-Desktop PC. I have compiled it sucessfully and loaded the image onto USB stick(2GB) using the following command

  dd if=openwrt-x86-ext2.image of=/dev/sdb

  (the Important thing which I noted was that - the openwrt-x86-ext2.image is partitioning the USB stick into two partitions, one which has got /boot/grub/ folder which acts as the grub boot loader and the other drive its creating the Normal Linux Filesystem)

  While compiling, in the buid "Target Images" option I have given the "root partition on the target device " filesystem directory to be /dev/sdb.

  But once I am booting the USB(by changing the boot options in the BIOS to USB) I m getting this error:

  "Kernel Panic - Not syncing: VFS: unable to mount rootfs on unknown block(0,0)"

  More details wrt compilation procedure:
1)Enabled all the Kernel modules wrt to USB,VGA Console, SCSI Device support. Monitor support, Ethernet and WiFi support etc..

  Any help is highly appreciated.


thanks in advance,

Powar

Ok Now I m compiling the Kamikaze_RC2.

Saw in Kamikaze forums that the Kamikaze x86 build supports mainly the sokris board based on X86 Platform.

any how I m trying one again to boot up my X86 m/c

Even Kamikaze_RC2 has got the same set of problems, hmm still need to debug where exactly I a going wrong.

Tried these things for bringing up the X86 based m/c
1) configured root=LABEL=/ in grub
2) configured root=/dev/sdb2, this is what with which I have compiled and this is the default kernel option set at grub
3) even tried to load the vdi(virtual box image), this is also not comming up (OpenWrt Kamikaze_RC1 is comming up through VmWare).....
    Any how I mastered the compilation procedure....

Hi All,
   
        "I COULD DOWNLOAD KAMIKAZE ON A DESKTOP PC - X86 Machine". -- Really Its gorgeous.....

       All the above said problems were because of SCSI HardDisk and SCSI USB Drives.

       I think OPENWRT Guys need to take this scenario and try to patch it for next update.

      "ie booting using SCSI drives"

       I donot know how to raise this issue to OpenWRT guys - Could anybody please help me in this issue"

      And Thx to a lot of guys who have viewed my previous postings and also replied to my queries"

     Now I can really help You guys If U want me for porting into X86 based platforms.

Thx

Powar

Hi,

   Can anybody give me the procedure as to how to set up a router functionality in OpenWRT.
 
   i.e What are the packages which we have install in OpenWRT etc..

Thanks in advance,

Regards
Powar

Hi,
am struggling with exact same situation and kernel panic error message after booting from usb pen drive.
Have several unused Pentrium 4 notebook motherboards with mini-pci and 4 x usb2.0 and would like to turn them into fast routers using OpenWrt.
vmlinuz loads but then the panic starts.

What did you change in the settings before compilation to cure the problem ? You hint at a scsi issue but the details are unclear to me.

tnx
doddel

Hi Doddel,

       Just use the IDE (ATA) devices. This OpenWRT according to me cant be loaded onto SCSI Drives.

see this
        http://www.adrc.com/ckr/hard_disk.html
       
        you will get some info about different types of Hard Disks which we will be using unknowingly.

        When you insert a Hard Drive or USB drive, the OS will install drivers for that Disk, What I could observe is that when we are inserting the USB drives, the OpenWRT is not able to load the necessary drivers, In a way the OpenWRT OS is not able to find that there is some disk which exists in your system.

       So the best option is get a IDE device and then burn the image onto the IDE Drive(using dd if=xxx.image of=/dev/hda (here hdX will be comming when we insert a IDE hard disk)) and thats it, it will Format the hda disk and then load the kernel and the mount it.

       If you are not able to mount it correctly change the grub options, thats it yours OS will start...

       If you are not able to do this, send the log.



Bye
Powar

Hi Powar, thanks for the explanation.

The result, using IDE and a real HDD, however defeats my intention to have an all solid-state passive system without HDD with moving parts and wear.
Of course could use a solid-state HDD. Will look into that.

Have been able to successfully load other linux distributions from the pen drivve, like puppy-linux and plop-linux.
Both however, after loading vmlinuz and a initrd.gz also spent some time on loading drivers before actually starting the OS.
I guess you are right that OpenWrt does not cater for the process needed to find the usb pen-drive hidden behind a scsi interface.

Just out of interest will look a bit further into how the other linux distributions accomplish this boot process from a usb pen-drive.
Perhaps this bootloader http://www.plop.at/en/bootmanager.html  can provide OpenWrt with the environment to be able to boot.

rgds
doddel

(Last edited by doddel on 12 Feb 2009, 11:06)

Hi,

   please inform me if you could install the OpenWRT (in the mere future)  onto a SCSI device like a Usb Pendrive. I tried it many times and faltered and did you try installing the OpenWRT onto a SATA Drive, if yes let me know.

And if possible give me the procedure as to how to raise a ticket and track the ticket in OpenWRT forum


Thanks
Suresh K

The last question about the ticket is is easy: https://dev.openwrt.org/

Am currently looking into how puppy linux have solved the issue.  They use an impressively long and complicated init script, after loading the kernel, to install everything but it is of course an extensive desktop version of linux.
The relevant part analyzes the pci bus and determines the need for uhci, ohci, ehci drivers,
loads usbcore, loads u/o/ehci-hcd as needed, loads usb-storage , mounts a usb file system, loads nls_cp437  and nls_iso8859-1, and then waits for the usb storage devices to have registered before continuing .... They also have provisions for zip drives and legacy ide.
Will now look how OpenWrt goes about initializing usb. There are versions for units with usb, like the Asus500gP but there the boot doesn't happen from usb but from built-in flash so usb can be initialized later. I have the feeling that the trick is in forcing the relevant kernel modules to be loaded early on in the process so the physical access to the file system is ready when needed.

Hi doodle,

  Now I am trying to setup wifi functionality, have got two Linksys WMP54G Cards, and I have set both these as AP's, n now I am not able to scan each other, It would be great if you have any pointers.

  Any links also would be sufficient

Thx
Powar

Just succeeded in booting OpenWrt from the USB pendrive on an ECS A928 desknote PC. (Pentium 4 system, ~2002, with VIA VT6202 usb2.0 controller and SiS 650/961 chipset)

There are actually no special tricks needed in terms of additions to OpenWrt but it is required to make changes to the kernel compilation settings.
The procedure:

A: OpenWrt compilation
1. Download and install a working openwrt compiler toolchain; mine is kamikaze trunk of Feb. 13 2009  r14476.
2. Under make menuconfig of course select x86 and generic profile and whatever you want in terms of packages.
3. Do a 'make kernel_menuconfig' and there activate relevant scsi and usb 1.0 / 2.0 / disk support to be permanent part of the kernel. Under scsi it is important to activate the asynchronous scsi feature (otherwise it tries to mount the file systems on the pen-drive before they have been identified to exist  which results in kernel panic).

B: My PC and USB pen-drive specific stuff
1. what is on my 4 GB pen-drive is two partitions which when the PC runs with Fedora Core 10 Linux show as /dev/sdb4 (a bootable vfat partition 124 MB with syslinux files to which I added OpenWrt's renamed kernel vmlinuz)  and /dev/sdb2 (ext2 partition with OpenWrt ext2 file system and files, the remaining 3.8 GB)
2. I partitioned the pen drive the above way using dd to copy an image onto it that contains master boot record, partition table, and partitions and stems from puppy linux; it makes the drive, although partitioned, also appear to be a zip-drive to older AMI BIOS systems (boot partition must be # 4), like mine; more modern PCs with USB boot option shouldn't need this tricky partitioning but mine doesn't boot unless it thinks it is an unpartitioned  zip drive or superfloppy, even though the AMI bios talks about a USB RMD-FDD).
Notes:
* openwrt-x86-vmlinuz needs to be renamed to just vmlinuz (syslinux specific, not applicable to grub)
* my choice for syslinux bootloader was forced by the special boot image and partitioning my PC needs and happens to use syslinux. Normally with more recent PCs the images produced by the OpenWrt compilation, offering through menuconfig a choice between grub and lilo, should work fine. 

Now it almost worked and showed signs of scsi and the presence of the usb pen drive but there turned out to be a naming convention issue. What shows under Fedora10 as sdb4 and sdb2, in the presence of also a harddisk sda, shows during OpenWrt boot as uba4 and uba2. So the filesystem to be mounted is the ext2 one with the OpenWrt file system on it and seen by the kernel as uba2. When the kernel doesn't find a mountable filesystem it will list the partitions it has found through the scsi/usb system and then panic; so you can edit the boot configuration file to make the kernel pick the right one next time.

My syslinux.cfg file now looks as follows:

default openwrt
label openwrt
kernel vmlinuz
append root=/dev/uba2 rootfstype=ext2 init=/etc/preinit  noinitrd console=tty0 console=ttyS0,38400n8 reboot=bios

and then it boots, no HDD or CD/DVD drive present, just the pen-drive and RAM . Again impressed by the flexibility of OpenWrt !

(Last edited by doddel on 15 Feb 2009, 15:58)

How are you guys doing?  Did you get it to work??

The discussion might have continued from here.