booting from DOC

stephen lcbr17306 at
Mon Dec 1 06:45:53 EST 2003

Hi Denis,

ye got it sussed now, I managed to patch correctly (i think this was the
main problem) then the kernel I was using wouldn't load my root filesystem,
kept coming out with:

VFS: unable to mount root filesystem on 5d:02

i assumed that 5d = major number , 02 = minor number, so I figured that 02
was referring to the correct partition number but was unable to read it,  so
i re-compiled the kernel and the mtd drivers as 'built-ins', as soon as I
did that I now have my partitions:


nftla1, nftla2

nftla1 is a 2MB partition /boot, contains my kernel image and menu.lst (grub
can read this no problem), nftla2 is 30 MB root filesystem, all I did was:

rdev <kernelimage> /dev/nftla2

I assumed this changed the ramdisk word in the kernel, plus of course I:

ldconfig -r /mnt/rootfs

which sits on /dev/nftla2 this sets up the root filesystem up for libraries
etc, also I had all to strip all my libraries, using:

objcopy --strip-debug FROM TO

most of this information can be found at:

probably my favourite 'howto' apart from 'Beej's socket programming', hehe

thanks for your advice,

kind regards

----- Original Message -----
From: "Denis Dowling" <dpd at>
To: "stephen" <lcbr17306 at>
Cc: "linux-mtd" <linux-mtd at>
Sent: Monday, December 01, 2003 12:08 AM
Subject: Re: booting from DOC

> ----- Original Message -----
> From: "stephen" <lcbr17306 at>
> To: <linux-mtd at>
> Sent: Monday, November 24, 2003 10:09 PM
> Subject: booting from DOC
> > Hi All,
> >
> > didn't get a reply from my last post , which was me rambling on a bit
> > much or my text sounds arrogant? (sorry if it does i am just a newbie)
> >
> > I've been reading Karim Yaghmours book, got much further now, maybe
> someone
> > can put me straight on a couple of things? (hopefully)
> >
> > first of all I managed to install grub using 'doc_loadbios' so it
> > the DOC's SPL , then I managed to use 'nftl_format' and formatted from
> > memory address '98304' which isn't the size of the grub boot loader but
> > assume represents '16384 + 81920' , '81920' being the last erase offset,
> > from here I managed to 'fdisk nftla' and created a new partition
> > '/dev/nftla1', I can format this partition and safely read and write
> I
> > compiled all the DOC files as modules, I didn't patch the kernel I
> > to use a clean '2.4.19' kernel' , I also couldn't compile the latest CVS
> > tools ;/ so I went back to a previous snapshot
> > 'Mtd-snapshot-20020708.tar.bz2' , this compiled fine (mainly I couldnt
> > compile nftl_format and something to do with empty LIST_HEAD
> blktrans.h with the latest CVS).
> My last patch fixes this :-)
> > I also realised that 'grub-0.92' needed
> > patching so i did that and repeated the steps with 'doc_loadbios' and
> > realised the last erase offset was now '65536' so the boot loader is
> smaller
> > and my new partition begins at offset '81920', plus this should have
> > contained 'ctrlbypass' as part of the grub compiled with patch.
> I cannot get ctrlbypass working with grub at the moment. Code looks
> but always boots to the grub prompt even if I hold down the control key.
> Very strange.
> >
> > The grub loader boots from the DOC but stops at the grub prompt, how do
> > get grub to boot my kernel image ?
> At the grub prompt type "kernel (" then TAB this should show all
> that grub supports.
> > in karims book it talks about building a root filesystem and
> > /boot/grub/menu.lst but I can't see how this can run without the modules
> > loaded needed by the kernel (e.g. docecc.o, doc2000.o etc) confused ;/
> It is grub that needs to know how to read /boot/grub/menu.lst not the
> kernel. If you have applied the correct patches to grub then it should be
> able to read the ext2 partition and load the menu file. I am trying to get
> grub and DoC working at the moment so should be able to help you out with
> questions. Also have a look at
> Regards,
> Denis.

More information about the linux-mtd mailing list